Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 0c00326

Browse files
authored
Add setup
1 parent dee0f51 commit 0c00326

3 files changed

Lines changed: 43 additions & 6 deletions

File tree

Sources/prostore/prostore.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@ import SwiftUI
22

33
@main
44
struct ProStore: App {
5+
@AppStorage("hasCompletedSetup") private var hasCompletedSetup: Bool = false
56
var body: some Scene {
67
WindowGroup {
7-
MainSidebarView()
8+
if hasCompletedSetup {
9+
MainSidebarView()
10+
} else {
11+
SetupView {
12+
hasCompletedSetup = true
13+
}
14+
}
815
}
916
}
1017
}
@@ -87,6 +94,4 @@ enum SidebarItem: Hashable {
8794
case certificates
8895
case apps
8996
case about
90-
}
91-
92-
97+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import SwiftUI
2+
3+
struct SetupView: View {
4+
var onComplete: () -> Void
5+
6+
var body: some View {
7+
VStack(spacing: 30) {
8+
Spacer()
9+
10+
Text("Welcome to ProStore!")
11+
.font(.largeTitle)
12+
.bold()
13+
.multilineTextAlignment(.center)
14+
15+
Text("Let's set things up before you start using the app.")
16+
.multilineTextAlignment(.center)
17+
.padding(.horizontal)
18+
19+
Spacer()
20+
21+
Button("Continue") {
22+
onComplete()
23+
}
24+
.buttonStyle(.borderedProminent)
25+
.font(.title2)
26+
.padding()
27+
28+
Spacer()
29+
}
30+
.padding()
31+
}
32+
}

project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ targets:
3333
properties:
3434
CFBundleDisplayName: "ProStore"
3535
CFBundleName: "prostore"
36-
CFBundleVersion: "34"
37-
CFBundleShortVersionString: "0.11.0d2"
36+
CFBundleVersion: "35"
37+
CFBundleShortVersionString: "0.11.0d3"
3838
UILaunchStoryboardName: "LaunchScreen"
3939
NSPrincipalClass: "UIApplication"
4040
NSAppTransportSecurity:

0 commit comments

Comments
 (0)