feat: AppKit toolbar

This commit is contained in:
mrFq1
2023-06-03 14:46:31 +08:00
parent b8c4e4b74c
commit 4ecc5bb3d1
12 changed files with 381 additions and 69 deletions
+13
View File
@@ -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)
}