Organized view components by extracting composables and views into separate files following single responsibility principle. iOS Changes: - Split MainTabView → extracted ProfileTabView - Split CompleteTaskView → extracted ImageThumbnailView, CameraPickerView - Split ManageUsersView → extracted ShareCodeCard, UserListItem - Consolidated task action buttons into single TaskActionButtons.swift file - Split HomeScreenView → extracted OverviewCard, StatView, HomeNavigationCard - Split AllTasksView → extracted DynamicTaskColumnView, DynamicTaskCard - Split ContentView → extracted ComposeView, CustomView Android Changes: - Split ResetPasswordScreen → extracted RequirementItem component - Split TasksScreen → extracted TaskPill component - Created TaskDisplayUtils for shared helper functions (getIconFromName, hexToColor) All extracted components properly organized in: - iOS: Subviews/Common, Subviews/Task, Subviews/Residence, Profile - Android: ui/components/auth, ui/components/task, ui/utils 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
72 lines
2.2 KiB
Swift
72 lines
2.2 KiB
Swift
import SwiftUI
|
|
|
|
struct ProfileTabView: View {
|
|
@EnvironmentObject var loginViewModel: LoginViewModel
|
|
@State private var showingProfileEdit = false
|
|
|
|
var body: some View {
|
|
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("Account") {
|
|
Button(action: {
|
|
showingProfileEdit = true
|
|
}) {
|
|
Label("Edit Profile", systemImage: "person.crop.circle")
|
|
.foregroundColor(.primary)
|
|
}
|
|
|
|
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")
|
|
.sheet(isPresented: $showingProfileEdit) {
|
|
ProfileView()
|
|
}
|
|
}
|
|
}
|