refactor(macos): tidy settings layout
This commit is contained in:
@@ -484,6 +484,22 @@ struct DebugSettings: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
|
Text(
|
||||||
|
"Note: macOS may require restarting Clawdbot after enabling Accessibility or Screen Recording.")
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
|
|
||||||
|
Button {
|
||||||
|
LaunchdManager.startClawdbot()
|
||||||
|
} label: {
|
||||||
|
Label("Restart Clawdbot", systemImage: "arrow.counterclockwise")
|
||||||
|
}
|
||||||
|
.buttonStyle(.bordered)
|
||||||
|
.controlSize(.small)
|
||||||
|
}
|
||||||
|
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
Button("Restart app") { DebugActions.restartApp() }
|
Button("Restart app") { DebugActions.restartApp() }
|
||||||
Button("Restart onboarding") { DebugActions.restartOnboarding() }
|
Button("Restart onboarding") { DebugActions.restartOnboarding() }
|
||||||
|
|||||||
@@ -29,25 +29,6 @@ struct GeneralSettings: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
ScrollView(.vertical) {
|
ScrollView(.vertical) {
|
||||||
VStack(alignment: .leading, spacing: 18) {
|
VStack(alignment: .leading, spacing: 18) {
|
||||||
if !self.state.onboardingSeen {
|
|
||||||
Button {
|
|
||||||
DebugActions.restartOnboarding()
|
|
||||||
} label: {
|
|
||||||
HStack(spacing: 8) {
|
|
||||||
Label("Complete onboarding to finish setup", systemImage: "arrow.counterclockwise")
|
|
||||||
.font(.callout.weight(.semibold))
|
|
||||||
.foregroundStyle(Color.accentColor)
|
|
||||||
Spacer(minLength: 0)
|
|
||||||
Image(systemName: "chevron.right")
|
|
||||||
.font(.caption.weight(.semibold))
|
|
||||||
.foregroundStyle(.tertiary)
|
|
||||||
}
|
|
||||||
.contentShape(Rectangle())
|
|
||||||
}
|
|
||||||
.buttonStyle(.plain)
|
|
||||||
.padding(.bottom, 2)
|
|
||||||
}
|
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 12) {
|
VStack(alignment: .leading, spacing: 12) {
|
||||||
SettingsToggleRow(
|
SettingsToggleRow(
|
||||||
title: "Clawdbot active",
|
title: "Clawdbot active",
|
||||||
@@ -83,8 +64,6 @@ struct GeneralSettings: View {
|
|||||||
subtitle: "Allow the agent to capture a photo or short video via the built-in camera.",
|
subtitle: "Allow the agent to capture a photo or short video via the built-in camera.",
|
||||||
binding: self.$cameraEnabled)
|
binding: self.$cameraEnabled)
|
||||||
|
|
||||||
SystemRunSettingsView()
|
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 6) {
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
Text("Location Access")
|
Text("Location Access")
|
||||||
.font(.body)
|
.font(.body)
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ struct PermissionsSettings: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 14) {
|
VStack(alignment: .leading, spacing: 14) {
|
||||||
|
SystemRunSettingsView()
|
||||||
|
|
||||||
Text("Allow these so Clawdbot can notify and capture when needed.")
|
Text("Allow these so Clawdbot can notify and capture when needed.")
|
||||||
.padding(.top, 4)
|
.padding(.top, 4)
|
||||||
|
|
||||||
@@ -46,24 +48,6 @@ struct PermissionStatusList: View {
|
|||||||
.padding(.top, 2)
|
.padding(.top, 2)
|
||||||
.help("Refresh status")
|
.help("Refresh status")
|
||||||
|
|
||||||
if (self.status[.accessibility] ?? false) == false || (self.status[.screenRecording] ?? false) == false {
|
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
|
||||||
Text(
|
|
||||||
"Note: macOS may require restarting Clawdbot after enabling Accessibility or Screen Recording.")
|
|
||||||
.font(.caption)
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
.fixedSize(horizontal: false, vertical: true)
|
|
||||||
|
|
||||||
Button {
|
|
||||||
LaunchdManager.startClawdbot()
|
|
||||||
} label: {
|
|
||||||
Label("Restart Clawdbot", systemImage: "arrow.counterclockwise")
|
|
||||||
}
|
|
||||||
.buttonStyle(.bordered)
|
|
||||||
.controlSize(.small)
|
|
||||||
}
|
|
||||||
.padding(.top, 4)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user