diff options
| author | Christian Cleberg <[email protected]> | 2026-04-25 00:03:59 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-25 00:03:59 -0500 |
| commit | fd34553ab0e63b4d3bc22532b61f4fef32846f34 (patch) | |
| tree | 1317656b64970b113e195dcb29d71e443eb4354d /DomainDig/RootTabView.swift | |
| parent | 3f0b7746b1bee4c2f626eb805e3fd13c5f2f5d22 (diff) | |
| download | domain-dig-fd34553ab0e63b4d3bc22532b61f4fef32846f34.tar.gz domain-dig-fd34553ab0e63b4d3bc22532b61f4fef32846f34.tar.bz2 domain-dig-fd34553ab0e63b4d3bc22532b61f4fef32846f34.zip | |
DomainDig v3.9.0 — Portfolio Dashboard
* Portfolio summary cards
* Recent activity feed across tracked domains
* Attention-required queue prioritized by severity
* Certificate expiry visibility and expiring-soon section
* Quick portfolio filters for triage
* Deterministic per-domain health scoring
* Local portfolio search
* Apex-domain grouping for tracked assets
Diffstat (limited to 'DomainDig/RootTabView.swift')
| -rw-r--r-- | DomainDig/RootTabView.swift | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/DomainDig/RootTabView.swift b/DomainDig/RootTabView.swift index 06a9352..cba1062 100644 --- a/DomainDig/RootTabView.swift +++ b/DomainDig/RootTabView.swift @@ -1,31 +1,28 @@ import SwiftUI +private enum RootTab: Hashable { + case dashboard + case history + case inspect + case settings +} + struct RootTabView: View { @Bindable var viewModel: DomainViewModel @State private var purchaseService = PurchaseService.shared + @State private var selectedTab: RootTab = FeatureAccessService.currentTier == .free ? .inspect : .dashboard var body: some View { let _ = purchaseService.currentTier - TabView { - ContentView(viewModel: viewModel) - .tabItem { - Label("Inspect", systemImage: "magnifyingglass") - } - + TabView(selection: $selectedTab) { NavigationStack { - WatchlistView(viewModel: viewModel) + DashboardView(viewModel: viewModel) } .tabItem { - Label("Watchlist", systemImage: "eye") - } - - NavigationStack { - MonitoringView(viewModel: viewModel) - } - .tabItem { - Label("Monitoring", systemImage: "waveform.path.ecg") + Label("Dashboard", systemImage: "square.grid.2x2") } + .tag(RootTab.dashboard) NavigationStack { HistoryView(viewModel: viewModel) @@ -33,13 +30,21 @@ struct RootTabView: View { .tabItem { Label("History", systemImage: "clock.arrow.trianglehead.counterclockwise.rotate.90") } + .tag(RootTab.history) + + ContentView(viewModel: viewModel) + .tabItem { + Label("Inspect", systemImage: "magnifyingglass") + } + .tag(RootTab.inspect) NavigationStack { SettingsView(viewModel: viewModel) } .tabItem { - Label("More", systemImage: "ellipsis.circle") + Label("Settings", systemImage: "gearshape") } + .tag(RootTab.settings) } .sheet(isPresented: Binding( get: { viewModel.isPaywallPresented }, @@ -63,5 +68,10 @@ struct RootTabView: View { } ) } + .onChange(of: purchaseService.currentTier) { _, newValue in + if newValue != .free, selectedTab == .inspect, viewModel.trackedDomains.isEmpty == false { + selectedTab = .dashboard + } + } } } |
