From 2f9ca3c0f69cb0632c1d8c4950ec1d08175d21b2 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Tue, 15 Aug 2023 17:13:17 +1000 Subject: [PATCH] WIP: landing page --- Session.xcodeproj/project.pbxproj | 4 + .../Translations/de.lproj/Localizable.strings | 8 ++ .../Translations/en.lproj/Localizable.strings | 8 ++ .../Translations/es.lproj/Localizable.strings | 8 ++ .../Translations/fa.lproj/Localizable.strings | 8 ++ .../Translations/fi.lproj/Localizable.strings | 8 ++ .../Translations/fr.lproj/Localizable.strings | 8 ++ .../Translations/hi.lproj/Localizable.strings | 8 ++ .../Translations/hr.lproj/Localizable.strings | 8 ++ .../id-ID.lproj/Localizable.strings | 8 ++ .../Translations/it.lproj/Localizable.strings | 8 ++ .../Translations/ja.lproj/Localizable.strings | 8 ++ .../Translations/nl.lproj/Localizable.strings | 8 ++ .../Translations/pl.lproj/Localizable.strings | 8 ++ .../pt_BR.lproj/Localizable.strings | 8 ++ .../Translations/ru.lproj/Localizable.strings | 8 ++ .../Translations/si.lproj/Localizable.strings | 8 ++ .../Translations/sk.lproj/Localizable.strings | 8 ++ .../Translations/sv.lproj/Localizable.strings | 8 ++ .../Translations/th.lproj/Localizable.strings | 8 ++ .../vi-VN.lproj/Localizable.strings | 8 ++ .../zh-Hant.lproj/Localizable.strings | 8 ++ .../zh_CN.lproj/Localizable.strings | 8 ++ Session/Onboarding/LandingView.swift | 133 ++++++++++++++++++ 24 files changed, 313 insertions(+) create mode 100644 Session/Onboarding/LandingView.swift diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index f502f7d7c..6e5a8f895 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -158,6 +158,7 @@ 7BD976972A776C76001B466F /* SessionCarouselView+SwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BE2701D2A64C11500CEB71A /* SessionCarouselView+SwiftUI.swift */; }; 7BDCFC08242186E700641C39 /* NotificationServiceExtensionContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BDCFC07242186E700641C39 /* NotificationServiceExtensionContext.swift */; }; 7BDCFC0B2421EB7600641C39 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B6F509951AA53F760068F56A /* Localizable.strings */; }; + 7BDE2A982A8B122900AE4393 /* LandingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BDE2A972A8B122900AE4393 /* LandingView.swift */; }; 7BF8D1FB2A70AF57005F1D6E /* SwiftUI+Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF8D1FA2A70AF57005F1D6E /* SwiftUI+Theme.swift */; }; 7BFA8AE32831D0D4001876F3 /* ContextMenuVC+EmojiReactsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BFA8AE22831D0D4001876F3 /* ContextMenuVC+EmojiReactsView.swift */; }; 7BFD1A8A2745C4F000FB91B9 /* Permissions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BFD1A892745C4F000FB91B9 /* Permissions.swift */; }; @@ -1272,6 +1273,7 @@ 7BD687D22A5D283200D8E455 /* build_libSession_util.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build_libSession_util.sh; sourceTree = ""; }; 7BDCFC0424206E7300641C39 /* SessionNotificationServiceExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = SessionNotificationServiceExtension.entitlements; sourceTree = ""; }; 7BDCFC07242186E700641C39 /* NotificationServiceExtensionContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationServiceExtensionContext.swift; sourceTree = ""; }; + 7BDE2A972A8B122900AE4393 /* LandingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LandingView.swift; sourceTree = ""; }; 7BE2701D2A64C11500CEB71A /* SessionCarouselView+SwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SessionCarouselView+SwiftUI.swift"; sourceTree = ""; }; 7BF8D1FA2A70AF57005F1D6E /* SwiftUI+Theme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SwiftUI+Theme.swift"; sourceTree = ""; }; 7BFA8AE22831D0D4001876F3 /* ContextMenuVC+EmojiReactsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ContextMenuVC+EmojiReactsView.swift"; sourceTree = ""; }; @@ -2993,6 +2995,7 @@ B85357BE23A1AE0800AAF6CD /* SeedReminderView.swift */, B85357C223A1BD1200AAF6CD /* SeedVC.swift */, B8D0A26825E4A2C200C1835E /* Onboarding.swift */, + 7BDE2A972A8B122900AE4393 /* LandingView.swift */, ); path = Onboarding; sourceTree = ""; @@ -6138,6 +6141,7 @@ C31D1DE32521718E005D4DA8 /* UserSelectionVC.swift in Sources */, 34A6C28021E503E700B5B12E /* OWSImagePickerController.swift in Sources */, C31A6C5C247F2CF3001123EF /* CGRect+Utilities.swift in Sources */, + 7BDE2A982A8B122900AE4393 /* LandingView.swift in Sources */, FD4B200E283492210034334B /* InsetLockableTableView.swift in Sources */, B8269D3325C7A8C600488AB4 /* InputViewButton.swift in Sources */, B8269D3D25C7B34D00488AB4 /* InputTextView.swift in Sources */, diff --git a/Session/Meta/Translations/de.lproj/Localizable.strings b/Session/Meta/Translations/de.lproj/Localizable.strings index 8bcb25dae..d302b4f14 100644 --- a/Session/Meta/Translations/de.lproj/Localizable.strings +++ b/Session/Meta/Translations/de.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/en.lproj/Localizable.strings b/Session/Meta/Translations/en.lproj/Localizable.strings index 73a0a30ef..5da6cb25e 100644 --- a/Session/Meta/Translations/en.lproj/Localizable.strings +++ b/Session/Meta/Translations/en.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/es.lproj/Localizable.strings b/Session/Meta/Translations/es.lproj/Localizable.strings index a6443d9b5..7c99f276a 100644 --- a/Session/Meta/Translations/es.lproj/Localizable.strings +++ b/Session/Meta/Translations/es.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/fa.lproj/Localizable.strings b/Session/Meta/Translations/fa.lproj/Localizable.strings index 93eb19aee..13e988207 100644 --- a/Session/Meta/Translations/fa.lproj/Localizable.strings +++ b/Session/Meta/Translations/fa.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/fi.lproj/Localizable.strings b/Session/Meta/Translations/fi.lproj/Localizable.strings index 12b1118c9..90029c8ee 100644 --- a/Session/Meta/Translations/fi.lproj/Localizable.strings +++ b/Session/Meta/Translations/fi.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/fr.lproj/Localizable.strings b/Session/Meta/Translations/fr.lproj/Localizable.strings index 13368d020..2bcad1d08 100644 --- a/Session/Meta/Translations/fr.lproj/Localizable.strings +++ b/Session/Meta/Translations/fr.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/hi.lproj/Localizable.strings b/Session/Meta/Translations/hi.lproj/Localizable.strings index c129fe04d..f133434de 100644 --- a/Session/Meta/Translations/hi.lproj/Localizable.strings +++ b/Session/Meta/Translations/hi.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/hr.lproj/Localizable.strings b/Session/Meta/Translations/hr.lproj/Localizable.strings index f0165ad1c..9e584ec6c 100644 --- a/Session/Meta/Translations/hr.lproj/Localizable.strings +++ b/Session/Meta/Translations/hr.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/id-ID.lproj/Localizable.strings b/Session/Meta/Translations/id-ID.lproj/Localizable.strings index f2f2d802c..81f4b80f3 100644 --- a/Session/Meta/Translations/id-ID.lproj/Localizable.strings +++ b/Session/Meta/Translations/id-ID.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/it.lproj/Localizable.strings b/Session/Meta/Translations/it.lproj/Localizable.strings index 65ea7de30..ce9d39d78 100644 --- a/Session/Meta/Translations/it.lproj/Localizable.strings +++ b/Session/Meta/Translations/it.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/ja.lproj/Localizable.strings b/Session/Meta/Translations/ja.lproj/Localizable.strings index e8d9a1ec8..c9b0b6d2b 100644 --- a/Session/Meta/Translations/ja.lproj/Localizable.strings +++ b/Session/Meta/Translations/ja.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/nl.lproj/Localizable.strings b/Session/Meta/Translations/nl.lproj/Localizable.strings index 6a76cd068..89c4e2362 100644 --- a/Session/Meta/Translations/nl.lproj/Localizable.strings +++ b/Session/Meta/Translations/nl.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/pl.lproj/Localizable.strings b/Session/Meta/Translations/pl.lproj/Localizable.strings index 2c70b58fe..2b153dba3 100644 --- a/Session/Meta/Translations/pl.lproj/Localizable.strings +++ b/Session/Meta/Translations/pl.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings index 9c70d1638..752b50617 100644 --- a/Session/Meta/Translations/pt_BR.lproj/Localizable.strings +++ b/Session/Meta/Translations/pt_BR.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/ru.lproj/Localizable.strings b/Session/Meta/Translations/ru.lproj/Localizable.strings index 70d23dffd..b704414db 100644 --- a/Session/Meta/Translations/ru.lproj/Localizable.strings +++ b/Session/Meta/Translations/ru.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/si.lproj/Localizable.strings b/Session/Meta/Translations/si.lproj/Localizable.strings index ef9f0e74d..cd6b3de5d 100644 --- a/Session/Meta/Translations/si.lproj/Localizable.strings +++ b/Session/Meta/Translations/si.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/sk.lproj/Localizable.strings b/Session/Meta/Translations/sk.lproj/Localizable.strings index 619ad474c..46a966347 100644 --- a/Session/Meta/Translations/sk.lproj/Localizable.strings +++ b/Session/Meta/Translations/sk.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/sv.lproj/Localizable.strings b/Session/Meta/Translations/sv.lproj/Localizable.strings index 944c0917c..ec101d557 100644 --- a/Session/Meta/Translations/sv.lproj/Localizable.strings +++ b/Session/Meta/Translations/sv.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/th.lproj/Localizable.strings b/Session/Meta/Translations/th.lproj/Localizable.strings index 576744efe..c53fe6c0b 100644 --- a/Session/Meta/Translations/th.lproj/Localizable.strings +++ b/Session/Meta/Translations/th.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings index 9e7dab1f1..7622a4079 100644 --- a/Session/Meta/Translations/vi-VN.lproj/Localizable.strings +++ b/Session/Meta/Translations/vi-VN.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings index cea8a4480..40084bdbc 100644 --- a/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh-Hant.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings index 736085a01..3c56ee8a8 100644 --- a/Session/Meta/Translations/zh_CN.lproj/Localizable.strings +++ b/Session/Meta/Translations/zh_CN.lproj/Localizable.strings @@ -653,3 +653,11 @@ "LOAD_RECOVERY_PASSWORD_ERROR" = "An error occurred when trying to load your recovery password.\n\nPlease export your logs, then upload the file though Session's Help Desk to help resolve this issue."; "FAILED_TO_STORE_OUTGOING_MESSAGE" = "An error occurred when trying to store the outgoing message for sending, you may need to restart the app before you can send messages."; "database_inaccessible_error" = "There is an issue opening the database. Please restart the app and try again."; +//Onboarding +"onboarding_chat_bubble_1" = "Welcome to Session πŸ‘‹"; +"onboarding_chat_bubble_2" = "Session is engineered to protect your privacy."; +"onboarding_chat_bubble_3" = "You don’t even need a phone number to sign up."; +"onboarding_chat_bubble_4" = "Creating an account is instant, free, and anonymous πŸ‘‡"; +"onboarding_landing_title" = "Privacy in your pocket."; +"onboarding_landing_register_button_title" = "Create account"; +"onboarding_landing_restore_button_title" = "I have an account"; diff --git a/Session/Onboarding/LandingView.swift b/Session/Onboarding/LandingView.swift new file mode 100644 index 000000000..80c952ab1 --- /dev/null +++ b/Session/Onboarding/LandingView.swift @@ -0,0 +1,133 @@ +// Copyright Β© 2023 Rangeproof Pty Ltd. All rights reserved. + +import SwiftUI +import SessionUIKit + +struct LandingView: View { + var body: some View { + NavigationView { + ZStack (alignment: .topLeading) { + if #available(iOS 14.0, *) { + ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea() + } else { + ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary) + } + + VStack( + alignment: .center, + spacing: 16 + ) { + Spacer() + + Text("onboarding_landing_title".localized()) + .bold() + .font(.system(size: 26)) + .foregroundColor(themeColor: .textPrimary) + + FakeChat() + + Spacer() + + Button { + + } label: { + Text("onboarding_landing_register_button_title".localized()) + .bold() + .font(.system(size: 14)) + .foregroundColor(themeColor: .sessionButton_filledText) + .frame( + width: 262, + height: 40, + alignment: .center + ) + .background(ThemeManager.currentTheme.colorSwiftUI(for: .sessionButton_filledBackground)) + .cornerRadius(20) + } + + Button { + + } label: { + Text("onboarding_landing_restore_button_title".localized()) + .bold() + .font(.system(size: 14)) + .foregroundColor(themeColor: .sessionButton_text) + .frame( + width: 262, + height: 40, + alignment: .center + ) + .overlay( + Capsule() + .stroke(ThemeManager.currentTheme.colorSwiftUI(for: .sessionButton_border)!) + ) + } + + Button { + + } label: { + Text("") + } + } + } + } + } +} + +struct ChatBubble: View { + let text: String + let outgoing: Bool + + var body: some View { + let backgroundColor: Color? = ThemeManager.currentTheme.colorSwiftUI(for: (outgoing ? .messageBubble_outgoingBackground : .messageBubble_incomingBackground)) + Text(text) + .foregroundColor(themeColor: (outgoing ? .messageBubble_outgoingText : .messageBubble_incomingText)) + .font(.system(size: 16)) + .padding(.all, 12) + .background(backgroundColor) + .cornerRadius(13) + .frame( + maxWidth: 230, + alignment: (outgoing ? .trailing : .leading) + ) + } +} + +struct FakeChat: View { + let chatBubbles: [ChatBubble] = [ + ChatBubble(text: "onboarding_chat_bubble_1".localized(), outgoing: false), + ChatBubble(text: "onboarding_chat_bubble_2".localized(), outgoing: true), + ChatBubble(text: "onboarding_chat_bubble_3".localized(), outgoing: false), + ChatBubble(text: "onboarding_chat_bubble_4".localized(), outgoing: true), + ] + + var body: some View { + ScrollView( + .vertical, + showsIndicators: false + ) { + VStack( + alignment: .leading, + spacing: 18 + ) { + ForEach( + 0...(chatBubbles.count - 1), + id: \.self + ) { index in + let chatBubble: ChatBubble = chatBubbles[index] + chatBubble + .frame( + maxWidth: .infinity, + alignment: chatBubble.outgoing ? .trailing : .leading + ) + } + } + .padding(.horizontal, 36) + } + } +} + +struct LandingView_Previews: PreviewProvider { + static var previews: some View { + LandingView() + } +}