Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NativeAppTemplate/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ extension String {

static let myAccount = "My Account"
static let profile = "Profile"
static let information = "Information"
static let supportWebsite = "Support Website"
static let howToUse = "How To Use"
static let faqs = "FAQs"
Expand Down
30 changes: 23 additions & 7 deletions NativeAppTemplate/UI/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ struct SettingsView: View {
}
.listRowBackground(Color.cardBackground.opacity(0.7))

Section(header: Text(String.information)) {
Link(destination: URL(string: String.supportWebsiteUrl)!) {
Label(String.supportWebsite, systemImage: "globe")
}

Section(header: Text(verbatim: "Support")) {
Link(destination: URL(string: String.howToUseUrl)!) {
Label(String.howToUse, systemImage: "info")
}
Expand All @@ -74,12 +70,28 @@ struct SettingsView: View {
} label: {
Label(String.rateApp, systemImage: "hand.thumbsup")
}
}
.listRowBackground(Color.cardBackground.opacity(0.7))

Section(header: Text(verbatim: "About")) {
Link(destination: URL(string: String.supportWebsiteUrl)!) {
Label("Website", systemImage: "globe")
}
Link(destination: URL(string: String.privacyPolicyUrl)!) {
Text(String.privacyPolicy)
Label(String.privacyPolicy, systemImage: "hand.raised")
}
Link(destination: URL(string: String.termsOfUseUrl)!) {
Text(String.termsOfUse)
Label(String.termsOfUse, systemImage: "doc.text")
}
}
.listRowBackground(Color.cardBackground.opacity(0.7))

Section(header: Text(verbatim: "App")) {
HStack {
Text(verbatim: "Version")
Spacer()
Text(appVersion)
.foregroundStyle(.secondary)
}
}
.listRowBackground(Color.cardBackground.opacity(0.7))
Expand Down Expand Up @@ -109,6 +121,10 @@ struct SettingsView: View {
.navigationBarTitleDisplayMode(.inline)
}

private var appVersion: String {
"\(Bundle.main.appVersionLong) (\(Bundle.main.appBuild))"
}

var supportEmailURL: URL {
let appName = Bundle.main.displayName
let appVersion = "\(Bundle.main.appVersionLong)"
Expand Down
Loading