mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-24 13:01:05 +00:00
fix(macos): normalize settings pane margins
This commit is contained in:
@@ -87,6 +87,7 @@ Docs: https://docs.openclaw.ai
|
||||
- UI: show reasoning choices as plain labels instead of leaking internal override wording in session and chat pickers.
|
||||
- Mac app: avoid repeating the Configuration heading inside channel quick settings.
|
||||
- Mac app: keep the Settings sidebar always visible and remove the redundant titlebar hide/show control.
|
||||
- Mac app: normalize Settings pane content margins so pages share the same left and right rail.
|
||||
- Mac app: prefer explicit private/Tailscale/LAN Gateway endpoints over SSH tunnels, preserve legacy loopback tunnel configs, persist transport choices, and show captured SSH stderr when tunneling really fails.
|
||||
- Gateway/sessions: keep ACP/acpx and runtime child sessions visible in configured-only session lists when their owner or parent session belongs to a configured agent.
|
||||
- Mac app: keep app-level menu commands and Dashboard failure states reachable when the remote Gateway is disconnected.
|
||||
|
||||
@@ -85,9 +85,7 @@ struct AboutSettings: View {
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.padding(.top, 4)
|
||||
.padding(.horizontal, 24)
|
||||
.padding(.bottom, 24)
|
||||
.settingsDetailContent()
|
||||
.onAppear {
|
||||
guard let updater, !self.didLoadUpdaterState else { return }
|
||||
// Keep Sparkle’s auto-check setting in sync with the persisted toggle.
|
||||
|
||||
@@ -8,6 +8,7 @@ extension ChannelsSettings {
|
||||
self.detail
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
.settingsDetailContent()
|
||||
.onAppear {
|
||||
self.updateActiveWork(active: self.isActive)
|
||||
self.ensureSelection(in: channels)
|
||||
@@ -72,8 +73,8 @@ extension ChannelsSettings {
|
||||
.font(.callout)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.padding(.horizontal, 24)
|
||||
.padding(.vertical, 18)
|
||||
.padding(.horizontal, SettingsLayout.detailHorizontalPadding)
|
||||
.padding(.vertical, SettingsLayout.detailVerticalPadding)
|
||||
}
|
||||
|
||||
private func channelDetail(_ channel: ChannelItem) -> some View {
|
||||
@@ -85,8 +86,8 @@ extension ChannelsSettings {
|
||||
Spacer(minLength: 0)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.horizontal, 24)
|
||||
.padding(.vertical, 18)
|
||||
.padding(.horizontal, SettingsLayout.detailHorizontalPadding)
|
||||
.padding(.vertical, SettingsLayout.detailVerticalPadding)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ struct ConfigSettings: View {
|
||||
self.detail
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
.settingsDetailContent()
|
||||
.task {
|
||||
guard !self.hasLoaded else { return }
|
||||
guard !self.isPreview else { return }
|
||||
@@ -117,8 +118,8 @@ extension ConfigSettings {
|
||||
.font(.callout)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.padding(.horizontal, 24)
|
||||
.padding(.vertical, 18)
|
||||
.padding(.horizontal, SettingsLayout.detailHorizontalPadding)
|
||||
.padding(.vertical, SettingsLayout.detailVerticalPadding)
|
||||
}
|
||||
|
||||
private var schemaUnavailableDetail: some View {
|
||||
@@ -129,8 +130,8 @@ extension ConfigSettings {
|
||||
.foregroundStyle(.secondary)
|
||||
self.actionRow
|
||||
}
|
||||
.padding(.horizontal, 24)
|
||||
.padding(.vertical, 18)
|
||||
.padding(.horizontal, SettingsLayout.detailHorizontalPadding)
|
||||
.padding(.vertical, SettingsLayout.detailVerticalPadding)
|
||||
}
|
||||
|
||||
private func sectionDetail(_ section: ConfigSection) -> some View {
|
||||
@@ -153,8 +154,8 @@ extension ConfigSettings {
|
||||
Spacer(minLength: 0)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.horizontal, 24)
|
||||
.padding(.vertical, 18)
|
||||
.padding(.horizontal, SettingsLayout.detailHorizontalPadding)
|
||||
.padding(.vertical, SettingsLayout.detailVerticalPadding)
|
||||
.groupBoxStyle(PlainSettingsGroupBoxStyle())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,7 @@ extension CronSettings {
|
||||
Spacer(minLength: 0)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
.padding(.leading, 18)
|
||||
.padding(.trailing, SettingsLayout.scrollbarGutter)
|
||||
.settingsDetailContent()
|
||||
.onAppear {
|
||||
self.updateActiveWork(active: self.isActive)
|
||||
}
|
||||
|
||||
@@ -62,9 +62,7 @@ struct DebugSettings: View {
|
||||
|
||||
Spacer(minLength: 0)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.vertical, 4)
|
||||
.padding(.trailing, SettingsLayout.scrollbarGutter)
|
||||
.settingsDetailContent()
|
||||
.groupBoxStyle(PlainSettingsGroupBoxStyle())
|
||||
}
|
||||
.task {
|
||||
|
||||
@@ -46,10 +46,7 @@ struct GeneralSettings: View {
|
||||
self.connectionPage
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: 760, alignment: .leading)
|
||||
.padding(.bottom, 16)
|
||||
.padding(.leading, 18)
|
||||
.padding(.trailing, SettingsLayout.scrollbarGutter)
|
||||
.settingsDetailContent()
|
||||
}
|
||||
.onAppear {
|
||||
self.updateActiveWork(active: self.isActive)
|
||||
|
||||
@@ -32,8 +32,7 @@ struct InstancesSettings: View {
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
.padding(.leading, 18)
|
||||
.padding(.trailing, SettingsLayout.scrollbarGutter)
|
||||
.settingsDetailContent()
|
||||
.onAppear { self.updateActiveWork(active: self.isActive) }
|
||||
.onChange(of: self.isActive) { _, active in
|
||||
self.updateActiveWork(active: active)
|
||||
|
||||
@@ -36,9 +36,7 @@ struct PermissionsSettings: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: 760, alignment: .leading)
|
||||
.padding(.trailing, SettingsLayout.scrollbarGutter)
|
||||
.padding(.vertical, 4)
|
||||
.settingsDetailContent()
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@ struct SessionsSettings: View {
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
.padding(.leading, 18)
|
||||
.padding(.trailing, SettingsLayout.scrollbarGutter)
|
||||
.settingsDetailContent()
|
||||
.task {
|
||||
guard !self.hasLoaded else { return }
|
||||
guard !self.isPreview else { return }
|
||||
|
||||
@@ -3,8 +3,18 @@ import SwiftUI
|
||||
enum SettingsLayout {
|
||||
static let sidebarWidth: CGFloat = 250
|
||||
static let detailHorizontalPadding: CGFloat = 22
|
||||
static let detailVerticalPadding: CGFloat = 18
|
||||
static let nestedSidebarWidth: CGFloat = 260
|
||||
static let scrollbarGutter: CGFloat = 36
|
||||
static let detailBottomPadding: CGFloat = 16
|
||||
}
|
||||
|
||||
extension View {
|
||||
func settingsDetailContent() -> some View {
|
||||
self
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.vertical, 4)
|
||||
.padding(.bottom, SettingsLayout.detailBottomPadding)
|
||||
}
|
||||
}
|
||||
|
||||
struct SettingsPageHeader: View {
|
||||
|
||||
@@ -84,7 +84,7 @@ struct SettingsRootView: View {
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
.padding(.horizontal, SettingsLayout.detailHorizontalPadding)
|
||||
.padding(.vertical, 18)
|
||||
.padding(.vertical, SettingsLayout.detailVerticalPadding)
|
||||
}
|
||||
|
||||
private var cachedDetailTabs: [SettingsTab] {
|
||||
|
||||
@@ -27,9 +27,7 @@ struct SkillsSettings: View {
|
||||
self.skillsList
|
||||
Spacer(minLength: 8)
|
||||
}
|
||||
.frame(maxWidth: 860, alignment: .leading)
|
||||
.padding(.trailing, SettingsLayout.scrollbarGutter)
|
||||
.padding(.vertical, 4)
|
||||
.settingsDetailContent()
|
||||
}
|
||||
.task {
|
||||
guard !self.didScheduleInitialRefresh else { return }
|
||||
|
||||
@@ -12,8 +12,7 @@ struct ExecApprovalsSettings: View {
|
||||
|
||||
SystemRunSettingsView()
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.vertical, 4)
|
||||
.settingsDetailContent()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,9 +186,7 @@ struct VoiceWakeSettings: View {
|
||||
|
||||
Spacer(minLength: 8)
|
||||
}
|
||||
.frame(maxWidth: 760, alignment: .leading)
|
||||
.padding(.trailing, SettingsLayout.scrollbarGutter)
|
||||
.padding(.vertical, 4)
|
||||
.settingsDetailContent()
|
||||
}
|
||||
.task {
|
||||
guard !self.isPreview else { return }
|
||||
|
||||
Reference in New Issue
Block a user