Add support for tvOS

This commit is contained in:
世界
2023-07-29 09:44:31 +08:00
parent 5a8f3a770f
commit bb0385f53c
63 changed files with 1542 additions and 389 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import Library
open class ApplicationDelegate: NSObject, NSApplicationDelegate {
public func applicationDidFinishLaunching(_: Notification) {
NSLog("Here I stand")
// ServiceNotification.register() // Not work
LibboxSetup(FilePath.sharedDirectory.relativePath, FilePath.workingDirectory.relativePath, FilePath.cacheDirectory.relativePath, false)
let event = NSAppleEventManager.shared().currentAppleEvent
let launchedAsLogInItem =
event?.eventID == kAEOpenApplication &&
-8
View File
@@ -43,14 +43,6 @@ public struct MainView: View {
}
#endif
.alertBinding($alert)
.onAppear {
ServiceNotification.setServiceNotificationListener { notification in
alert = Alert(title: Text(notification.title), message: Text(notification.body))
}
}
.onDisappear {
ServiceNotification.removeServiceNotificationListener()
}
.toolbar {
ToolbarItem(placement: .navigation) {
StartStopButton()
+1 -1
View File
@@ -191,7 +191,7 @@ public struct MenuView: View {
NotificationCenter.default.post(name: ActiveDashboardView.NotificationUpdateSelectedProfile, object: nil)
if profile.status.isConnected {
do {
try LibboxNewStandaloneCommandClient(FilePath.sharedDirectory.relativePath)?.serviceReload()
try LibboxNewStandaloneCommandClient()?.serviceReload()
} catch {
alert = Alert(error)
}