From cda983651eb8372bb34ca6e6047ffcaa098f97da Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 23 Apr 2026 18:00:42 +0200 Subject: [PATCH] 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. --- .../Models/Navigation/SidebarMainItem.swift | 6 ----- Yattee/Views/Navigation/UnifiedTabView.swift | 24 ------------------- 2 files changed, 30 deletions(-) diff --git a/Yattee/Models/Navigation/SidebarMainItem.swift b/Yattee/Models/Navigation/SidebarMainItem.swift index 3a9850d9..3b39849e 100644 --- a/Yattee/Models/Navigation/SidebarMainItem.swift +++ b/Yattee/Models/Navigation/SidebarMainItem.swift @@ -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 } diff --git a/Yattee/Views/Navigation/UnifiedTabView.swift b/Yattee/Views/Navigation/UnifiedTabView.swift index e02d5a33..5d34da5c 100644 --- a/Yattee/Views/Navigation/UnifiedTabView.swift +++ b/Yattee/Views/Navigation/UnifiedTabView.swift @@ -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()