Settings: echtes Profil via /api/auth/me (Rolle, Founder, Abo, Avatar)

Login liefert nur {token, name, is_premium}. Für Admin-/Founder-/Tier-Info
holen wir nach Login (und beim Erscheinen von MainTabView) /api/auth/me und
zeigen ein echtes Profil mit Avatar, Email, Rolle und nur dann Premium-Status,
wenn das relevant ist.
This commit is contained in:
rene 2026-05-30 09:37:12 +02:00
parent 81681130e6
commit bfd327bd40
4 changed files with 126 additions and 3 deletions

View file

@ -1,6 +1,8 @@
import SwiftUI
struct MainTabView: View {
@Environment(AuthSession.self) private var auth
var body: some View {
TabView {
RoutesListView()
@ -12,5 +14,6 @@ struct MainTabView: View {
SettingsView()
.tabItem { Label("Mehr", systemImage: "person.crop.circle") }
}
.task { await auth.loadProfile() }
}
}