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
This commit is contained in:
@@ -2,28 +2,32 @@ 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") }
|
||||
|
||||
TasksView()
|
||||
.tabItem { Label("Задачи", systemImage: "checkmark.circle.fill") }
|
||||
TrackerView()
|
||||
.tabItem { Label("Трекер", systemImage: "chart.bar.fill") }
|
||||
|
||||
HabitsView()
|
||||
.tabItem { Label("Привычки", systemImage: "flame.fill") }
|
||||
|
||||
HealthView()
|
||||
.tabItem { Label("Здоровье", systemImage: "heart.fill") }
|
||||
if authManager.userId == 1 {
|
||||
FinanceView()
|
||||
.tabItem { Label("Финансы", systemImage: "creditcard.fill") }
|
||||
}
|
||||
|
||||
SavingsView()
|
||||
.tabItem { Label("Накопления", systemImage: "chart.bar.fill") }
|
||||
.tabItem { Label("Накопления", systemImage: "building.columns.fill") }
|
||||
|
||||
ProfileView()
|
||||
.tabItem { Label("Профиль", systemImage: "person.fill") }
|
||||
SettingsView()
|
||||
.tabItem { Label("Настройки", systemImage: "gearshape.fill") }
|
||||
}
|
||||
.accentColor(Color(hex: "00d4aa"))
|
||||
.preferredColorScheme(.dark)
|
||||
.accentColor(Color(hex: "0D9488"))
|
||||
.preferredColorScheme(preferredColorScheme)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user