iOS drawer: compact show/hide-all, single menu button, corner-safe footer
Testing feedback: - show-all / hide-all are now side by side (bordered), not two big stacked rows - the busy quick-access strip becomes a single "Einstellungen" button that opens the full menu (which already holds accounts/profile/groups/server/sync/ logout) - extra horizontal + bottom padding so the footer button is not clipped by the iPhone's rounded corners / home indicator Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,6 @@ struct CalendarHostView: View {
|
||||
@State private var groups: [CalGroup] = []
|
||||
@State private var showNewBirthday = false
|
||||
@State private var showDrawer = false
|
||||
@State private var drawerDestination: DrawerDestination? = nil
|
||||
|
||||
private var titleString: String {
|
||||
if store.viewType == .month {
|
||||
@@ -63,8 +62,7 @@ struct CalendarHostView: View {
|
||||
api: api, store: store, groups: groups,
|
||||
onSwitchGroup: { g in closeDrawer(); switchGroup(g) },
|
||||
onSelectView: { vt in store.viewType = vt; closeDrawer() },
|
||||
onOpenDestination: { dest in closeDrawer(); drawerDestination = dest },
|
||||
onSync: { closeDrawer(); Task { await syncFromServer(force: true) } },
|
||||
onOpenMenu: { closeDrawer(); showMenu = true },
|
||||
onClose: { closeDrawer() }
|
||||
)
|
||||
.frame(width: drawerWidth)
|
||||
@@ -92,15 +90,6 @@ struct CalendarHostView: View {
|
||||
)
|
||||
}
|
||||
}
|
||||
.sheet(item: $drawerDestination) { dest in
|
||||
switch dest {
|
||||
case .profile: ProfileView(api: api)
|
||||
case .settings: SettingsView(api: api)
|
||||
case .accounts: AccountsView(api: api)
|
||||
case .groups: GroupsView(api: api)
|
||||
case .server: ServerView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var drawerWidth: CGFloat { min(UIScreen.main.bounds.width - 40, 360) }
|
||||
|
||||
Reference in New Issue
Block a user