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:
@@ -14,25 +14,56 @@ struct FeelsSubscriptionStoreView: View {
|
||||
|
||||
var body: some View {
|
||||
SubscriptionStoreView(groupID: IAPManager.subscriptionGroupID) {
|
||||
VStack(spacing: 16) {
|
||||
Image(systemName: "heart.fill")
|
||||
.font(.system(size: 60))
|
||||
.foregroundStyle(.pink)
|
||||
VStack(spacing: 20) {
|
||||
// App icon or logo
|
||||
ZStack {
|
||||
Circle()
|
||||
.fill(
|
||||
LinearGradient(
|
||||
colors: [.pink.opacity(0.3), .orange.opacity(0.2)],
|
||||
startPoint: .topLeading,
|
||||
endPoint: .bottomTrailing
|
||||
)
|
||||
)
|
||||
.frame(width: 100, height: 100)
|
||||
|
||||
Text(String(localized: "subscription_store_title"))
|
||||
.font(.title)
|
||||
.bold()
|
||||
Image(systemName: "heart.fill")
|
||||
.font(.system(size: 44))
|
||||
.foregroundStyle(
|
||||
LinearGradient(
|
||||
colors: [.pink, .red],
|
||||
startPoint: .top,
|
||||
endPoint: .bottom
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Text(String(localized: "subscription_store_subtitle"))
|
||||
.font(.body)
|
||||
.foregroundStyle(.secondary)
|
||||
.multilineTextAlignment(.center)
|
||||
VStack(spacing: 8) {
|
||||
Text("Unlock Premium")
|
||||
.font(.system(size: 28, weight: .bold, design: .rounded))
|
||||
|
||||
Text("Get unlimited access to all features")
|
||||
.font(.system(size: 16))
|
||||
.foregroundStyle(.secondary)
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
|
||||
// Feature highlights
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
FeatureHighlight(icon: "calendar", text: "Month & Year Views")
|
||||
FeatureHighlight(icon: "lightbulb.fill", text: "AI-Powered Insights")
|
||||
FeatureHighlight(icon: "photo.fill", text: "Photos & Journal Notes")
|
||||
FeatureHighlight(icon: "heart.fill", text: "Health Data Correlation")
|
||||
}
|
||||
.padding(.top, 8)
|
||||
}
|
||||
.padding()
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
}
|
||||
.subscriptionStoreControlStyle(.prominentPicker)
|
||||
.storeButton(.visible, for: .restorePurchases)
|
||||
.subscriptionStoreButtonLabel(.multiline)
|
||||
.tint(.pink)
|
||||
.onInAppPurchaseCompletion { _, result in
|
||||
if case .success(.success(_)) = result {
|
||||
dismiss()
|
||||
@@ -41,6 +72,26 @@ struct FeelsSubscriptionStoreView: View {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Feature Highlight Row
|
||||
struct FeatureHighlight: View {
|
||||
let icon: String
|
||||
let text: String
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 12) {
|
||||
Image(systemName: "checkmark.circle.fill")
|
||||
.font(.system(size: 18))
|
||||
.foregroundColor(.green)
|
||||
|
||||
Text(text)
|
||||
.font(.system(size: 15, weight: .medium))
|
||||
.foregroundColor(.primary)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
FeelsSubscriptionStoreView()
|
||||
.environmentObject(IAPManager())
|
||||
|
||||
Reference in New Issue
Block a user