diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-09-14 19:09:30 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-09-14 19:09:30 +0200 |
| commit | 9be247c36cb15153de2cbafe7e1c53209182f29e (patch) | |
| tree | 7e478544385b965d85acae3fb8963a84496de4ee /Captura/Presentation/Settings | |
| parent | 578c47516baabf4cdcb3edb54f6e397a47032dd5 (diff) | |
Add about and sandbox sparkle1.1.0
Diffstat (limited to 'Captura/Presentation/Settings')
| -rw-r--r-- | Captura/Presentation/Settings/AboutSettings.swift | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Captura/Presentation/Settings/AboutSettings.swift b/Captura/Presentation/Settings/AboutSettings.swift new file mode 100644 index 0000000..f5fe77c --- /dev/null +++ b/Captura/Presentation/Settings/AboutSettings.swift @@ -0,0 +1,29 @@ +import SwiftUI + +struct AboutSettings: View { + + var appVersion: String { + let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown" + let build = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "Unknown" + return "Version \(version) (\(build))" + } + + var imprint = (try? AttributedString(markdown: "Captura is open source. Help and more information available at [captura.tranquil.systems](https://captura.tranquil.systems)")) ?? "" + + var body: some View { + Form { + VStack (alignment: .center) { + Text("Captura").bold() + Text(appVersion).foregroundStyle(.secondary) + Spacer() + Text(imprint) + .multilineTextAlignment(.center) + } + Spacer() + } + } +} + +#Preview { + AboutSettings() +} |