Initial commit

This commit is contained in:
2026-03-09 19:35:08 +01:00
commit f6b790a515
64 changed files with 18778 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
import SwiftUI
struct ContentView: View {
@Bindable var settings: SettingsStore
#if !os(macOS)
@State private var showSettings = false
#endif
var body: some View {
NavigationStack {
EmbeddedWebAppView(settings: settings)
.toolbar {
#if os(macOS)
ToolbarItem(placement: .primaryAction) {
SettingsLink {
Image(systemName: "gearshape")
}
}
#else
ToolbarItem(placement: .topBarTrailing) {
Button {
showSettings = true
} label: {
Image(systemName: "gearshape")
}
}
#endif
}
.overlay(alignment: .bottom) {
if let user = settings.currentUser {
Text("Signed in as \(user.displayName)")
.font(.footnote)
.padding(.horizontal, 12)
.padding(.vertical, 8)
.background(.ultraThinMaterial, in: Capsule())
.padding(.bottom, 16)
}
}
#if !os(macOS)
.sheet(isPresented: $showSettings) {
NavigationStack {
SettingsView(settings: settings)
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button("Done") {
showSettings = false
}
}
}
}
}
#endif
}
}
}