auth and projects

This commit is contained in:
vadim committed 2026-10-29 13:14:46 +03:00
1 parent 558bb005f4
commit 0ba2db0ec2
14 files changed
+1207 -94

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
//
// RootView.swift
// Snail
//
import SwiftUI
/// Показывает вход или основной интерфейс в зависимости от состояния сессии.
struct RootView: View {
@Environment(AuthStore.self) private var auth
var body: some View {
Group {
switch auth.state {
case .loading:
ProgressView()
case .signedOut:
SignInView()
case .signedIn:
ProjectListView()
}
}
.animation(.default, value: auth.state)
.task { await auth.restoreSession() }
}
}