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:
@@ -8,6 +8,7 @@ struct DashboardView: View {
|
||||
@State private var dailyLogs: [DailyLog] = []
|
||||
@State private var testResults: [TestResult] = []
|
||||
@State private var reviewCards: [ReviewCard] = []
|
||||
@State private var showingSettings = false
|
||||
|
||||
private var cloudModelContext: ModelContext { cloudModelContextProvider() }
|
||||
|
||||
@@ -33,6 +34,19 @@ struct DashboardView: View {
|
||||
.adaptiveContainer(maxWidth: 800)
|
||||
}
|
||||
.navigationTitle("Dashboard")
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .topBarTrailing) {
|
||||
Button {
|
||||
showingSettings = true
|
||||
} label: {
|
||||
Image(systemName: "gearshape")
|
||||
}
|
||||
.accessibilityLabel("Settings")
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $showingSettings) {
|
||||
SettingsView()
|
||||
}
|
||||
.onAppear(perform: loadData)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,6 @@ struct MainTabView: View {
|
||||
Tab("Course", systemImage: "list.clipboard") {
|
||||
CourseView()
|
||||
}
|
||||
Tab("Settings", systemImage: "gearshape") {
|
||||
SettingsView()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user