Skip to content

Feat: add profile screen#92

Merged
destucr merged 5 commits intodevelopmentfrom
feat/profile
Nov 27, 2025
Merged

Feat: add profile screen#92
destucr merged 5 commits intodevelopmentfrom
feat/profile

Conversation

@destucr
Copy link
Contributor

@destucr destucr commented Nov 27, 2025

🎯 Summary

This pull request introduces comprehensive user profile management features and improves localization and UI for the profile experience. The implementation includes new managers and view models for handling user data persistence, UI updates to integrate profile functionality into the timeline view, extensive localization support, new color assets for consistent theming, and updated project settings for required permissions.

✨ Features/Changes

  • Implemented user profile management system with local data persistence and image storage
  • Added profile button with user avatar to the pregnancy timeline view
  • Integrated sign-in/sign-out functionality with profile state management
  • Added comprehensive localization strings for profile-related UI elements
  • Introduced new color assets for consistent theming across profile and timeline UI
  • Updated project configuration with required privacy permissions for camera and photo library access

📁 Files Changed

  • UserProfileManager.swift - Added singleton manager for user profile data (name, email, sign-in state, profile image) with local persistence and disk storage
  • ProfileViewModel.swift - Added view model to bind user profile data and actions to SwiftUI views
  • PregnancyTimelineView.swift - Added profile button in top bar that displays user image or placeholder and navigates to ProfileView
  • Localizable.xcstrings - Added profile-related localization strings (photo labels, edit actions, sign-in/out, privacy policy, terms, theme, tutorial, confirmation dialogs)
  • mainViolet.colorset - Added new color asset for consistent profile UI theming
  • rowProfileGrey.colorset - Added new color asset for profile row backgrounds
  • project.pbxproj - Updated project configuration with new files and settings
  • Info.plist - Added privacy usage descriptions for camera and photo library, clarified encryption settings

🔧 Usage Examples (if applicable)

// Access user profile manager
let profileManager = UserProfileManager.shared

// Update user profile
profileManager.userName = "John Doe"
profileManager.userEmail = "john@example.com"
profileManager.saveProfileImage(image)

// Sign in/out
profileManager.signIn()
profileManager.signOut()

// Use in SwiftUI view
struct ProfileView: View {
    @StateObject private var viewModel = ProfileViewModel()
    
    var body: some View {
        VStack {
            if let image = viewModel.profileImage {
                Image(uiImage: image)
                    .resizable()
                    .clipShape(Circle())
            }
            Text(viewModel.userName)
        }
    }
}

@destucr destucr merged commit 71236ef into development Nov 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant