36 lines
1.0 KiB
Swift
36 lines
1.0 KiB
Swift
import AppKit
|
|
import SwiftUI
|
|
|
|
/// Entry point. Keep this file thin: scenes only, no business logic (ARCHITECTURE §3).
|
|
@main
|
|
struct SprachmittlerApp: App {
|
|
@NSApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
|
|
|
|
var body: some Scene {
|
|
MenuBarExtra("Sprachmittler", systemImage: "translate") {
|
|
// Replaced by MenuBar/StatusMenu.swift.
|
|
Button("Translate Clipboard Text") {}
|
|
.disabled(true)
|
|
Divider()
|
|
Button("Set up Sprachmittler…") {}
|
|
.disabled(true)
|
|
SettingsLink {
|
|
Text("Settings…")
|
|
}
|
|
Divider()
|
|
Button("Quit Sprachmittler") {
|
|
NSApplication.shared.terminate(nil)
|
|
}
|
|
.keyboardShortcut("q")
|
|
}
|
|
.menuBarExtraStyle(.menu)
|
|
|
|
Settings {
|
|
// Replaced by Settings/SettingsView.swift.
|
|
Text("Settings")
|
|
.padding()
|
|
.frame(width: 480, height: 320)
|
|
}
|
|
}
|
|
}
|