Move Settings to Dashboard toolbar to kill iPhone More overflow

Six tabs forced iPhone to spill Course into the system "More" tab, whose
own NavigationStack nested with CourseView's and produced a double back
chevron on every week/deck push. Drop the Settings tab, reach it from a
gear button on Dashboard that presents SettingsView as a sheet, and keep
the visible tab count at five so no More overflow exists.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-04-11 18:22:27 -05:00
parent 644dbb7230
commit 4e874f60d7
2 changed files with 14 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ struct DashboardView: View {
@State private var dailyLogs: [DailyLog] = [] @State private var dailyLogs: [DailyLog] = []
@State private var testResults: [TestResult] = [] @State private var testResults: [TestResult] = []
@State private var reviewCards: [ReviewCard] = [] @State private var reviewCards: [ReviewCard] = []
@State private var showingSettings = false
private var cloudModelContext: ModelContext { cloudModelContextProvider() } private var cloudModelContext: ModelContext { cloudModelContextProvider() }
@@ -33,6 +34,19 @@ struct DashboardView: View {
.adaptiveContainer(maxWidth: 800) .adaptiveContainer(maxWidth: 800)
} }
.navigationTitle("Dashboard") .navigationTitle("Dashboard")
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button {
showingSettings = true
} label: {
Image(systemName: "gearshape")
}
.accessibilityLabel("Settings")
}
}
.sheet(isPresented: $showingSettings) {
SettingsView()
}
.onAppear(perform: loadData) .onAppear(perform: loadData)
} }
} }

View File

@@ -18,9 +18,6 @@ struct MainTabView: View {
Tab("Course", systemImage: "list.clipboard") { Tab("Course", systemImage: "list.clipboard") {
CourseView() CourseView()
} }
Tab("Settings", systemImage: "gearshape") {
SettingsView()
}
} }
} }
} }