Add Insights tab with 60+ randomized analytics
New Insights tab between Year and Customize with: - 20 insight generators producing 60+ unique insights - 5 random insights selected per section (month, year, all-time) - Categories: dominant mood, streaks, trends, positivity score, weekend vs weekday, mood swings, milestones, patterns, and more - Collapsible sections with mood-colored cards - Subscription paywall support - English and Spanish localization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,25 +19,31 @@ struct MainTabView: View {
|
||||
let dayView: DayView
|
||||
let monthView: MonthView
|
||||
let yearView: YearView
|
||||
let insightsView: InsightsView
|
||||
let customizeView: CustomizeView
|
||||
|
||||
|
||||
var body: some View {
|
||||
return TabView {
|
||||
dayView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_main"), systemImage: "list.dash")
|
||||
}
|
||||
|
||||
|
||||
monthView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_month"), systemImage: "calendar")
|
||||
}
|
||||
|
||||
|
||||
yearView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_filter"), systemImage: "line.3.horizontal.decrease.circle")
|
||||
}
|
||||
|
||||
|
||||
insightsView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_insights"), systemImage: "lightbulb.fill")
|
||||
}
|
||||
|
||||
customizeView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_customize"), systemImage: "pencil")
|
||||
@@ -81,8 +87,9 @@ struct MainTabView: View {
|
||||
struct MainTabView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
MainTabView(dayView: DayView(viewModel: DayViewViewModel(addMonthStartWeekdayPadding: false)),
|
||||
monthView: MonthView(viewModel: DayViewViewModel(addMonthStartWeekdayPadding: true)),
|
||||
monthView: MonthView(viewModel: DayViewViewModel(addMonthStartWeekdayPadding: true)),
|
||||
yearView: YearView(viewModel: YearViewModel()),
|
||||
insightsView: InsightsView(),
|
||||
customizeView: CustomizeView())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user