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

@@ -8,8 +8,89 @@
import SwiftUI
import StoreKit
// MARK: - Customize Content View (for use in SettingsTabView)
struct CustomizeContentView: View {
@Environment(\.colorScheme) private var colorScheme
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
var body: some View {
ScrollView {
VStack(spacing: 24) {
// APPEARANCE
SettingsSection(title: "Appearance") {
VStack(spacing: 16) {
// Theme
SettingsRow(title: "Theme") {
ThemePickerCompact()
}
Divider()
// Text Color
SettingsRow(title: "Text Color") {
TextColorPickerCompact()
}
}
}
// MOOD STYLE
SettingsSection(title: "Mood Style") {
VStack(spacing: 16) {
// Icon Style
SettingsRow(title: "Icons") {
ImagePackPickerCompact()
}
Divider()
// Mood Colors
SettingsRow(title: "Colors") {
TintPickerCompact()
}
Divider()
// Day View Style
SettingsRow(title: "Entry Style") {
DayViewStylePickerCompact()
}
Divider()
// Voting Layout
SettingsRow(title: "Voting Layout") {
VotingLayoutPickerCompact()
}
}
}
// WIDGETS
SettingsSection(title: "Widgets") {
CustomWidgetSection()
}
// NOTIFICATIONS
SettingsSection(title: "Notifications") {
PersonalityPackPickerCompact()
}
// FILTERS
SettingsSection(title: "Day Filter") {
DayFilterPickerCompact()
}
}
.padding(.horizontal, 16)
.padding(.bottom, 32)
}
.onAppear(perform: {
EventLogger.log(event: "show_customize_view")
})
}
}
// MARK: - Legacy CustomizeView (kept for backwards compatibility)
struct CustomizeView: View {
@State private var showSettings = false
@State private var showSubscriptionStore = false
@EnvironmentObject var iapManager: IAPManager
@Environment(\.colorScheme) private var colorScheme
@@ -27,9 +108,6 @@ struct CustomizeView: View {
SubscriptionBannerView(showSubscriptionStore: $showSubscriptionStore)
.environmentObject(iapManager)
// Preview showing current style
// SampleEntryView()
// APPEARANCE
SettingsSection(title: "Appearance") {
VStack(spacing: 16) {
@@ -99,9 +177,6 @@ struct CustomizeView: View {
.onAppear(perform: {
EventLogger.log(event: "show_customize_view")
})
.sheet(isPresented: $showSettings) {
SettingsView()
}
.sheet(isPresented: $showSubscriptionStore) {
FeelsSubscriptionStoreView()
}
@@ -118,14 +193,6 @@ struct CustomizeView: View {
.foregroundColor(textColor)
Spacer()
Button(action: {
showSettings.toggle()
}) {
Image(systemName: "gear")
.font(.system(size: 20))
.foregroundColor(textColor.opacity(0.6))
}
}
.padding(.top, 8)
}