Skip to content
/ Asspp Public

Commit cadbe1b

Browse files
committed
Update WelcomeView
1 parent 251f027 commit cadbe1b

File tree

4 files changed

+89
-40
lines changed

4 files changed

+89
-40
lines changed

Asspp/App/Localizable.xcstrings

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,16 @@
10041004
}
10051005
}
10061006
},
1007+
"How to install an app?" : {
1008+
"localizations" : {
1009+
"zh-Hans" : {
1010+
"stringUnit" : {
1011+
"state" : "translated",
1012+
"value" : "如何安装软件?"
1013+
}
1014+
}
1015+
}
1016+
},
10071017
"If you fail to acquire a license for a product, rotating the password token may help. This will use the initial password to authenticate with the App Store again." : {
10081018
"localizations" : {
10091019
"en" : {

Asspp/App/main.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ let logger = {
1616
return logger
1717
}()
1818

19+
let version = [
20+
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String,
21+
Bundle.main.infoDictionary?["CFBundleVersion"] as? String,
22+
]
23+
.compactMap { $0 ?? "?" }
24+
.joined(separator: ".")
25+
1926
let bundleIdentifier = Bundle.main.bundleIdentifier!
20-
let appVersion = "\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "") (\(Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? ""))"
27+
logger.info("Asspp \(bundleIdentifier) \(version) starting up...")
2128

2229
private let availableDirectories = FileManager
2330
.default
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
//
2+
// SimpleInstrction.swift
3+
// Asspp
4+
//
5+
// Created by qaq on 9/17/25.
6+
//
7+
8+
import SwiftUI
9+
10+
struct SimpleInstrction: View {
11+
var body: some View {
12+
VStack(spacing: 16) {
13+
Text("How to install an app?")
14+
.font(.system(.title))
15+
.bold()
16+
.frame(maxWidth: .infinity, alignment: .leading)
17+
18+
Divider().hidden()
19+
20+
HStack {
21+
Image(systemName: "1.circle.fill")
22+
Text("Sign in to your account.")
23+
}
24+
.frame(maxWidth: .infinity, alignment: .leading)
25+
26+
HStack {
27+
Image(systemName: "2.circle.fill")
28+
Text("Search for apps you want to install.")
29+
}
30+
.frame(maxWidth: .infinity, alignment: .leading)
31+
32+
HStack {
33+
Image(systemName: "3.circle.fill")
34+
Text("Download and save the ipa file.")
35+
}
36+
.frame(maxWidth: .infinity, alignment: .leading)
37+
38+
HStack {
39+
Image(systemName: "4.circle.fill")
40+
Text("Install the certificate in settings page.")
41+
}
42+
.frame(maxWidth: .infinity, alignment: .leading)
43+
44+
HStack {
45+
Image(systemName: "5.circle.fill")
46+
Text("Install or AirDrop to install.")
47+
}
48+
.frame(maxWidth: .infinity, alignment: .leading)
49+
50+
Divider().hidden()
51+
}
52+
.font(.system(.body))
53+
.foregroundStyle(.primary)
54+
}
55+
}

Asspp/Interface/Welcome/WelcomeView.swift

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,36 @@ import ColorfulX
99
import SwiftUI
1010

1111
struct WelcomeView: View {
12+
@State var openInstruction: Bool = false
13+
1214
var body: some View {
1315
ZStack {
1416
VStack(spacing: 32) {
1517
Image(.avatar)
1618
.resizable()
1719
.aspectRatio(contentMode: .fit)
1820
.frame(width: 80, height: 80)
21+
1922
Text("Welcome to Asspp")
2023
.font(.system(.headline, design: .rounded))
21-
inst
22-
.font(.system(.footnote, design: .rounded))
23-
.padding(.horizontal, 32)
24-
.fixedSize()
24+
2525
Spacer().frame(height: 0)
2626
}
2727

2828
VStack(spacing: 16) {
2929
Spacer()
30-
Text(appVersion)
30+
HStack(spacing: 8) {
31+
Text(version)
32+
Button {
33+
openInstruction = true
34+
} label: {
35+
Image(systemName: "questionmark.circle")
36+
}
37+
.popover(isPresented: $openInstruction) {
38+
SimpleInstrction()
39+
.padding(32)
40+
}
41+
}
3142
Text("App Store itself is unstable, retry if needed.")
3243
}
3344
.font(.footnote)
@@ -41,38 +52,4 @@ struct WelcomeView: View {
4152
.ignoresSafeArea()
4253
)
4354
}
44-
45-
var inst: some View {
46-
VStack(spacing: 16) {
47-
HStack {
48-
Image(systemName: "1.circle.fill")
49-
Text("Sign in to your account.")
50-
}
51-
.frame(maxWidth: .infinity, alignment: .leading)
52-
53-
HStack {
54-
Image(systemName: "2.circle.fill")
55-
Text("Search for apps you want to install.")
56-
}
57-
.frame(maxWidth: .infinity, alignment: .leading)
58-
59-
HStack {
60-
Image(systemName: "3.circle.fill")
61-
Text("Download and save the ipa file.")
62-
}
63-
.frame(maxWidth: .infinity, alignment: .leading)
64-
65-
HStack {
66-
Image(systemName: "4.circle.fill")
67-
Text("Install the certificate in settings page.")
68-
}
69-
.frame(maxWidth: .infinity, alignment: .leading)
70-
71-
HStack {
72-
Image(systemName: "5.circle.fill")
73-
Text("Install or AirDrop to install.")
74-
}
75-
.frame(maxWidth: .infinity, alignment: .leading)
76-
}
77-
}
7855
}

0 commit comments

Comments
 (0)