Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply new layout for About module #5862

Merged
merged 1 commit into from
May 29, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,95 +8,76 @@ struct AboutView: View {

var body: some View {
ScrollableThemeView {
VStack(spacing: .margin24) {
HStack(spacing: .margin16) {
Image(uiImage: UIImage(named: AppIcon.main.imageName) ?? UIImage())
.resizable()
.scaledToFit()
.clipShape(RoundedRectangle(cornerRadius: .cornerRadius16, style: .continuous))
.frame(width: 72, height: 72)

VStack(spacing: .margin8) {
Text("settings.about_app.app_name".localized(AppConfig.appName)).themeHeadline1()
Text("version".localized(viewModel.appVersion)).themeSubhead2()
}
}
.padding(.horizontal, .margin24)

Text("settings.about_app.description".localized(AppConfig.appName, AppConfig.appName))
.font(.themeBody)
.foregroundColor(.themeBran)
.padding(.horizontal, .margin32)
.padding(.vertical, .margin12)

VStack(spacing: .margin32) {
if let releaseNotesUrl = viewModel.releaseNotesUrl {
ListSection {
NavigationRow(destination: {
MarkdownModule.gitReleaseNotesMarkdownView(url: releaseNotesUrl, presented: false)
.ignoresSafeArea()
}) {
Image("circle_information_24").themeIcon()
Text("settings.about_app.whats_new".localized).themeBody()
Image.disclosureIcon
}
}
}

VStack(spacing: .margin32) {
if let releaseNotesUrl = viewModel.releaseNotesUrl {
ListSection {
NavigationRow(destination: {
AppStatusModule.view()
NavigationRow(spacing: .margin8, destination: {
MarkdownModule.gitReleaseNotesMarkdownView(url: releaseNotesUrl, presented: false)
.ignoresSafeArea()
}) {
Image("app_status_24").themeIcon()
Text("app_status.title".localized).themeBody()
HStack(spacing: .margin16) {
Image("circle_information_24").themeIcon()
Text("settings.about_app.app_version".localized).textBody()
}
Spacer()
Text(viewModel.appVersion).textSubhead1()
Image.disclosureIcon
}
}
}

ClickableRow(action: {
termsPresented = true
}) {
Image("unordered_24").themeIcon()
Text("terms.title".localized).themeBody()
ListSection {
NavigationRow(destination: {
AppStatusModule.view()
}) {
Image("app_status_24").themeIcon()
Text("app_status.title".localized).themeBody()
Image.disclosureIcon
}

if viewModel.termsAlert {
Image("warning_2_20").themeIcon(color: .themeLucian).padding(.trailing, -.margin8)
}
ClickableRow(action: {
termsPresented = true
}) {
Image("unordered_24").themeIcon()
Text("terms.title".localized).themeBody()

Image.disclosureIcon
if viewModel.termsAlert {
Image("warning_2_20").themeIcon(color: .themeLucian).padding(.trailing, -.margin8)
}

NavigationRow(destination: {
PrivacyPolicyView(config: .privacy)
.navigationTitle(PrivacyPolicyViewController.Config.privacy.title)
.ignoresSafeArea()
}) {
Image("user_24").themeIcon()
Text("settings.privacy".localized).themeBody()
Image.disclosureIcon
}
Image.disclosureIcon
}

ListSection {
ClickableRow(action: {
linkUrl = URL(string: "https://github.com/\(AppConfig.appGitHubAccount)/\(AppConfig.appGitHubRepository)")
}) {
Image("github_24").themeIcon()
Text("GitHub").themeBody()
Image.disclosureIcon
}
NavigationRow(destination: {
PrivacyPolicyView(config: .privacy)
.navigationTitle(PrivacyPolicyViewController.Config.privacy.title)
.ignoresSafeArea()
}) {
Image("user_24").themeIcon()
Text("settings.privacy".localized).themeBody()
Image.disclosureIcon
}
}

ClickableRow(action: {
linkUrl = URL(string: AppConfig.appWebPageLink)
}) {
Image("globe_24").themeIcon()
Text("settings.about_app.website".localized).themeBody()
Image.disclosureIcon
}
ListSection {
ClickableRow(action: {
linkUrl = URL(string: "https://github.com/\(AppConfig.appGitHubAccount)/\(AppConfig.appGitHubRepository)")
}) {
Image("github_24").themeIcon()
Text("GitHub").themeBody()
Image.disclosureIcon
}

ClickableRow(action: {
linkUrl = URL(string: AppConfig.appWebPageLink)
}) {
Image("globe_24").themeIcon()
Text("settings.about_app.website".localized).themeBody()
Image.disclosureIcon
}
}
.padding(.horizontal, .margin16)
}
.padding(EdgeInsets(top: .margin24, leading: 0, bottom: .margin32, trailing: 0))
.padding(EdgeInsets(top: .margin12, leading: .margin16, bottom: .margin32, trailing: .margin16))
.sheet(isPresented: $termsPresented) {
TermsModule.view()
.ignoresSafeArea()
Expand All @@ -107,5 +88,6 @@ struct AboutView: View {
}
}
.navigationTitle("settings.about_app.title".localized)
.navigationBarTitleDisplayMode(.inline)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1507,9 +1507,7 @@
// Settings -> About App

"settings.about_app.title" = "About App";
"settings.about_app.app_name" = "%@ Wallet";
"settings.about_app.description" = "The %@ wallet is built for those looking to invest and store cryptocurrencies in a private and independent manner.\n\nIt's a non-custodial, peer-to-peer wallet where only the user has control over the funds. It doesn't collect any data and keeps the user independent by not locking the user's funds to a specific wallet app.\n\nThe %@ wallet is fully open-source and anyone can confirm the app works exactly as it claims to.";
"settings.about_app.whats_new" = "What's New";
"settings.about_app.app_version" = "App Version";
"settings.about_app.website" = "Website";

// Settings -> About App -> Contact
Expand Down