Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
d2b9688b30
commit
d58f50b6ac
@ -18,6 +18,13 @@ struct SettingsView: View {
|
|||||||
@State private var hasChanges = false
|
@State private var hasChanges = false
|
||||||
@State private var showClearDataAlert = false
|
@State private var showClearDataAlert = false
|
||||||
|
|
||||||
|
/// App version string from bundle info
|
||||||
|
private var appVersionString: String {
|
||||||
|
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0"
|
||||||
|
let build = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "1"
|
||||||
|
return "Baccarat v\(version) (\(build))"
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
SheetContainerView(
|
SheetContainerView(
|
||||||
title: String(localized: "Settings"),
|
title: String(localized: "Settings"),
|
||||||
@ -253,6 +260,14 @@ struct SettingsView: View {
|
|||||||
}
|
}
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
.padding(.top, Design.Spacing.small)
|
.padding(.top, Design.Spacing.small)
|
||||||
|
|
||||||
|
// App Version
|
||||||
|
Text(appVersionString)
|
||||||
|
.font(.system(size: Design.BaseFontSize.callout))
|
||||||
|
.foregroundStyle(.white.opacity(Design.Opacity.light))
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.padding(.top, Design.Spacing.large)
|
||||||
|
.padding(.bottom, Design.Spacing.medium)
|
||||||
},
|
},
|
||||||
onCancel: {
|
onCancel: {
|
||||||
settings.load() // Revert changes
|
settings.load() // Revert changes
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user