mirror of
https://github.com/Matte23/circolapp.git
synced 2025-12-05 23:19:10 +00:00
Add OnboardingView for iPads
This commit is contained in:
@@ -20,13 +20,18 @@ import SwiftUI
|
||||
|
||||
struct PadView: View {
|
||||
@State var screen: Screen? = .all
|
||||
@State var showOnboarding = !UserDefaults.standard.bool(forKey: "skipOnboarding")
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
SidebarView(state: $screen)
|
||||
}
|
||||
.navigationViewStyle(DoubleColumnNavigationViewStyle())
|
||||
|
||||
.sheet(isPresented: self.$showOnboarding, onDismiss: {
|
||||
UserDefaults.standard.set(true, forKey: "skipOnboarding")
|
||||
}) {
|
||||
OnboardingView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ struct SidebarView: View {
|
||||
|
||||
var body: some View {
|
||||
if #available(iOS 14.0, *) {
|
||||
List {
|
||||
List(selection: $state) {
|
||||
NavigationLink(
|
||||
destination: CircularList(),
|
||||
tag: Screen.all,
|
||||
|
||||
Reference in New Issue
Block a user