Files
Reflect/Shared/Views/IAPWarningView.swift
Trey t bea2d3bbc9 Update Neon colors and show color circles in theme picker
- Update NeonMoodTint to use synthwave colors matching Neon voting style
  (cyan, lime, yellow, orange, magenta)
- Replace text label with 5 color circles in theme preview Colors row
- Remove unused textColor customization code and picker views
- Add .id(moodTint) to Month/Year views for color refresh
- Clean up various unused color-related code

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 00:08:01 -06:00

64 lines
2.0 KiB
Swift

//
// IAPWarningView.swift
// Feels
//
// Trial warning banner shown at bottom of Month/Year views.
//
import SwiftUI
struct IAPWarningView: View {
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
private var textColor: Color { theme.currentTheme.labelColor }
@ObservedObject var iapManager: IAPManager
@State private var showSubscriptionStore = false
var body: some View {
VStack(spacing: 8) {
HStack {
Image(systemName: "clock")
.foregroundColor(.orange)
if let expirationDate = iapManager.trialExpirationDate, expirationDate > Date() {
Text(String(localized: "iap_warning_view_title"))
.font(.body)
.foregroundColor(textColor)
Text(expirationDate, style: .relative)
.font(.body)
.bold()
.foregroundColor(.orange)
} else {
Text(String(localized: "purchase_view_trial_expired"))
.font(.body)
.bold()
.foregroundColor(.orange)
}
}
Button {
showSubscriptionStore = true
} label: {
Text(String(localized: "iap_warning_view_buy_button"))
.font(.headline)
.foregroundColor(.white)
.frame(maxWidth: .infinity)
.padding(.vertical, 12)
.background(RoundedRectangle(cornerRadius: 10).fill(Color.pink))
}
}
.padding()
.background(theme.currentTheme.secondaryBGColor)
.sheet(isPresented: $showSubscriptionStore) {
FeelsSubscriptionStoreView()
}
}
}
#Preview {
IAPWarningView(iapManager: IAPManager())
}