fix: hide settings toolbar row
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
- TUI: migrate key handling to the updated pi-tui Key matcher API.
|
||||
- macOS: local gateway now connects via tailnet IP when bind mode is `tailnet`/`auto`.
|
||||
- macOS: Settings now use a sidebar layout to avoid toolbar overflow in Connections.
|
||||
- macOS: Settings window hides the preferences toolbar row to keep a clean sidebar layout.
|
||||
- macOS: drop deprecated `afterMs` from agent wait params to match gateway schema.
|
||||
- Auth: add OpenAI Codex OAuth support and migrate legacy oauth.json into auth.json.
|
||||
- Sandbox: copy inbound media into sandbox workspaces so agent tools can read attachments.
|
||||
|
||||
@@ -28,6 +28,7 @@ struct SettingsRootView: View {
|
||||
}
|
||||
}
|
||||
.listStyle(.sidebar)
|
||||
.toolbar(removing: .sidebarToggle)
|
||||
.frame(minWidth: 200, idealWidth: 220, maxWidth: 260)
|
||||
} detail: {
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
@@ -41,6 +42,8 @@ struct SettingsRootView: View {
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
}
|
||||
.navigationSplitViewStyle(.balanced)
|
||||
.navigationTitle("Settings")
|
||||
.background(SettingsWindowChrome(title: "Clawdbot Settings"))
|
||||
.frame(width: SettingsTab.windowWidth, height: SettingsTab.windowHeight, alignment: .topLeading)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
.onReceive(NotificationCenter.default.publisher(for: .clawdbotSelectSettingsTab)) { note in
|
||||
|
||||
20
apps/macos/Sources/Clawdbot/SettingsWindowChrome.swift
Normal file
20
apps/macos/Sources/Clawdbot/SettingsWindowChrome.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
import AppKit
|
||||
import SwiftUI
|
||||
|
||||
struct SettingsWindowChrome: NSViewRepresentable {
|
||||
let title: String
|
||||
|
||||
func makeNSView(context: Context) -> NSView {
|
||||
NSView()
|
||||
}
|
||||
|
||||
func updateNSView(_ nsView: NSView, context: Context) {
|
||||
DispatchQueue.main.async {
|
||||
guard let window = nsView.window else { return }
|
||||
window.title = title
|
||||
window.titleVisibility = .visible
|
||||
window.toolbar?.isVisible = false
|
||||
window.toolbarStyle = .unified
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user