Add liquid glass home tabs

This commit is contained in:
lucast committed 2026-10-07 01:29:23 +02:00
1 parent 13d8597eea
commit c415380336
6 files changed
+352 -10

No files matched your search

+12 -8
View File
@@ -2,6 +2,12 @@ import SwiftUI
struct ContentView: View {
@StateObject private var session = AuthSessionStore()
private let restoresSession: Bool
@MainActor init(session: AuthSessionStore? = nil, restoresSession: Bool = true) {
_session = StateObject(wrappedValue: session ?? AuthSessionStore())
self.restoresSession = restoresSession
}
var body: some View {
Group {
@@ -15,16 +21,11 @@ struct ContentView: View {
case .signedOut:
SignInView(session: session)
case .signedIn:
VStack(spacing: 12) {
Image(systemName: "music.note.list")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
MainTabView()
}
}
.task {
guard restoresSession else { return }
await session.restoreSession()
}
}
@@ -32,6 +33,9 @@ struct ContentView: View {
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
ContentView(
session: AuthSessionStore(initialState: .signedOut),
restoresSession: false
)
}
}