diff --git a/Session/Meta/Translations/de.lproj/Localizable.strings b/Session/Meta/Translations/de.lproj/Localizable.strings index b170774e7..38d25e0ad 100644 --- a/Session/Meta/Translations/de.lproj/Localizable.strings +++ b/Session/Meta/Translations/de.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/en.lproj/Localizable.strings b/Session/Meta/Translations/en.lproj/Localizable.strings index 0ad0d0574..9fe87f3cd 100644 --- a/Session/Meta/Translations/en.lproj/Localizable.strings +++ b/Session/Meta/Translations/en.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/es.lproj/Localizable.strings b/Session/Meta/Translations/es.lproj/Localizable.strings index 29166efa9..35557a5b7 100644 --- a/Session/Meta/Translations/es.lproj/Localizable.strings +++ b/Session/Meta/Translations/es.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/fa.lproj/Localizable.strings b/Session/Meta/Translations/fa.lproj/Localizable.strings index 3a620631a..614b299ba 100644 --- a/Session/Meta/Translations/fa.lproj/Localizable.strings +++ b/Session/Meta/Translations/fa.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/fi.lproj/Localizable.strings b/Session/Meta/Translations/fi.lproj/Localizable.strings index c94ad7498..1bba10382 100644 --- a/Session/Meta/Translations/fi.lproj/Localizable.strings +++ b/Session/Meta/Translations/fi.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/fr.lproj/Localizable.strings b/Session/Meta/Translations/fr.lproj/Localizable.strings index 2e8cd975b..e1e867bca 100644 --- a/Session/Meta/Translations/fr.lproj/Localizable.strings +++ b/Session/Meta/Translations/fr.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/hi.lproj/Localizable.strings b/Session/Meta/Translations/hi.lproj/Localizable.strings index e1e8c7d04..13fb6e87f 100644 --- a/Session/Meta/Translations/hi.lproj/Localizable.strings +++ b/Session/Meta/Translations/hi.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/hr.lproj/Localizable.strings b/Session/Meta/Translations/hr.lproj/Localizable.strings index 72364f2e5..3948d638e 100644 --- a/Session/Meta/Translations/hr.lproj/Localizable.strings +++ b/Session/Meta/Translations/hr.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/id-ID.lproj/Localizable.strings b/Session/Meta/Translations/id-ID.lproj/Localizable.strings index cb2d89ebc..def22dfff 100644 --- a/Session/Meta/Translations/id-ID.lproj/Localizable.strings +++ b/Session/Meta/Translations/id-ID.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/it.lproj/Localizable.strings b/Session/Meta/Translations/it.lproj/Localizable.strings index f3f595d72..e39764ba1 100644 --- a/Session/Meta/Translations/it.lproj/Localizable.strings +++ b/Session/Meta/Translations/it.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/ja.lproj/Localizable.strings b/Session/Meta/Translations/ja.lproj/Localizable.strings index 9c40469eb..0fa0b9937 100644 --- a/Session/Meta/Translations/ja.lproj/Localizable.strings +++ b/Session/Meta/Translations/ja.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/nl.lproj/Localizable.strings b/Session/Meta/Translations/nl.lproj/Localizable.strings index 786bd4f0a..80171de9a 100644 --- a/Session/Meta/Translations/nl.lproj/Localizable.strings +++ b/Session/Meta/Translations/nl.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/pl.lproj/Localizable.strings b/Session/Meta/Translations/pl.lproj/Localizable.strings index 66e3913b2..7e12e4eb9 100644 --- a/Session/Meta/Translations/pl.lproj/Localizable.strings +++ b/Session/Meta/Translations/pl.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings index 2fe421932..e0adcea14 100644 --- a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings +++ b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/ru.lproj/Localizable.strings b/Session/Meta/Translations/ru.lproj/Localizable.strings index ba6d89b2a..ffc847b5b 100644 --- a/Session/Meta/Translations/ru.lproj/Localizable.strings +++ b/Session/Meta/Translations/ru.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/si.lproj/Localizable.strings b/Session/Meta/Translations/si.lproj/Localizable.strings index 159065011..e0ba53d96 100644 --- a/Session/Meta/Translations/si.lproj/Localizable.strings +++ b/Session/Meta/Translations/si.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/sk.lproj/Localizable.strings b/Session/Meta/Translations/sk.lproj/Localizable.strings index 1d092ae6a..db4a43dd9 100644 --- a/Session/Meta/Translations/sk.lproj/Localizable.strings +++ b/Session/Meta/Translations/sk.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/sv.lproj/Localizable.strings b/Session/Meta/Translations/sv.lproj/Localizable.strings index e2f327681..9f93a8a29 100644 --- a/Session/Meta/Translations/sv.lproj/Localizable.strings +++ b/Session/Meta/Translations/sv.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/th.lproj/Localizable.strings b/Session/Meta/Translations/th.lproj/Localizable.strings index 8ead19603..554c10bb6 100644 --- a/Session/Meta/Translations/th.lproj/Localizable.strings +++ b/Session/Meta/Translations/th.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings index 897b50013..e01cdcd5a 100644 --- a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings +++ b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings index fa0ce4e0c..5e574f88b 100644 --- a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings index 3906dae4c..f67c11b6b 100644 --- a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings @@ -684,3 +684,5 @@ "recovery_password_error_length" = "The Recovery Password you entered is not long enough. Please check and try again."; "recovery_password_error_invalid" = "Some of the words in your Recovery Password are incorrect. Please check and try again."; "recovery_password_error_generic" = "Please check your Recovery Password and try again."; +"modal_open_url_title_2" = "Open URL"; +"modal_open_url_explanation_2" = "This will open in your browser."; diff --git a/Session/Onboarding/LandingView.swift b/Session/Onboarding/LandingView.swift index 094ee191d..0bf52a5b7 100644 --- a/Session/Onboarding/LandingView.swift +++ b/Session/Onboarding/LandingView.swift @@ -80,7 +80,7 @@ struct LandingView: View { .padding(.horizontal, Values.massiveSpacing) Button { - + openLegalUrl() } label: { let attributedText: NSAttributedString = { let text = String(format: "onboarding_T&C".localized(), "terms_of_service".localized(), "privacy_policy".localized()) @@ -124,6 +124,30 @@ struct LandingView: View { viewController.setNavBarTitle("onboarding_load_account_title".localized()) self.host.controller?.navigationController?.pushViewController(viewController, animated: true) } + + private func openLegalUrl() { + let modal: ConfirmationModal = ConfirmationModal( + info: ConfirmationModal.Info( + title: "modal_open_url_title_2".localized(), + body: .text("modal_open_url_explanation_2".localized()), + confirmTitle: "terms_of_service".localized(), + confirmStyle: .textPrimary, + cancelTitle: "privacy_policy".localized(), + cancelStyle: .textPrimary, + onConfirm: { _ in + if let url: URL = URL(string: "https://getsession.org/terms-of-service") { + UIApplication.shared.open(url) + } + }, + onCancel: { _ in + if let url: URL = URL(string: "https://getsession.org/privacy-policy") { + UIApplication.shared.open(url) + } + } + ) + ) + self.host.controller?.present(modal, animated: true) + } } struct ChatBubble: View {