import ManaCore import SwiftUI struct AccountView: View { @Environment(AuthClient.self) private var auth var body: some View { ZStack { CardsTheme.background.ignoresSafeArea() VStack(spacing: 24) { Image(systemName: "person.crop.circle.fill") .resizable() .frame(width: 80, height: 80) .foregroundStyle(CardsTheme.primary) if let email = auth.currentEmail { Text(email) .font(.headline) .foregroundStyle(CardsTheme.foreground) } Spacer() Button(role: .destructive) { Task { await auth.signOut() } } label: { Text("Abmelden") .frame(maxWidth: .infinity) .padding(.vertical, 12) .background(CardsTheme.error.opacity(0.1), in: RoundedRectangle(cornerRadius: 8)) .foregroundStyle(CardsTheme.error) } .padding(.horizontal, 32) } .padding(.top, 48) } .navigationTitle("Account") #if os(iOS) .navigationBarTitleDisplayMode(.inline) #endif } } #Preview { NavigationStack { AccountView() .environment(AuthClient(config: AppConfig.manaAppConfig)) } }