mirror of
https://github.com/yJason/ClashX-Dashboard.git
synced 2026-03-01 00:35:19 +08:00
feat: AppKit toolbar
This commit is contained in:
@@ -11,8 +11,21 @@ import ClashX_Dashboard_Kit
|
||||
@main
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
|
||||
var dashboardWindowController: DashboardWindowController?
|
||||
|
||||
func applicationDidFinishLaunching(_ notification: Notification) {
|
||||
|
||||
if dashboardWindowController == nil {
|
||||
dashboardWindowController = DashboardWindowController.create()
|
||||
dashboardWindowController?.onWindowClose = {
|
||||
[weak self] in
|
||||
self?.dashboardWindowController = nil
|
||||
}
|
||||
}
|
||||
dashboardWindowController?.showWindow(nil)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user