|
|
@@ -172,6 +172,12 @@ struct LauncherRootView: View {
|
|
|
.padding(.horizontal, 10)
|
|
|
.padding(.top, 5)
|
|
|
.padding(.bottom, 8)
|
|
|
+
|
|
|
+ if showingCreateAppSheet {
|
|
|
+ createAppOverlay
|
|
|
+ .transition(.scale(scale: 0.97).combined(with: .opacity))
|
|
|
+ .zIndex(50)
|
|
|
+ }
|
|
|
}
|
|
|
.ignoresSafeArea(.container, edges: .top)
|
|
|
.sheet(item: $selectedApp) { app in
|
|
|
@@ -183,12 +189,6 @@ struct LauncherRootView: View {
|
|
|
.environmentObject(premiumStore)
|
|
|
.frame(minWidth: 560, minHeight: 690)
|
|
|
}
|
|
|
- .sheet(isPresented: $showingCreateAppSheet) {
|
|
|
- CreateAppSheetView { input in
|
|
|
- addCustomApp(name: input.name, url: input.url)
|
|
|
- }
|
|
|
- .frame(minWidth: 760, minHeight: 420)
|
|
|
- }
|
|
|
.task {
|
|
|
await premiumStore.refreshEntitlements()
|
|
|
}
|
|
|
@@ -313,6 +313,31 @@ struct LauncherRootView: View {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private var createAppOverlay: some View {
|
|
|
+ VStack {
|
|
|
+ CreateAppSheetView(
|
|
|
+ onSave: { input in
|
|
|
+ addCustomApp(name: input.name, url: input.url)
|
|
|
+ },
|
|
|
+ onClose: {
|
|
|
+ showingCreateAppSheet = false
|
|
|
+ },
|
|
|
+ showsBackgroundLayer: false
|
|
|
+ )
|
|
|
+ .frame(minWidth: 760, minHeight: 420)
|
|
|
+ .background(
|
|
|
+ RoundedRectangle(cornerRadius: 22, style: .continuous)
|
|
|
+ .fill(Color(red: 0.04, green: 0.06, blue: 0.08).opacity(0.96))
|
|
|
+ )
|
|
|
+ .overlay(
|
|
|
+ RoundedRectangle(cornerRadius: 22, style: .continuous)
|
|
|
+ .stroke(Color.white.opacity(0.12), lineWidth: 1)
|
|
|
+ )
|
|
|
+ .shadow(color: .black.opacity(0.45), radius: 24, x: 0, y: 12)
|
|
|
+ }
|
|
|
+ .padding(.horizontal, 22)
|
|
|
+ }
|
|
|
+
|
|
|
private func handleAppTap(_ app: LauncherApp) {
|
|
|
if app.isCreateNew {
|
|
|
showingCreateAppSheet = true
|