]>
Commit | Line | Data |
---|---|---|
1 | import SwiftUI | |
2 | ||
3 | struct AboutSettings: View { | |
4 | ||
5 | var appVersion: String { | |
6 | let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown" | |
7 | let build = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "Unknown" | |
8 | return "Version \(version) (\(build))" | |
9 | } | |
10 | ||
11 | var imprint = (try? AttributedString(markdown: "Captura is open source. Help and more information available at [captura.tranquil.systems](https://captura.tranquil.systems)")) ?? "" | |
12 | ||
13 | var body: some View { | |
14 | Form { | |
15 | VStack (alignment: .center) { | |
16 | Text("Captura").bold() | |
17 | Text(appVersion).foregroundStyle(.secondary) | |
18 | Spacer() | |
19 | Text(imprint) | |
20 | .multilineTextAlignment(.center) | |
21 | } | |
22 | Spacer() | |
23 | } | |
24 | } | |
25 | } | |
26 | ||
27 | #Preview { | |
28 | AboutSettings() | |
29 | } |