Add persistent app quit control
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import AppKit
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
@@ -38,14 +39,24 @@ private struct RootView: View {
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
Picker("Section", selection: $selectedTab) {
|
||||
ForEach(AppTab.allCases) { tab in
|
||||
Label(tab.title, systemImage: tab.icon)
|
||||
.tag(tab)
|
||||
HStack(spacing: 8) {
|
||||
Picker("Section", selection: $selectedTab) {
|
||||
ForEach(AppTab.allCases) { tab in
|
||||
Label(tab.title, systemImage: tab.icon)
|
||||
.tag(tab)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.labelsHidden()
|
||||
|
||||
Button {
|
||||
NSApplication.shared.terminate(nil)
|
||||
} label: {
|
||||
Image(systemName: "power")
|
||||
}
|
||||
.accessibilityLabel("Quit Fchati")
|
||||
.help("Quit Fchati")
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
.labelsHidden()
|
||||
.padding()
|
||||
|
||||
Divider()
|
||||
|
||||
Reference in New Issue
Block a user