Restore Settings as sidebar item on macOS

Remove the gear toolbar button that opened Settings as a sheet in the
NavigationSplitView sidebar column, and drop the macOS guard hiding
.settings from SidebarMainItem so it can be added to the sidebar and
rendered in the detail column like other items. The dedicated Settings
window (Cmd+,) is unchanged.
This commit is contained in:
Arkadiusz Fal
2026-04-23 18:00:42 +02:00
parent b23dfde602
commit cda983651e
2 changed files with 0 additions and 30 deletions

View File

@@ -124,12 +124,6 @@ enum SidebarMainItem: String, CaseIterable, Codable, Identifiable, Sendable {
#else
return true
#endif
case .settings:
#if os(macOS)
return false
#else
return true
#endif
default:
return true
}

View File

@@ -376,11 +376,6 @@ struct UnifiedTabView: View {
// Zoom transition namespace (local to this tab view)
@Namespace private var zoomTransition
// Settings sheet (rendered from the NavigationSplitView toolbar so the gear sits
// immediately after the system-vended sidebar-toggle in the sidebar column).
@State private var showingSettings = false
@Namespace private var sheetTransition
private var yatteeServerAuthHeader: String? {
guard let server = appEnvironment?.instancesManager.enabledYatteeServerInstances.first else { return nil }
return appEnvironment?.basicAuthCredentialsManager.basicAuthHeader(for: server)
@@ -389,28 +384,9 @@ struct UnifiedTabView: View {
var body: some View {
NavigationSplitView {
sidebar
.toolbar {
ToolbarItem(placement: .primaryAction) {
Button {
showingSettings = true
} label: {
Image(systemName: "gear")
}
.accessibilityIdentifier("app.settingsButton")
.accessibilityLabel(String(localized: "settings.title"))
.liquidGlassTransitionSource(id: "appSettings", in: sheetTransition)
}
}
} detail: {
detailForSelection
}
.sheet(isPresented: $showingSettings) {
SettingsView()
.liquidGlassSheetContent(sourceID: "appSettings", in: sheetTransition)
}
.onChange(of: appEnvironment?.navigationCoordinator.dismissSettingsTrigger) {
showingSettings = false
}
.zoomTransitionNamespace(zoomTransition)
.onAppear {
configureSidebarManager()