Moved app version to the section footer (#210)

This commit is contained in:
Patrick 2023-01-21 09:38:30 +01:00 committed by GitHub
parent da92979072
commit e375d792a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,7 @@ struct SettingsTabs: View {
}
private var appSection: some View {
Section("settings.section.app") {
Section {
if !ProcessInfo.processInfo.isiOSAppOnMac {
NavigationLink(destination: IconSelectorView()) {
Label {
@ -135,16 +135,18 @@ struct SettingsTabs: View {
Label("settings.app.support", systemImage: "wand.and.stars")
}
if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
Label("App Version: \(appVersion)", systemImage: "app.badge.checkmark")
}
if let reviewURL = URL(string: "https://apps.apple.com/app/id\(AppInfo.appStoreAppId)?action=write-review") {
Link(destination: reviewURL) {
Label("Rate Ice Cubes", systemImage: "link")
}
.tint(theme.labelColor)
}
} header: {
Text("settings.section.app")
} footer: {
if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
Text("App Version: \(appVersion)").frame(maxWidth: .infinity, alignment: .center)
}
}
.listRowBackground(theme.primaryBackgroundColor)
}