commit 819709378ea5778787eefa9842d454181ab7a0f2
parent 73c64bd79d809a1c641bb9d3c3cb23001b1dd9e0
Author: Marc Stibane <marc@taler.net>
Date: Sun, 12 Nov 2023 13:25:36 +0100
About with explicit link to taler.net
Diffstat:
1 file changed, 37 insertions(+), 29 deletions(-)
diff --git a/TalerWallet1/Views/Settings/AboutView.swift b/TalerWallet1/Views/Settings/AboutView.swift
@@ -18,6 +18,7 @@ struct AboutView: View {
@AppStorage("developerMode") var developerMode: Bool = false
#endif
@AppStorage("myListStyle") var myListStyle: MyListStyle = .automatic
+ @AppStorage("iconOnly") var iconOnly: Bool = false
@State private var rotationEnabled = false
@@ -31,38 +32,45 @@ struct AboutView: View {
let walletCore = WalletCore.shared
Group {
List {
-// VStack {
- HStack {
- Spacer()
- RotatingTaler(size: 100, rotationEnabled: $rotationEnabled)
- .accessibilityHint("Will go to the taler.net website when long-pressed.")
- .onTapGesture(count: 2) {
- rotationEnabled.toggle()
- }
- .onLongPressGesture(minimumDuration: 0.3) {
- UIApplication.shared.open(URL(string:"https://taler.net")!, options: [:])
- }
- Spacer()
- }
- SettingsItem(name: "App Version", id1: "app") {
- Text(verbatim: "\(Bundle.main.releaseVersionNumberPretty)")
- }
- SettingsItem(name: "Wallet Core Version", id1: "wallet-core") {
- Text(verbatim: "\(walletCore.versionInfo!.version)")
+ HStack {
+ Spacer()
+ RotatingTaler(size: 100, rotationEnabled: $rotationEnabled)
+ .onTapGesture(count: 2) {
+ rotationEnabled.toggle()
+ }
+ Spacer()
+ }
+ SettingsItem(name: "Visit the taler.net website", id1: "web",
+ description: iconOnly ? nil : String(localized: "More info about Gnu Taler in general...")) { }
+ .accessibilityAddTraits(.isLink)
+ .accessibilityRemoveTraits(.isStaticText)
+ .onTapGesture() {
+ UIApplication.shared.open(URL(string:"https://taler.net")!, options: [:])
}
+
+ SettingsItem(name: "App Version", id1: "app") {
+ Text(verbatim: "\(Bundle.main.releaseVersionNumberPretty)")
+ }
+ SettingsItem(name: "Wallet Core Version", id1: "wallet-core") {
+ Text(verbatim: "\(walletCore.versionInfo?.version ?? "unknown")")
+ }
+ if developerMode {
SettingsItem(name: "Wallet Core DevMode", id1: "devMode") {
- Text(verbatim: "\(walletCore.versionInfo!.devMode ? "YES" : "NO")")
- }
- SettingsItem(name: "Supported Exchange Versions", id1: "exchange") {
- Text(verbatim: "\(walletCore.versionInfo!.exchange)")
- }
- SettingsItem(name: "Supported Merchant Versions", id1: "merchant") {
- Text(verbatim: "\(walletCore.versionInfo!.merchant)")
- }
- SettingsItem(name: "Used Bank", id1: "bank") {
- Text(verbatim: "\(walletCore.versionInfo!.bank)")
+ let modeStr = if let devMode = walletCore.versionInfo?.devMode {
+ devMode ? "YES" : "NO"
+ } else { "unknown" }
+ Text(modeStr)
}
-// } // App version info
+ }
+ SettingsItem(name: "Supported Exchange Versions", id1: "exchange") {
+ Text(verbatim: "\(walletCore.versionInfo?.exchange ?? "unknown")")
+ }
+ SettingsItem(name: "Supported Merchant Versions", id1: "merchant") {
+ Text(verbatim: "\(walletCore.versionInfo?.merchant ?? "unknown")")
+ }
+ SettingsItem(name: "Used Bank", id1: "bank") {
+ Text(verbatim: "\(walletCore.versionInfo?.bank ?? "unknown")")
+ }
}
.id(listID)
.listStyle(myListStyle.style).anyView