Files
pulse-mobile/PulseHealth/Views/MainTabView.swift
Cosmo e7af51af10 feat: full Pulse Mobile implementation - all modules
- Phase 0: project.yml fixes (CODE_SIGN_ENTITLEMENTS confirmed)
- Phase 1: Enhanced models (HabitModels, TaskModels, FinanceModels, SavingsModels, UserModels)
- Phase 1: Enhanced APIService with all endpoints (habits/log/stats, tasks/uncomplete, finance/analytics, savings/*)
- Phase 2: DashboardView rewrite - day progress bar, 4 stat cards, habit/task lists with Undo (3 sec)
- Phase 3: TrackerView - HabitListView (streak badge, swipe delete, archive), TaskListView (priority, overdue), StatisticsView (heatmap 84 days, line chart, bar chart via Swift Charts)
- Phase 4: FinanceView rewrite - month picker, summary card, top expenses progress bars, pie chart, line chart, transactions by day, analytics tab with bar chart + month comparison
- Phase 5: SavingsView rewrite - overview with overdue block, categories tab with type icons, operations tab with category filter + add sheet
- Phase 6: SettingsView - dark/light theme, profile edit, telegram chat id, notifications toggle + time, timezone picker, logout
- Added: AddHabitView with weekly day selector + interval days
- Added: AddTaskView with icon/color/due date picker
- Haptic feedback on all toggle actions
2026-03-25 17:14:59 +00:00

34 lines
1.0 KiB
Swift

import SwiftUI
struct MainTabView: View {
@EnvironmentObject var authManager: AuthManager
@AppStorage("colorScheme") private var colorSchemeRaw: String = "dark"
var preferredColorScheme: ColorScheme? {
colorSchemeRaw == "light" ? .light : .dark
}
var body: some View {
TabView {
DashboardView()
.tabItem { Label("Главная", systemImage: "house.fill") }
TrackerView()
.tabItem { Label("Трекер", systemImage: "chart.bar.fill") }
if authManager.userId == 1 {
FinanceView()
.tabItem { Label("Финансы", systemImage: "creditcard.fill") }
}
SavingsView()
.tabItem { Label("Накопления", systemImage: "building.columns.fill") }
SettingsView()
.tabItem { Label("Настройки", systemImage: "gearshape.fill") }
}
.accentColor(Color(hex: "0D9488"))
.preferredColorScheme(preferredColorScheme)
}
}