Add premium features and reorganize Settings tab

Premium Features:
- Journal notes and photo attachments for mood entries
- Data export (CSV and PDF reports)
- Privacy lock with Face ID/Touch ID
- Apple Health integration for mood correlation
- 4 new personality packs (Motivational Coach, Zen Master, Best Friend, Data Analyst)

Settings Tab Reorganization:
- Combined Customize and Settings into single tab with segmented control
- Added upgrade banner with trial countdown above segment
- "Why Upgrade?" sheet showing all premium benefits
- Subscribe button opens improved StoreKit 2 subscription view

UI Improvements:
- Enhanced subscription store with feature highlights
- Entry detail view for viewing/editing notes and photos
- Removed duplicate subscription banners from tab content

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-13 12:22:06 -06:00
parent 6c92cf4ec3
commit 920aaee35c
26 changed files with 4295 additions and 99 deletions

View File

@@ -0,0 +1,105 @@
//
// LockScreenView.swift
// Feels
//
// Lock screen shown when privacy lock is enabled and app needs authentication.
//
import SwiftUI
struct LockScreenView: View {
@ObservedObject var authManager: BiometricAuthManager
@State private var showError = false
var body: some View {
ZStack {
// Background gradient
LinearGradient(
colors: [
Color(.systemBackground),
Color(.systemGray6)
],
startPoint: .top,
endPoint: .bottom
)
.ignoresSafeArea()
VStack(spacing: 40) {
Spacer()
// App icon / lock icon
VStack(spacing: 20) {
Image(systemName: "lock.fill")
.font(.system(size: 60))
.foregroundStyle(.secondary)
Text("Feels is Locked")
.font(.title2)
.fontWeight(.semibold)
Text("Authenticate to access your mood data")
.font(.subheadline)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
}
Spacer()
// Unlock button
Button {
Task {
let success = await authManager.authenticate()
if !success {
showError = true
}
}
} label: {
HStack(spacing: 12) {
Image(systemName: authManager.biometricIcon)
.font(.title2)
Text("Unlock with \(authManager.biometricName)")
.fontWeight(.medium)
}
.frame(maxWidth: .infinity)
.padding(.vertical, 16)
.background(Color.accentColor)
.foregroundColor(.white)
.clipShape(RoundedRectangle(cornerRadius: 14))
}
.disabled(authManager.isAuthenticating)
.padding(.horizontal, 40)
// Passcode fallback hint
if authManager.canUseDevicePasscode {
Text("Or use your device passcode")
.font(.caption)
.foregroundStyle(.tertiary)
}
Spacer()
.frame(height: 60)
}
.padding()
}
.alert("Authentication Failed", isPresented: $showError) {
Button("Try Again") {
Task {
await authManager.authenticate()
}
}
Button("Cancel", role: .cancel) { }
} message: {
Text("Unable to verify your identity. Please try again.")
}
.onAppear {
// Auto-trigger authentication on appear
if !authManager.isUnlocked && !authManager.isAuthenticating {
Task {
await authManager.authenticate()
}
}
}
}
}