Files
FrenoCorp/Lendair/Views/SettingsView.swift
Michael Freno 90c79eb6d4 FRE-4955 Review silent active run for Code Reviewer
- FRE-4955: 9th stale-run eval for Code Reviewer zombie run , marked false positive
- FRE-4954: Investigation of Code Reviewer adapter reliability closed as done. Root cause: no heartbeat/adapter config. Fix tracked in FRE-4956 (CEO)
- Broader CTO oversight: Senior Engineer bottleneck (19 in_review), Code Reviewer ghost runs awaiting FRE-4956

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-10 01:43:53 -04:00

112 lines
3.3 KiB
Swift

import SwiftUI
struct SettingsView: View {
@StateObject private var authViewModel = AuthViewModel()
var body: some View {
List {
Section {
HStack {
Image(systemName: "person.circle")
.font(.system(size: 40))
.foregroundColor(.primary)
VStack(alignment: .leading) {
Text(authViewModel.userName ?? "User")
.font(.headline)
Text(authViewModel.userEmail ?? "email@example.com")
.font(.subheadline)
.foregroundColor(.secondary)
}
Spacer()
}
}
Section("About") {
HStack {
Text("Version")
Spacer()
Text(AppSettings.appVersion)
.foregroundColor(.secondary)
}
HStack {
Text("Build")
Spacer()
Text(AppSettings.buildNumber)
.foregroundColor(.secondary)
}
}
Section("Legal") {
Link(destination: AppSettings.termsOfServiceURL ?? URL(string: "about:blank")!) {
HStack {
Text("Terms of Service")
Spacer()
Image(systemName: "chevron.right")
.font(.caption)
.foregroundColor(.secondary)
}
}
Link(destination: AppSettings.privacyPolicyURL ?? URL(string: "about:blank")!) {
HStack {
Text("Privacy Policy")
Spacer()
Image(systemName: "chevron.right")
.font(.caption)
.foregroundColor(.secondary)
}
}
}
Section("Account") {
Button(action: {
authViewModel.logout()
}) {
HStack {
Image(systemName: "arrow.right.to.line")
Text("Log Out")
Spacer()
}
}
Button(role: .destructive, action: {
authViewModel.deleteAccount()
}) {
HStack {
Image(systemName: "trash")
Text("Delete Account")
Spacer()
}
}
}
}
.navigationTitle("Settings")
}
}
class AuthViewModel: ObservableObject {
@Published var userName: String?
@Published var userEmail: String?
func logout() {
// Implement logout logic
userName = nil
userEmail = nil
}
func deleteAccount() {
// Implement account deletion logic
userName = nil
userEmail = nil
}
}
#Preview {
NavigationView {
SettingsView()
}
}