Merge branch 'main' of github.com:akatreyt/Feels

This commit is contained in:
Trey t
2026-04-04 13:40:42 -05:00
41 changed files with 427 additions and 107 deletions

View File

@@ -13,6 +13,10 @@ enum InsightsTab: String, CaseIterable {
}
struct InsightsView: View {
private enum AnimationConstants {
static let refreshDelay: UInt64 = 500_000_000 // 0.5 seconds in nanoseconds
}
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
@AppStorage(UserDefaultsStore.Keys.moodTint.rawValue, store: GroupUserDefaults.groupDefaults) private var moodTint: MoodTints = .Default
@AppStorage(UserDefaultsStore.Keys.moodImages.rawValue, store: GroupUserDefaults.groupDefaults) private var imagePack: MoodImages = .FontAwesome
@@ -42,6 +46,7 @@ struct InsightsView: View {
HStack(spacing: 4) {
Image(systemName: "sparkles")
.font(.caption.weight(.medium))
.accessibilityHidden(true)
Text("AI")
.font(.caption.weight(.semibold))
}
@@ -183,7 +188,7 @@ struct InsightsView: View {
.refreshable {
viewModel.refreshInsights()
// Small delay to show refresh animation
try? await Task.sleep(nanoseconds: 500_000_000)
try? await Task.sleep(nanoseconds: AnimationConstants.refreshDelay)
}
.disabled(iapManager.shouldShowPaywall)
}
@@ -252,6 +257,7 @@ struct InsightsView: View {
Image(systemName: "sparkles")
.font(.largeTitle)
.accessibilityHidden(true)
.foregroundStyle(
LinearGradient(
colors: [.purple, .blue],
@@ -281,6 +287,7 @@ struct InsightsView: View {
} label: {
HStack {
Image(systemName: "sparkles")
.accessibilityHidden(true)
Text("Get Personal Insights")
}
.font(.headline.weight(.bold))