mirror of
https://github.com/we-promise/sure.git
synced 2026-09-06 07:11:14 +00:00
* Add Swift-native Sure app * Fix push subscriptions schema for CI * Address native app review feedback * Address remaining native app review feedback * Use Flutter app logo for native icon * Honor insight notification preferences and locale --------- Co-authored-by: Juan Jose Mata <2v8shcb6pz@privaterelay.appleid.com> Co-authored-by: sure-admin <sure-admin@splashblot.com>
30 lines
850 B
Swift
30 lines
850 B
Swift
import SwiftUI
|
|
|
|
struct SureMainTabView: View {
|
|
@Environment(SureStore.self) private var store
|
|
|
|
var body: some View {
|
|
@Bindable var store = store
|
|
TabView(selection: $store.selectedTab) {
|
|
SureOverviewView()
|
|
.tabItem { Label("Overview", systemImage: "square.grid.2x2.fill") }
|
|
.tag(SureTab.overview)
|
|
|
|
SureAccountsView()
|
|
.tabItem { Label("Accounts", systemImage: "building.columns.fill") }
|
|
.tag(SureTab.accounts)
|
|
|
|
SureBudgetsView()
|
|
.tabItem { Label("Budgets", systemImage: "chart.pie.fill") }
|
|
.tag(SureTab.budgets)
|
|
|
|
SureAssistantView()
|
|
.tabItem { Label("Assistant", systemImage: "sparkles") }
|
|
.tag(SureTab.assistant)
|
|
}
|
|
.onReceive(NotificationCenter.default.publisher(for: .sureOpenInsights)) { _ in
|
|
store.selectedTab = .overview
|
|
}
|
|
}
|
|
}
|