Commit 0e4f9c4ea6

0e4f9c4ea6acb3dd5ea6834c8c08004fef1948a8

parent: 65a97fc9c9

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-14 02:50 UTC

Rename orgstar Pro to orgstar+; gold banner at top of Settings and a redesigned orgstar+ screen

Layout: unified · split

README.org +4 −4
@@ -59,18 +59,18 @@ or download the notarized DMG from the
5959[[https://gitbay.org/krz/orgstar/releases][releases page]]. The iPhone and iPad app (iOS 26
6060or later), with its Apple Watch app, is on the [[https://apps.apple.com/us/app/orgstar-org-mode-agenda/id6821552018][App Store]].
6161
62** orgstar Pro
62** orgstar+
6363Editing, the agenda, capture, clocking, tables, search, and HTML and Markdown export are
64free. Pro adds running and tangling source blocks; PDF, LaTeX, ODT, Word and rich-text export
64free. orgstar+ adds running and tangling source blocks; PDF, LaTeX, ODT, Word and rich-text export
6565and publishing; encrypting entries (decrypting stays free); org-roam nodes, daily notes and
6666backlinks; widgets, the Apple Watch app and the clock Live Activity; Calendar and Reminders in
6767the agenda; and Shortcuts actions.
6868
6969- iPhone and iPad: in-app, $1.99 a month, $19.99 a year or $39.99 once.
7070- Mac: $39.99 once, for a license key from [[https://krz.sh/apps/orgstar/buy][krz.sh/apps/orgstar/buy]], entered in
71 Settings ▸ Pro.
71 Settings ▸ orgstar+.
7272
73Anyone who installed orgstar before Pro keeps every feature without buying it.
73Anyone who installed orgstar before orgstar+ keeps every feature without buying it.
7474
7575To build from source, contribute or release (the Mac app and the App Store), see
7676[[file:CONTRIBUTING.org]].
Sources/OrgApp/ProAccess.swift +1 −1
@@ -1,7 +1,7 @@
11import Foundation
22import Observation
33
4/// Features that need orgstar Pro.
4/// Features that need orgstar+.
55public enum ProFeature: String, CaseIterable, Sendable, Identifiable {
66 case babel, export, encryption, roam
77 case widgets, watch, liveActivity, calendar, shortcuts
Sources/OrgWatchData/WatchAgenda.swift +1 −1
@@ -74,7 +74,7 @@ public struct WatchAgenda: Codable, Equatable, Sendable {
7474 public var clock: Clock?
7575 /// The most recently clocked entry, `org-clock-in-last`'s.
7676 public var lastClocked: String?
77 /// True when the phone hasn't got orgstar Pro, which the Watch app needs.
77 /// True when the phone hasn't got orgstar+, which the Watch app needs.
7878 public var locked: Bool?
7979
8080 /// What the phone sends without Pro: no entries.
Sources/Orgstar/CaptureIntent.swift +1 −1
@@ -26,7 +26,7 @@ struct CaptureIntent: AppIntent {
2626 @MainActor
2727 func perform() async throws -> some IntentResult & ReturnsValue<String> & ProvidesDialog {
2828 // Launched for the intent, the window sets the models up shortly.
29 guard ProAccess.shared.isUnlocked else { throw Failure(message: "Shortcuts actions need orgstar Pro") }
29 guard ProAccess.shared.isUnlocked else { throw Failure(message: "Shortcuts actions need orgstar+") }
3030 for _ in 0..<50 where Self.environment == nil { try? await Task.sleep(for: .milliseconds(100)) }
3131 guard let (workspace, session, clock, commands) = Self.environment else { throw Failure(message: "orgstar isn't ready") }
3232 let placed = session.capture(
Sources/Orgstar/OrgstarApp.swift +3 −3
@@ -650,7 +650,7 @@ struct SettingsView: View {
650650 Tab("Appearance", systemImage: "paintpalette", value: "appearance") { appearance }
651651 Tab("Agenda", systemImage: "calendar", value: "agenda") { agenda }
652652 Tab("Capture", systemImage: "tray.and.arrow.down", value: "capture") { capture }
653 Tab("Pro", systemImage: "star", value: "pro") { LicenseForm() }
653 Tab("orgstar+", systemImage: "star", value: "pro") { LicenseForm() }
654654 }
655655 .frame(width: 600)
656656 }
@@ -846,7 +846,7 @@ struct SettingsView: View {
846846 Section {
847847 Toggle("Show events from Calendar", isOn: $calendarEvents)
848848 .disabled(!ProAccess.shared.isUnlocked && !calendarEvents)
849 .help(ProAccess.shared.isUnlocked ? "" : "Needs orgstar Pro")
849 .help(ProAccess.shared.isUnlocked ? "" : "Needs orgstar+")
850850 if calendarEvents {
851851 choices(calendars, empty: CalendarEvents.isAuthorized ? "No calendars." : "Allow orgstar to read your calendars in System Settings ▸ Privacy & Security ▸ Calendars.", setting: $calendarEventCalendars)
852852 }
@@ -861,7 +861,7 @@ struct SettingsView: View {
861861 Section {
862862 Toggle("Show reminders from Reminders", isOn: $agendaReminders)
863863 .disabled(!ProAccess.shared.isUnlocked && !agendaReminders)
864 .help(ProAccess.shared.isUnlocked ? "" : "Needs orgstar Pro")
864 .help(ProAccess.shared.isUnlocked ? "" : "Needs orgstar+")
865865 if agendaReminders {
866866 choices(reminderLists, empty: ReminderLists.isAuthorized ? "No lists." : "Allow orgstar to read your reminders in System Settings ▸ Privacy & Security ▸ Reminders.", setting: $agendaReminderLists)
867867 }
Sources/Orgstar/ProLicense.swift +7 −7
@@ -29,11 +29,11 @@ struct LicenseForm: View {
2929 Section {
3030 switch access.grant {
3131 case .license:
32 LabeledContent("orgstar Pro", value: license.map { "Licensed to \($0.email)" } ?? "Licensed")
32 LabeledContent("orgstar+", value: license.map { "Licensed to \($0.email)" } ?? "Licensed")
3333 case .grandfathered:
34 LabeledContent("orgstar Pro", value: "Included: you used orgstar before Pro")
34 LabeledContent("orgstar+", value: "Included: you used orgstar before orgstar+")
3535 case .purchase, nil:
36 LabeledContent("orgstar Pro", value: "Not licensed")
36 LabeledContent("orgstar+", value: "Not licensed")
3737 }
3838 }
3939 if access.grant != .license {
@@ -44,7 +44,7 @@ struct LicenseForm: View {
4444 .onSubmit(activate)
4545 if let error { Text(error).foregroundStyle(.red) }
4646 HStack {
47 Link("Buy orgstar Pro…", destination: MacPro.buyURL)
47 Link("Buy orgstar+…", destination: MacPro.buyURL)
4848 Spacer()
4949 Button("Activate", action: activate).disabled(key.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)
5050 }
@@ -60,7 +60,7 @@ struct LicenseForm: View {
6060 }
6161 }
6262 }
63 Section("Included in Pro") {
63 Section("Included in orgstar+") {
6464 ForEach(ProFeature.macFeatures) { feature in
6565 Label(feature.title, systemImage: feature.systemImage)
6666 }
@@ -91,8 +91,8 @@ struct ProPaywallSheet: View {
9191 var body: some View {
9292 VStack(alignment: .leading, spacing: 0) {
9393 VStack(alignment: .leading, spacing: 6) {
94 Label("\(feature.title) needs orgstar Pro", systemImage: feature.systemImage).font(.headline)
95 Text("Pro is a one-time purchase of $39.99 for this Mac. Editing, the agenda, capture, clocking and search stay free.")
94 Label("\(feature.title) needs orgstar+", systemImage: feature.systemImage).font(.headline)
95 Text("orgstar+ is a one-time purchase of $39.99 for this Mac. Editing, the agenda, capture, clocking and search stay free.")
9696 .foregroundStyle(.secondary)
9797 }
9898 .padding([.horizontal, .top], 20)
Sources/OrgstarMobile/CaptureIntent.swift +1 −1
@@ -23,7 +23,7 @@ struct CaptureIntent: AppIntent {
2323
2424 @MainActor
2525 func perform() async throws -> some IntentResult & ReturnsValue<String> & ProvidesDialog {
26 guard ProAccess.shared.isUnlocked else { throw Failure(message: "Shortcuts actions need orgstar Pro") }
26 guard ProAccess.shared.isUnlocked else { throw Failure(message: "Shortcuts actions need orgstar+") }
2727 let model = MobileModel.shared
2828 guard let workspace = model.workspace else { throw Failure(message: model.failure ?? "orgstar isn't ready") }
2929 let placed = model.session.capture(
Sources/OrgstarMobile/ExportMenu.swift +1 −1
@@ -122,7 +122,7 @@ struct ExportMenu: View {
122122 Menu("Export", systemImage: "square.and.arrow.up") {
123123 ForEach(OrgExport.Format.allCases, id: \.self) { format in
124124 if format.locked {
125 Button("\(format.name) (Pro)") { ProAccess.shared.allows(.export) }
125 Button("\(format.name) (orgstar+)") { ProAccess.shared.allows(.export) }
126126 } else {
127127 let export = OrgExport(text: text, path: path, format: format, settings: OrgPreferences.orgSettings(),
128128 codeStyle: HTMLCodeStyle(highlighter: MobileEditor.highlighter, theme: model.theme))
Sources/OrgstarMobile/ProStore.swift +100 −21
@@ -4,7 +4,7 @@ import StoreKit
44import SwiftUI
55import UIKit
66
7/// orgstar Pro from the App Store: a monthly or yearly subscription, or a lifetime purchase. It
7/// orgstar+ from the App Store: a monthly or yearly subscription, or a lifetime purchase. It
88/// keeps `ProAccess.shared` current; installs from before Pro keep it without buying.
99@MainActor @Observable
1010final class ProStore {
@@ -103,14 +103,37 @@ final class ProStore {
103103 do {
104104 try await AppStore.sync()
105105 await refresh()
106 if !ProAccess.shared.isUnlocked { message = "No orgstar Pro purchase was found for this Apple Account." }
106 if !ProAccess.shared.isUnlocked { message = "No orgstar+ purchase was found for this Apple Account." }
107107 } catch {
108108 message = "Restore didn't finish. \(error.localizedDescription)"
109109 }
110110 }
111111}
112112
113/// What Pro includes, its prices, and buying, restoring or managing it.
113/// orgstar+'s gold, for its banner in Settings and its screen.
114extension ShapeStyle where Self == LinearGradient {
115 static var plusGold: LinearGradient {
116 LinearGradient(
117 colors: [Color(red: 1.0, green: 0.84, blue: 0.36), Color(red: 0.86, green: 0.6, blue: 0.12)],
118 startPoint: .topLeading, endPoint: .bottomTrailing)
119 }
120}
121
122/// The gold star that marks orgstar+.
123struct PlusBadge: View {
124 var size: CGFloat = 46
125
126 var body: some View {
127 Image(systemName: "star.fill")
128 .font(.system(size: size * 0.48, weight: .semibold))
129 .foregroundStyle(.white)
130 .frame(width: size, height: size)
131 .background(.plusGold, in: .rect(cornerRadius: size * 0.24))
132 .accessibilityHidden(true)
133 }
134}
135
136/// What orgstar+ includes, its prices, and buying, restoring or managing it.
114137struct ProScreen: View {
115138 /// The feature that led here, if any.
116139 var feature: ProFeature?
@@ -122,17 +145,30 @@ struct ProScreen: View {
122145 var body: some View {
123146 Form {
124147 Section {
125 VStack(alignment: .leading, spacing: 6) {
148 VStack(spacing: 10) {
149 PlusBadge(size: 76)
150 .shadow(color: .orange.opacity(0.35), radius: 14, y: 6)
151 Text(verbatim: "orgstar+").font(.largeTitle.bold())
126152 if let feature, !access.isUnlocked {
127 Text("\(feature.title) needs orgstar Pro.").font(.headline)
153 Text("\(feature.title) needs orgstar+.").font(.headline)
128154 }
129155 Text(status).foregroundStyle(.secondary)
130156 }
157 .multilineTextAlignment(.center)
158 .frame(maxWidth: .infinity)
159 .padding(.vertical, 6)
131160 }
161 .listRowBackground(Color.clear)
132162 Section {
133 ForEach(ProFeature.allCases) { Label($0.title, systemImage: $0.systemImage) }
163 ForEach(ProFeature.allCases) { feature in
164 Label {
165 Text(feature.title)
166 } icon: {
167 Image(systemName: feature.systemImage).foregroundStyle(.plusGold)
168 }
169 }
134170 } header: {
135 Text("Included in Pro")
171 Text("Included in orgstar+")
136172 } footer: {
137173 Text("Editing, the agenda, capture, clocking, tables and search stay free.")
138174 }
@@ -142,16 +178,12 @@ struct ProScreen: View {
142178 ProgressView().frame(maxWidth: .infinity)
143179 }
144180 ForEach(store.products) { product in
145 Button { Task { await store.buy(product) } } label: {
146 LabeledContent {
147 Text(product.displayPrice + period(product)).monospacedDigit()
148 } label: {
149 Text(product.displayName)
150 if product.id == store.activeProductID { Text("Current plan") }
151 }
152 }
153 .disabled(store.busy || product.id == store.activeProductID)
181 Button { Task { await store.buy(product) } } label: { plan(product) }
182 .tint(.primary)
183 .disabled(store.busy || product.id == store.activeProductID)
154184 }
185 } header: {
186 Text("Choose a plan")
155187 } footer: {
156188 Text("Subscriptions renew automatically until cancelled in your Apple Account settings, at least 24 hours before the period ends.")
157189 }
@@ -168,17 +200,64 @@ struct ProScreen: View {
168200 Section { Text(message).foregroundStyle(.secondary) }
169201 }
170202 }
171 .navigationTitle("orgstar Pro")
203 .navigationTitle(Text(verbatim: "orgstar+"))
172204 .navigationBarTitleDisplayMode(.inline)
173205 .manageSubscriptionsSheet(isPresented: $managing)
174206 .task { await store.loadProducts() }
175207 }
176208
177 private var status: String {
209 /// One plan: its name, an optional savings tag, what it bills, and its price.
210 private func plan(_ product: Product) -> some View {
211 HStack(alignment: .firstTextBaseline) {
212 VStack(alignment: .leading, spacing: 3) {
213 HStack(spacing: 6) {
214 Text(product.displayName).font(.headline)
215 if let percent = savings(product) {
216 Text("Save \(percent)%")
217 .font(.caption.bold())
218 .foregroundStyle(.white)
219 .padding(.horizontal, 7)
220 .padding(.vertical, 2)
221 .background(.plusGold, in: .capsule)
222 }
223 }
224 detail(product).font(.subheadline).foregroundStyle(.secondary)
225 }
226 Spacer()
227 Text(product.displayPrice + period(product))
228 .font(.headline)
229 .monospacedDigit()
230 .foregroundStyle(Color.accentColor)
231 }
232 .padding(.vertical, 4)
233 }
234
235 private func detail(_ product: Product) -> Text {
236 if product.id == store.activeProductID { return Text("Current plan") }
237 switch product.id {
238 case ProStore.monthly: return Text("Billed monthly")
239 case ProStore.yearly:
240 let perMonth = (product.price / 12).formatted(product.priceFormatStyle)
241 return Text("\(perMonth) a month, billed yearly")
242 default: return Text("One payment, no subscription")
243 }
244 }
245
246 /// How much the yearly plan saves against twelve months, in whole percent.
247 private func savings(_ product: Product) -> Int? {
248 guard product.id == ProStore.yearly,
249 let monthly = store.products.first(where: { $0.id == ProStore.monthly }), monthly.price > 0
250 else { return nil }
251 let ratio = NSDecimalNumber(decimal: product.price / (monthly.price * 12)).doubleValue
252 let percent = Int((1 - ratio) * 100)
253 return percent > 0 ? percent : nil
254 }
255
256 private var status: LocalizedStringKey {
178257 switch access.grant {
179 case .grandfathered: "Pro is included: you downloaded orgstar before Pro. Thank you."
180 case .purchase: store.activeProductID == ProStore.lifetime ? "You own orgstar Pro." : "Your orgstar Pro subscription is active."
181 case .license, nil: "Pro adds power features and Apple integrations."
258 case .grandfathered: "Included, because you downloaded orgstar before orgstar+ existed. Thank you."
259 case .purchase: store.activeProductID == ProStore.lifetime ? "You own orgstar+. Thank you for supporting orgstar." : "Your orgstar+ subscription is active. Thank you for supporting orgstar."
260 case .license, nil: "Power features and Apple integrations, on top of everything that stays free."
182261 }
183262 }
184263
Sources/OrgstarMobile/SettingsScreen.swift +39 −5
@@ -25,6 +25,14 @@ struct SettingsScreen: View {
2525
2626 var body: some View {
2727 Form {
28 Section {
29 NavigationLink {
30 ProScreen()
31 } label: {
32 ProBanner()
33 }
34 }
35 .listRowBackground(ProBanner.rowBackground)
2836 Section {
2937 LabeledContent("Folder", value: model.configFolder?.lastPathComponent ?? String(localized: "none.folder", defaultValue: "None", comment: "No configuration folder chosen"))
3038 Button(model.configFolder == nil ? "Choose Folder…" : "Choose Another Folder…") { choosing = true }
@@ -127,11 +135,6 @@ struct SettingsScreen: View {
127135 LabeledContent("Font", value: font)
128136 }
129137 Section {
130 NavigationLink {
131 ProScreen()
132 } label: {
133 Label("orgstar Pro", systemImage: "star")
134 }
135138 NavigationLink {
136139 AboutScreen(appIcon: appIcon)
137140 } label: {
@@ -292,6 +295,37 @@ struct SettingsScreen: View {
292295 .joined(separator: "; ")
293296 }
294297}
298/// The orgstar+ row at the top of Settings.
299private struct ProBanner: View {
300 private var access: ProAccess { .shared }
301
302 static var rowBackground: some View {
303 ZStack {
304 Color(uiColor: .secondarySystemGroupedBackground)
305 LinearGradient.plusGold.opacity(0.22)
306 }
307 }
308
309 var body: some View {
310 HStack(spacing: 14) {
311 PlusBadge()
312 VStack(alignment: .leading, spacing: 3) {
313 Text(verbatim: "orgstar+").font(.headline)
314 Group {
315 if access.isUnlocked {
316 Text("Unlocked. Thanks for supporting orgstar.")
317 } else {
318 Text("Export, encryption, widgets, the Watch app and more")
319 }
320 }
321 .font(.subheadline)
322 .foregroundStyle(.secondary)
323 }
324 }
325 .padding(.vertical, 6)
326 }
327}
328
295329/// The configuration folder's `config.toml` as plain text, saved when you tap Save or leave.
296330struct ConfigFileEditor: View {
297331 let model: MobileModel
Sources/OrgstarWatch/WatchApp.swift +1 −1
@@ -99,7 +99,7 @@ struct AgendaList: View {
9999 var body: some View {
100100 if link.agenda?.locked == true {
101101 ScrollView {
102 Text("The Watch app needs orgstar Pro. Get it in orgstar on your iPhone, in Settings.")
102 Text("The Watch app needs orgstar+. Get it in orgstar on your iPhone, in Settings.")
103103 .foregroundStyle(.secondary)
104104 }
105105 .navigationTitle("Today")
Sources/OrgstarWidgets/HabitsWidget.swift +1 −1
@@ -53,7 +53,7 @@ struct HabitsView: View {
5353 if let snapshot = entry.snapshot, !snapshot.habits.isEmpty {
5454 content(snapshot)
5555 } else {
56 Text(entry.snapshot == nil ? !widgetsLocked ? "Open orgstar to show your habits here." : "Widgets need orgstar Pro." : "No habits in the agenda. Give an entry STYLE: habit.")
56 Text(entry.snapshot == nil ? !widgetsLocked ? "Open orgstar to show your habits here." : "Widgets need orgstar+." : "No habits in the agenda. Give an entry STYLE: habit.")
5757 .font(.caption)
5858 .foregroundStyle(.secondary)
5959 .frame(maxWidth: .infinity, maxHeight: .infinity)
Sources/OrgstarWidgets/TodayWidget.swift +1 −1
@@ -25,7 +25,7 @@ struct TodayView: View {
2525 if let snapshot = entry.snapshot {
2626 content(snapshot)
2727 } else {
28 Text(!widgetsLocked ? "Open orgstar to show your agenda here." : "Widgets need orgstar Pro.")
28 Text(!widgetsLocked ? "Open orgstar to show your agenda here." : "Widgets need orgstar+.")
2929 .font(.caption)
3030 .foregroundStyle(.secondary)
3131 .frame(maxWidth: .infinity, maxHeight: .infinity)
Sources/OrgstarWidgets/UpNextWidget.swift +1 −1
@@ -64,7 +64,7 @@ struct UpNextView: View {
6464 } else {
6565 VStack(alignment: .leading, spacing: 0) {
6666 Text("Agenda").font(.headline).widgetAccentable()
67 Text(entry.snapshot == nil ? !widgetsLocked ? "Open orgstar" : "Needs orgstar Pro" : "Nothing left today").font(.body)
67 Text(entry.snapshot == nil ? !widgetsLocked ? "Open orgstar" : "Needs orgstar+" : "Nothing left today").font(.body)
6868 }
6969 .frame(maxWidth: .infinity, alignment: .leading)
7070 }
ios/AppStore/metadata.md +2 −2
@@ -40,7 +40,7 @@ AND MORE
4040- Themes and settings read from the same configuration folder as the Mac app
4141
4242ORGSTAR PRO
43Editing, the agenda, capture, clocking, tables and search are free. Pro, monthly, yearly or as a one-time lifetime purchase, adds:
43Editing, the agenda, capture, clocking, tables and search are free. orgstar+, monthly, yearly or as a one-time lifetime purchase, adds:
4444- Running and tangling source blocks
4545- PDF, Word and rich text export
4646- Encrypted entries
@@ -48,7 +48,7 @@ Editing, the agenda, capture, clocking, tables and search are free. Pro, monthly
4848- Widgets, the Apple Watch app and the clock Live Activity
4949- Calendar events and reminders in the agenda
5050- Shortcuts actions
51Everyone who downloaded orgstar before Pro keeps all of it.
51Everyone who downloaded orgstar before orgstar+ keeps all of it.
5252
5353## Keywords
5454
ios/Orgstar.storekit +8 −8
@@ -18,13 +18,13 @@
1818 "internalID": "6700000003",
1919 "localizations": [
2020 {
21 "description": "orgstar Pro, once, for good",
22 "displayName": "Pro Lifetime",
21 "description": "orgstar+, once, for good",
22 "displayName": "orgstar+ Lifetime",
2323 "locale": "en_US"
2424 }
2525 ],
2626 "productID": "sh.krz.orgstar.pro.lifetime",
27 "referenceName": "Pro Lifetime",
27 "referenceName": "orgstar+ Lifetime",
2828 "type": "NonConsumable"
2929 }
3030 ],
@@ -44,7 +44,7 @@
4444 {
4545 "id": "21600001",
4646 "localizations": [],
47 "name": "orgstar Pro",
47 "name": "orgstar+",
4848 "subscriptions": [
4949 {
5050 "adHocOffers": [],
@@ -57,13 +57,13 @@
5757 "localizations": [
5858 {
5959 "description": "Power features and Apple integrations",
60 "displayName": "Pro Yearly",
60 "displayName": "orgstar+ Yearly",
6161 "locale": "en_US"
6262 }
6363 ],
6464 "productID": "sh.krz.orgstar.pro.yearly",
6565 "recurringSubscriptionPeriod": "P1Y",
66 "referenceName": "Pro Yearly",
66 "referenceName": "orgstar+ Yearly",
6767 "subscriptionGroupID": "21600001",
6868 "type": "RecurringSubscription",
6969 "winbackOffers": []
@@ -79,13 +79,13 @@
7979 "localizations": [
8080 {
8181 "description": "Power features and Apple integrations",
82 "displayName": "Pro Monthly",
82 "displayName": "orgstar+ Monthly",
8383 "locale": "en_US"
8484 }
8585 ],
8686 "productID": "sh.krz.orgstar.pro.monthly",
8787 "recurringSubscriptionPeriod": "P1M",
88 "referenceName": "Pro Monthly",
88 "referenceName": "orgstar+ Monthly",
8989 "subscriptionGroupID": "21600001",
9090 "type": "RecurringSubscription",
9191 "winbackOffers": []
packaging/license-issuer/buy.html +1 −1
@@ -1,7 +1,7 @@
11<!-- The Buy button for krz.sh/apps/orgstar/buy (the domain Paddle approves). Fill in the client
22 token and price ID; after checkout the buyer lands on the Worker's page with their key. -->
33<script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script>
4<button id="buy">Buy orgstar Pro for Mac, $39.99</button>
4<button id="buy">Buy orgstar+ for Mac, $39.99</button>
55<script>
66 const ISSUER = "https://orgstar-license.REPLACE_ME.workers.dev/license";
77 Paddle.Initialize({
packaging/license-issuer/worker.js +5 −5
@@ -24,7 +24,7 @@ export default {
2424 const { data } = await response.json();
2525 const paid = data.status === "completed" || data.status === "paid";
2626 const forOrgstar = data.items?.some((item) => item.price?.id === env.PRICE_ID);
27 if (!paid || !forOrgstar) return page("That transaction isn't a completed orgstar Pro purchase.", 404);
27 if (!paid || !forOrgstar) return page("That transaction isn't a completed orgstar+ purchase.", 404);
2828
2929 const key = await sign(
3030 { e: data.customer?.email ?? "", t: txn, i: Math.floor(Date.parse(data.billed_at ?? data.created_at) / 1000) },
@@ -32,8 +32,8 @@ export default {
3232 );
3333 if (url.searchParams.get("format") === "text") return new Response(key + "\n");
3434 return page(
35 `<p>Your orgstar Pro license key:</p><pre>${key}</pre>` +
36 `<p>In orgstar, open Settings ▸ Pro, paste the key and choose Activate. Keep this page or the key; ` +
35 `<p>Your orgstar+ license key:</p><pre>${key}</pre>` +
36 `<p>In orgstar, open Settings ▸ orgstar+, paste the key and choose Activate. Keep this page or the key; ` +
3737 `the same link shows it again.</p>`,
3838 200,
3939 );
@@ -54,8 +54,8 @@ function base64url(bytes) {
5454
5555function page(body, status) {
5656 const html = `<!doctype html><meta charset="utf-8"><meta name="viewport" content="width=device-width">` +
57 `<title>orgstar Pro</title><style>body{font:16px/1.5 system-ui;max-width:40rem;margin:3rem auto;padding:0 1rem}` +
57 `<title>orgstar+</title><style>body{font:16px/1.5 system-ui;max-width:40rem;margin:3rem auto;padding:0 1rem}` +
5858 `pre{white-space:pre-wrap;word-break:break-all;background:#f4f4f4;padding:1rem;border-radius:6px}</style>` +
59 `<h1>orgstar Pro</h1>${body.startsWith("<") ? body : `<p>${body}</p>`}`;
59 `<h1>orgstar+</h1>${body.startsWith("<") ? body : `<p>${body}</p>`}`;
6060 return new Response(html, { status, headers: { "content-type": "text/html; charset=utf-8" } });
6161}
packaging/license-issuer/wrangler.toml +1 −1
@@ -5,5 +5,5 @@ compatibility_date = "2026-10-01"
55[vars]
66# https://sandbox-api.paddle.com while testing.
77PADDLE_API = "https://api.paddle.com"
8# The orgstar Pro (Mac) price, pri_…
8# The orgstar+ (Mac) price, pri_…
99PRICE_ID = "pri_REPLACE_ME"