From 4b44b970466bdba043a46f8504744981879456f1 Mon Sep 17 00:00:00 2001 From: EA Date: Wed, 29 May 2024 15:04:01 +0600 Subject: [PATCH] Apply new layout for About module --- .../Modules/Settings/About/AboutView.swift | 130 ++++++++---------- .../en.lproj/Localizable.strings | 4 +- 2 files changed, 57 insertions(+), 77 deletions(-) diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/Settings/About/AboutView.swift b/UnstoppableWallet/UnstoppableWallet/Modules/Settings/About/AboutView.swift index 28e875e515..8f11754c78 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/Settings/About/AboutView.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/Settings/About/AboutView.swift @@ -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() @@ -107,5 +88,6 @@ struct AboutView: View { } } .navigationTitle("settings.about_app.title".localized) + .navigationBarTitleDisplayMode(.inline) } } diff --git a/UnstoppableWallet/UnstoppableWallet/en.lproj/Localizable.strings b/UnstoppableWallet/UnstoppableWallet/en.lproj/Localizable.strings index 77edb7d63b..08598f1cbf 100644 --- a/UnstoppableWallet/UnstoppableWallet/en.lproj/Localizable.strings +++ b/UnstoppableWallet/UnstoppableWallet/en.lproj/Localizable.strings @@ -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