ui: make General tab scrollable
This commit is contained in:
@@ -10,77 +10,79 @@ struct GeneralSettings: View {
|
|||||||
@State private var cliInstallLocation: String?
|
@State private var cliInstallLocation: String?
|
||||||
@State private var remoteStatus: RemoteStatus = .idle
|
@State private var remoteStatus: RemoteStatus = .idle
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 18) {
|
ScrollView(.vertical) {
|
||||||
self.connectionSection
|
VStack(alignment: .leading, spacing: 18) {
|
||||||
|
self.connectionSection
|
||||||
|
|
||||||
if !self.state.onboardingSeen {
|
if !self.state.onboardingSeen {
|
||||||
Text("Complete onboarding to finish setup")
|
Text("Complete onboarding to finish setup")
|
||||||
.font(.callout.weight(.semibold))
|
.font(.callout.weight(.semibold))
|
||||||
.foregroundColor(.accentColor)
|
.foregroundColor(.accentColor)
|
||||||
.padding(.bottom, 2)
|
.padding(.bottom, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 12) {
|
VStack(alignment: .leading, spacing: 12) {
|
||||||
SettingsToggleRow(
|
SettingsToggleRow(
|
||||||
title: "Clawdis active",
|
title: "Clawdis active",
|
||||||
subtitle: "Pause to stop Clawdis background helpers and notifications.",
|
subtitle: "Pause to stop Clawdis background helpers and notifications.",
|
||||||
binding: self.activeBinding)
|
binding: self.activeBinding)
|
||||||
|
|
||||||
SettingsToggleRow(
|
SettingsToggleRow(
|
||||||
title: "Launch at login",
|
title: "Launch at login",
|
||||||
subtitle: "Automatically start Clawdis after you sign in.",
|
subtitle: "Automatically start Clawdis after you sign in.",
|
||||||
binding: self.$state.launchAtLogin)
|
binding: self.$state.launchAtLogin)
|
||||||
|
|
||||||
SettingsToggleRow(
|
SettingsToggleRow(
|
||||||
title: "Show Dock icon",
|
title: "Show Dock icon",
|
||||||
subtitle: "Keep Clawdis visible in the Dock instead of menu-bar-only mode.",
|
subtitle: "Keep Clawdis visible in the Dock instead of menu-bar-only mode.",
|
||||||
binding: self.$state.showDockIcon)
|
binding: self.$state.showDockIcon)
|
||||||
|
|
||||||
SettingsToggleRow(
|
SettingsToggleRow(
|
||||||
title: "Play menu bar icon animations",
|
title: "Play menu bar icon animations",
|
||||||
subtitle: "Enable idle blinks and wiggles on the status icon.",
|
subtitle: "Enable idle blinks and wiggles on the status icon.",
|
||||||
binding: self.$state.iconAnimationsEnabled)
|
binding: self.$state.iconAnimationsEnabled)
|
||||||
|
|
||||||
SettingsToggleRow(
|
SettingsToggleRow(
|
||||||
title: "Enable debug tools",
|
title: "Enable debug tools",
|
||||||
subtitle: "Show the Debug tab with development utilities.",
|
subtitle: "Show the Debug tab with development utilities.",
|
||||||
binding: self.$state.debugPaneEnabled)
|
binding: self.$state.debugPaneEnabled)
|
||||||
|
|
||||||
LabeledContent("Default sound") {
|
LabeledContent("Default sound") {
|
||||||
Picker("Sound", selection: self.$state.defaultSound) {
|
Picker("Sound", selection: self.$state.defaultSound) {
|
||||||
Text("None").tag("")
|
Text("None").tag("")
|
||||||
Text("Glass").tag("Glass")
|
Text("Glass").tag("Glass")
|
||||||
Text("Basso").tag("Basso")
|
Text("Basso").tag("Basso")
|
||||||
Text("Ping").tag("Ping")
|
Text("Ping").tag("Ping")
|
||||||
|
}
|
||||||
|
.labelsHidden()
|
||||||
|
.frame(width: 140)
|
||||||
}
|
}
|
||||||
.labelsHidden()
|
}
|
||||||
.frame(width: 140)
|
|
||||||
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
|
Text("Health")
|
||||||
|
.font(.callout.weight(.semibold))
|
||||||
|
self.healthCard
|
||||||
|
}
|
||||||
|
|
||||||
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
|
Text("CLI helper")
|
||||||
|
.font(.callout.weight(.semibold))
|
||||||
|
self.cliInstaller
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer(minLength: 12)
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
Button("Quit Clawdis") { NSApp.terminate(nil) }
|
||||||
|
.buttonStyle(.borderedProminent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
.padding(.horizontal, 22)
|
||||||
Text("Health")
|
.padding(.bottom, 16)
|
||||||
.font(.callout.weight(.semibold))
|
|
||||||
self.healthCard
|
|
||||||
}
|
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 6) {
|
|
||||||
Text("CLI helper")
|
|
||||||
.font(.callout.weight(.semibold))
|
|
||||||
self.cliInstaller
|
|
||||||
}
|
|
||||||
|
|
||||||
Spacer()
|
|
||||||
HStack {
|
|
||||||
Spacer()
|
|
||||||
Button("Quit Clawdis") { NSApp.terminate(nil) }
|
|
||||||
.buttonStyle(.borderedProminent)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
|
||||||
.padding(.horizontal, 22)
|
|
||||||
.padding(.bottom, 16)
|
|
||||||
.onAppear { self.refreshCLIStatus() }
|
.onAppear { self.refreshCLIStatus() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user