Commit 6fa43a3d81

6fa43a3d81440242a647c235bf3a7f9fbc11426c

parent: 15d73b1f0d

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-25 23:52 UTC

orgstar+ screen: error and retry instead of a spinner

The plans show a spinner only while they load. When the App Store can't be
reached, or some plans are missing, the error shows in their place with
Try Again, as the tip section does.

Ref #222

Layout: unified · split

Sources/OrgstarMobile/ProScreen.swift +9 −3 · view
@@ -66,10 +66,13 @@ struct ProScreen: View {
6666 } footer: {
6767 Text("Editing, the agenda, capture, clocking, tables and search stay free.")
6868 }
69 if access.grant != .grandfathered, store.activeProductID != ProStore.lifetime {
69 if showsPlans {
7070 Section {
71 if store.products.isEmpty {
71 if store.isLoading && store.products.isEmpty {
7272 ProgressView().frame(maxWidth: .infinity)
73 } else if store.products.count < ProStore.productIDs.count, let message = store.message {
74 Text(message).foregroundStyle(.secondary)
75 Button("Try Again") { Task { await store.loadProducts() } }
7376 }
7477 ForEach(store.products) { product in
7578 Button { Task { await store.buy(product) } } label: { plan(product) }
@@ -90,7 +93,8 @@ struct ProScreen: View {
9093 Link("Terms of Use", destination: URL(string: "https://www.apple.com/legal/internet-services/itunes/dev/stdeula/")!)
9194 Link("Privacy Policy", destination: URL(string: "https://krz.sh/privacy/orgstar/")!)
9295 }
93 if let message = store.message {
96 // A purchase's or restore's message; a failed load shows under the plans.
97 if let message = store.message, !showsPlans || store.products.count == ProStore.productIDs.count {
9498 Section { Text(message).foregroundStyle(.secondary) }
9599 }
96100 }
@@ -100,6 +104,8 @@ struct ProScreen: View {
100104 .task { await store.loadProducts() }
101105 }
102106
107 private var showsPlans: Bool { access.grant != .grandfathered && store.activeProductID != ProStore.lifetime }
108
103109 /// One plan: its name, an optional savings tag, what it bills, and its price.
104110 private func plan(_ product: Product) -> some View {
105111 HStack(alignment: .firstTextBaseline) {
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form