This commit is contained in:
Trey t
2025-11-05 10:38:46 -06:00
parent 025fcf677a
commit 2be3a5a3a8
23 changed files with 2837 additions and 124 deletions

View File

@@ -0,0 +1,100 @@
import SwiftUI
struct MainTabView: View {
@StateObject private var loginViewModel = LoginViewModel()
@State private var selectedTab = 0
var body: some View {
TabView(selection: $selectedTab) {
NavigationView {
ResidencesListView()
}
.tabItem {
Label("Residences", systemImage: "house.fill")
}
.tag(0)
Text("Tasks (Coming Soon)")
.tabItem {
Label("Tasks", systemImage: "checkmark.circle.fill")
}
.tag(1)
ProfileView()
.tabItem {
Label("Profile", systemImage: "person.fill")
}
.tag(2)
}
}
}
struct ProfileView: View {
@StateObject private var loginViewModel = LoginViewModel()
@Environment(\.dismiss) var dismiss
var body: some View {
NavigationView {
List {
Section {
HStack {
Image(systemName: "person.circle.fill")
.resizable()
.frame(width: 60, height: 60)
.foregroundColor(.blue)
VStack(alignment: .leading, spacing: 4) {
Text("User Profile")
.font(.headline)
Text("Manage your account")
.font(.caption)
.foregroundColor(.secondary)
}
}
.padding(.vertical, 8)
}
Section("Settings") {
NavigationLink(destination: Text("Account Settings")) {
Label("Account Settings", systemImage: "gear")
}
NavigationLink(destination: Text("Notifications")) {
Label("Notifications", systemImage: "bell")
}
NavigationLink(destination: Text("Privacy")) {
Label("Privacy", systemImage: "lock.shield")
}
}
Section {
Button(action: {
loginViewModel.logout()
}) {
Label("Log Out", systemImage: "rectangle.portrait.and.arrow.right")
.foregroundColor(.red)
}
}
Section {
VStack(alignment: .leading, spacing: 4) {
Text("MyCrib")
.font(.caption)
.fontWeight(.semibold)
Text("Version 1.0.0")
.font(.caption2)
.foregroundColor(.secondary)
}
}
}
.navigationTitle("Profile")
}
}
}
#Preview {
MainTabView()
}