feat: add native macOS menu-bar application shell (#1)

This commit is contained in:
jayanezj committed 2026-10-23 07:58:49 +02:00
1 parent 730b825ada
commit 0bc6c3317b
28 files changed
+695

No files matched your search

@@ -0,0 +1,29 @@
import AppKit
import SwiftUI
@main
struct TraccarClientApp: App {
@NSApplicationDelegateAdaptor(ApplicationDelegate.self) private var delegate
var body: some Scene {
MenuBarExtra {
TrackingMenu()
} label: {
Image("MenuBarIcon")
.renderingMode(.template)
.accessibilityLabel("Traccar Client — Paused")
}
.menuBarExtraStyle(.menu)
Settings {
SettingsView()
}
}
}
@MainActor
final class ApplicationDelegate: NSObject, NSApplicationDelegate {
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
false
}
}