- WebShellView füllt Window-Höhe explizit (.frame(maxWidth: .infinity, maxHeight: .infinity)) — sonst hatte WKWebView auf Mac einen Rest-Spalt, der den Web-Footer abschnitt. - RootView TabBar-Hintergrund: Paper-Background auf Window-Toolbar (macOS-only via #if os(macOS), windowToolbar-Placement existiert unter iOS nicht). Title-Bar passt jetzt zum Content statt System-Grau. - AccountView Header: SF Symbol "quote.opening" durch eine einzelne, zentrierte Öffnungs-Anführung in Georgia-Bold ersetzt. Die SF- Doppelglyphe war asymmetrisch positioniert, sieht jetzt sauber aus. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
111 lines
3.5 KiB
Swift
111 lines
3.5 KiB
Swift
import ManaCore
|
|
import SwiftUI
|
|
|
|
/// Phase ζ-0 minimal: zeigt Auth-Status und Healthz-Probe-Ergebnis.
|
|
/// Phase ζ-3 erweitert um ManaAuthUI-Login-Sheet und Submission-
|
|
/// History-Link (via WebShell auf `zitare.mana.how/me`).
|
|
struct AccountView: View {
|
|
@Environment(AuthClient.self) private var auth
|
|
let healthStatus: HealthStatus
|
|
|
|
var body: some View {
|
|
ScrollView {
|
|
VStack(spacing: 24) {
|
|
header
|
|
|
|
statusCard
|
|
|
|
Spacer(minLength: 32)
|
|
|
|
aboutCard
|
|
}
|
|
.padding()
|
|
}
|
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
.background(ZitareTheme.background)
|
|
}
|
|
|
|
private var header: some View {
|
|
VStack(spacing: 12) {
|
|
// Eigenes Anführungszeichen-Glyph in der gleichen Variante
|
|
// wie das App-Icon — sienna auf transparentem Hintergrund,
|
|
// serif. SF-Symbol "quote.opening" rendert zwei Glyphen
|
|
// asymmetrisch nebeneinander, das wirkt unsauber.
|
|
Text(verbatim: "\u{201C}")
|
|
.font(.custom("Georgia-Bold", size: 96))
|
|
.foregroundStyle(ZitareTheme.primary)
|
|
.frame(height: 64, alignment: .top)
|
|
Text("Zitare")
|
|
.font(.largeTitle)
|
|
.fontWeight(.semibold)
|
|
Text("Öffentlicher Zitat-Korpus von mana e.V.")
|
|
.font(.callout)
|
|
.foregroundStyle(ZitareTheme.mutedForeground)
|
|
.multilineTextAlignment(.center)
|
|
}
|
|
.padding(.top, 32)
|
|
}
|
|
|
|
private var statusCard: some View {
|
|
VStack(alignment: .leading, spacing: 12) {
|
|
row("Auth", value: authStatusLabel)
|
|
Divider()
|
|
row("API", value: healthLabel)
|
|
}
|
|
.padding()
|
|
.background(ZitareTheme.surface)
|
|
.clipShape(RoundedRectangle(cornerRadius: 12))
|
|
.overlay(
|
|
RoundedRectangle(cornerRadius: 12)
|
|
.stroke(ZitareTheme.border, lineWidth: 1)
|
|
)
|
|
}
|
|
|
|
private var aboutCard: some View {
|
|
VStack(alignment: .leading, spacing: 8) {
|
|
Text("Phase ζ-0 — Setup")
|
|
.font(.caption)
|
|
.foregroundStyle(ZitareTheme.mutedForeground)
|
|
Text(
|
|
"Diese App ist noch im Aufbau. Web-App live auf "
|
|
+ "zitare.com und zitare.mana.how. "
|
|
+ "Plan in mana/docs/playbooks/ZITARE_NATIVE_GREENFIELD.md."
|
|
)
|
|
.font(.footnote)
|
|
.foregroundStyle(ZitareTheme.foreground)
|
|
}
|
|
.padding()
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
}
|
|
|
|
private func row(_ label: String, value: String) -> some View {
|
|
HStack {
|
|
Text(label)
|
|
.foregroundStyle(ZitareTheme.mutedForeground)
|
|
Spacer()
|
|
Text(value)
|
|
.foregroundStyle(ZitareTheme.foreground)
|
|
.fontWeight(.medium)
|
|
}
|
|
}
|
|
|
|
private var authStatusLabel: String {
|
|
switch auth.status {
|
|
case .unknown: "—"
|
|
case .signedOut: "Nicht eingeloggt"
|
|
case .guest: "Gast"
|
|
case .signingIn: "Login läuft …"
|
|
case .twoFactorRequired: "2FA erforderlich"
|
|
case let .signedIn(email): email
|
|
case .error: "Fehler"
|
|
}
|
|
}
|
|
|
|
private var healthLabel: String {
|
|
switch healthStatus {
|
|
case .unknown: "—"
|
|
case .ok: "OK"
|
|
case .down: "nicht erreichbar"
|
|
}
|
|
}
|
|
}
|