|
@@ -13,7 +13,6 @@ struct LauncherRootView: View {
|
|
|
@State private var query = ""
|
|
@State private var query = ""
|
|
|
@State private var selectedApp: LauncherApp?
|
|
@State private var selectedApp: LauncherApp?
|
|
|
@State private var showingPremiumScreen = false
|
|
@State private var showingPremiumScreen = false
|
|
|
- @State private var showingManageSubscriptionSheet = false
|
|
|
|
|
@State private var showingCreateAppSheet = false
|
|
@State private var showingCreateAppSheet = false
|
|
|
@State private var previouslyPremiumUnlocked = false
|
|
@State private var previouslyPremiumUnlocked = false
|
|
|
@State private var startupPaywallTask: Task<Void, Never>?
|
|
@State private var startupPaywallTask: Task<Void, Never>?
|
|
@@ -127,7 +126,7 @@ struct LauncherRootView: View {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onUpgradeTap: { showingPremiumScreen = true },
|
|
onUpgradeTap: { showingPremiumScreen = true },
|
|
|
- onManageSubscriptionTap: { showingManageSubscriptionSheet = true }
|
|
|
|
|
|
|
+ onManageSubscriptionTap: { openManageSubscriptions() }
|
|
|
)
|
|
)
|
|
|
.padding(.bottom, 8)
|
|
.padding(.bottom, 8)
|
|
|
.zIndex(1)
|
|
.zIndex(1)
|
|
@@ -152,16 +151,6 @@ struct LauncherRootView: View {
|
|
|
}
|
|
}
|
|
|
.frame(minWidth: 760, minHeight: 420)
|
|
.frame(minWidth: 760, minHeight: 420)
|
|
|
}
|
|
}
|
|
|
- .sheet(isPresented: $showingManageSubscriptionSheet) {
|
|
|
|
|
- ManageSubscriptionSheet(
|
|
|
|
|
- activePremiumProductID: premiumStore.activePremiumProductID,
|
|
|
|
|
- onUpgradeTap: {
|
|
|
|
|
- showingManageSubscriptionSheet = false
|
|
|
|
|
- showingPremiumScreen = true
|
|
|
|
|
- }
|
|
|
|
|
- )
|
|
|
|
|
- .frame(minWidth: 900, minHeight: 640)
|
|
|
|
|
- }
|
|
|
|
|
.task {
|
|
.task {
|
|
|
await premiumStore.refreshEntitlements()
|
|
await premiumStore.refreshEntitlements()
|
|
|
}
|
|
}
|
|
@@ -452,6 +441,15 @@ struct LauncherRootView: View {
|
|
|
return []
|
|
return []
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ private func openManageSubscriptions() {
|
|
|
|
|
+ let appStoreURL = URL(string: "macappstore://apps.apple.com/account/subscriptions")!
|
|
|
|
|
+ if NSWorkspace.shared.open(appStoreURL) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ let webURL = URL(string: "https://apps.apple.com/account/subscriptions")!
|
|
|
|
|
+ _ = NSWorkspace.shared.open(webURL)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private struct TileReorderDropDelegate: DropDelegate {
|
|
private struct TileReorderDropDelegate: DropDelegate {
|