Files
Outpost/Outpost/Features/Account/ProfileView.swift
T
Puranjay Savar Mattas ef085f0018 feat(account): add account menu, about panel, and preferences (macOS)
Sidebar footer opens a popover (not Menu — its AppKit-bridged label
rendering broke on click with an avatar image in it) with profile,
keyboard shortcuts, docs/feedback links, and log out. About panel and
a minimal Preferences window round out the app-menu affordances.
2026-08-14 00:24:30 +01:00

38 lines
1.0 KiB
Swift

#if os(macOS)
import SwiftUI
struct ProfileView: View {
@Environment(SessionStore.self) private var session
@Environment(\.dismiss) private var dismiss
var body: some View {
VStack(spacing: 16) {
AvatarBadge(avatarURL: session.userAvatarURL, size: 64, placeholderSystemImage: "person.crop.circle.fill")
VStack(spacing: 4) {
Text(session.userName ?? "Unknown")
.font(.title3.bold())
if let email = session.userEmail {
Text(email)
.font(.callout)
.foregroundStyle(.secondary)
}
}
if let teamName = session.teamName {
Label(teamName, systemImage: "building.2")
.font(.callout)
.foregroundStyle(.secondary)
}
Button("Done") {
dismiss()
}
.keyboardShortcut(.defaultAction)
}
.padding(32)
.frame(width: 300)
}
}
#endif