diff --git a/Config/BWIBuildSettings.swift b/Config/BWIBuildSettings.swift index 65d4ae5ed..c97a80499 100644 --- a/Config/BWIBuildSettings.swift +++ b/Config/BWIBuildSettings.swift @@ -627,7 +627,7 @@ class BWIBuildSettings: NSObject { var allowScanServerQRCode = true // MARK: - Login with qr code - var allowLoginWithQR = false // should be set by the server but we disable it with false also in the app + var allowLoginWithQR = true // should be set by the server but we disable it with false also in the app // MARK: - Scan permalink qr code var clientPermalinkBaseUrl = "" diff --git a/Riot/Assets/Images.xcassets/BWI/qr.imageset/Contents.json b/Riot/Assets/Images.xcassets/BWI/qr.imageset/Contents.json new file mode 100644 index 000000000..7ea4ce5e4 --- /dev/null +++ b/Riot/Assets/Images.xcassets/BWI/qr.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "QR_dark_BuM.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" + } +} diff --git a/Riot/Assets/Images.xcassets/BWI/qr.imageset/QR_dark_BuM.png b/Riot/Assets/Images.xcassets/BWI/qr.imageset/QR_dark_BuM.png new file mode 100644 index 000000000..39f288cb1 Binary files /dev/null and b/Riot/Assets/Images.xcassets/BWI/qr.imageset/QR_dark_BuM.png differ diff --git a/Riot/Assets/de.lproj/Vector.strings b/Riot/Assets/de.lproj/Vector.strings index a9e1c5d51..0132fe099 100644 --- a/Riot/Assets/de.lproj/Vector.strings +++ b/Riot/Assets/de.lproj/Vector.strings @@ -2544,7 +2544,7 @@ "all_chats_user_menu_accessibility_label" = "Benutzermenü"; "settings_labs_enable_new_client_info_feature" = "Bezeichnung, Version und URL der Anwendung registrieren, damit diese Sitzung in der Sitzungsverwaltung besser erkennbar ist"; "settings_labs_enable_new_session_manager" = "Neue Sitzungsverwaltung"; -"authentication_qr_login_start_step2" = "Gehe zu Einstellungen -> Sicherheit und Privatsphäre"; +"authentication_qr_login_start_step2" = "Gehe zu Alle Einstellungen -> Sitzungen"; "authentication_qr_login_scan_subtitle" = "Positioniere den QR-Code innerhalb des Quadrats"; "authentication_qr_login_display_step2" = "Wähle „Anmelden mit QR-Code“"; "authentication_qr_login_scan_title" = "QR-Code einlesen"; @@ -2553,8 +2553,8 @@ "authentication_qr_login_start_display_qr" = "QR-Code auf diesem Gerät anzeigen"; "authentication_qr_login_start_step4" = "Wähle „Zeige QR-Code auf diesem Gerät“"; "authentication_qr_login_display_title" = "Verbinde ein Gerät"; -"authentication_qr_login_start_step3" = "Wähle „Verbinde ein Gerät“"; -"authentication_qr_login_start_title" = "QR-Code einlesen"; +"authentication_qr_login_start_step3" = "Wähle \"Mit QR-Code anmelden\""; +"authentication_qr_login_start_title" = "QR-Code scannen"; "authentication_login_with_qr" = "Anmelden mit QR-Code"; "device_type_name_unknown" = "Unbekannt"; "device_type_name_mobile" = "Mobil"; @@ -2583,11 +2583,11 @@ "authentication_qr_login_loading_signed_in" = "Du bist nun mit deinem anderen Gerät angemeldet."; "authentication_qr_login_loading_waiting_signin" = "Warte auf Geräteanmeldung."; "authentication_qr_login_loading_connecting_device" = "Verbinde mit Gerät"; -"authentication_qr_login_confirm_alert" = "Bitte stelle sicher, dass du die Quelle dieses Codes kennst. Durch das Verbinden des Gerätes wirst du jemandem vollen Zugriff auf dein Konto gewähren."; +"authentication_qr_login_confirm_alert" = "Keine Übereinstimmung?"; "authentication_qr_login_confirm_subtitle" = "Bestätige, dass der folgende Code mit dem auf deinem anderen Gerät übereinstimmt:"; "authentication_qr_login_confirm_title" = "Sichere Verbindung aufgebaut"; "authentication_qr_login_display_step1" = "Öffne Element auf deinem anderen Gerät"; -"authentication_qr_login_start_step1" = "Öffne Element auf deinem anderen Gerät"; +"authentication_qr_login_start_step1" = "Öffne die Webapp auf deinem dienstlichen Computer"; "authentication_qr_login_start_subtitle" = "Nutze die Kamera dieses Gerätes, um den auf deinem anderen Gerät angezeigten QR-Code einzulesen:"; "wysiwyg_composer_start_action_text_formatting" = "Textformatierung"; "wysiwyg_composer_start_action_camera" = "Kamera"; diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 432f8ed23..e884547f4 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -215,9 +215,9 @@ "authentication_qr_login_start_title" = "Scan QR code"; "authentication_qr_login_start_subtitle" = "Use the camera on this device to scan the QR code shown on your other device:"; -"authentication_qr_login_start_step1" = "Open Element on your other device"; -"authentication_qr_login_start_step2" = "Go to Settings -> Security & Privacy"; -"authentication_qr_login_start_step3" = "Select ‘Link a device’"; +"authentication_qr_login_start_step1" = "Open the Webapp on your business computer"; +"authentication_qr_login_start_step2" = "Go to Settings -> Sessions"; +"authentication_qr_login_start_step3" = "Select ‘Login with QR code’"; "authentication_qr_login_start_step4" = "Select ‘Show QR code on this device’"; "authentication_qr_login_start_need_alternative" = "Need an alternative method?"; "authentication_qr_login_start_display_qr" = "Show QR code on this device"; @@ -232,7 +232,7 @@ "authentication_qr_login_confirm_title" = "Secure connection established"; "authentication_qr_login_confirm_subtitle" = "Confirm that the code below matches with your other device:"; -"authentication_qr_login_confirm_alert" = "Please ensure that you know the origin of this code. By linking devices, you will provide someone with full access to your account."; +"authentication_qr_login_confirm_alert" = "No match?"; "authentication_qr_login_loading_connecting_device" = "Connecting to device"; "authentication_qr_login_loading_waiting_signin" = "Waiting for device to sign in."; diff --git a/RiotSwiftUI/Modules/Authentication/Login/View/AuthenticationLoginScreen.swift b/RiotSwiftUI/Modules/Authentication/Login/View/AuthenticationLoginScreen.swift index 5d5b4be87..afd5fc530 100644 --- a/RiotSwiftUI/Modules/Authentication/Login/View/AuthenticationLoginScreen.swift +++ b/RiotSwiftUI/Modules/Authentication/Login/View/AuthenticationLoginScreen.swift @@ -182,7 +182,13 @@ struct AuthenticationLoginScreen: View { /// A QR login button that can be used for login. var qrLoginButton: some View { Button(action: qrLogin) { - Text(VectorL10n.authenticationLoginWithQr) + Label { + Text(VectorL10n.authenticationLoginWithQr) + } icon: { + Image(uiImage: Asset.Images.qr.image) + .resizable() + .frame(width: 24, height: 24) + } } .buttonStyle(SecondaryActionButtonStyle(font: theme.fonts.bodySB)) .padding(.vertical) diff --git a/RiotSwiftUI/Modules/Authentication/QRLogin/Confirm/View/AuthenticationQRLoginConfirmScreen.swift b/RiotSwiftUI/Modules/Authentication/QRLogin/Confirm/View/AuthenticationQRLoginConfirmScreen.swift index b0ddb0906..77f19f1e9 100644 --- a/RiotSwiftUI/Modules/Authentication/QRLogin/Confirm/View/AuthenticationQRLoginConfirmScreen.swift +++ b/RiotSwiftUI/Modules/Authentication/QRLogin/Confirm/View/AuthenticationQRLoginConfirmScreen.swift @@ -88,7 +88,7 @@ struct AuthenticationQRLoginConfirmScreen: View { .padding(10) .multilineTextAlignment(.center) .font(theme.fonts.body) - .foregroundColor(theme.colors.alert) + .foregroundColor(theme.colors.primaryContent) .shapedBorder(color: theme.colors.alert, borderWidth: 1, shape: RoundedRectangle(cornerRadius: 8)) .fixedSize(horizontal: false, vertical: true) .padding(.bottom, 12) diff --git a/RiotSwiftUI/Modules/Authentication/QRLogin/Start/View/AuthenticationQRLoginStartScreen.swift b/RiotSwiftUI/Modules/Authentication/QRLogin/Start/View/AuthenticationQRLoginStartScreen.swift index a5025a321..07fb52454 100644 --- a/RiotSwiftUI/Modules/Authentication/QRLogin/Start/View/AuthenticationQRLoginStartScreen.swift +++ b/RiotSwiftUI/Modules/Authentication/QRLogin/Start/View/AuthenticationQRLoginStartScreen.swift @@ -104,7 +104,7 @@ struct AuthenticationQRLoginStartScreen: View { var stepsView: some View { VStack(alignment: .leading, spacing: 12) { ForEach(steps) { step in - HStack { + HStack(spacing: 15) { Text(String(step.id)) .font(theme.fonts.caption2SB) .foregroundColor(theme.colors.accent) @@ -123,8 +123,9 @@ struct AuthenticationQRLoginStartScreen: View { private let steps = [ QRLoginStartStep(id: 1, description: VectorL10n.authenticationQrLoginStartStep1), QRLoginStartStep(id: 2, description: VectorL10n.authenticationQrLoginStartStep2), - QRLoginStartStep(id: 3, description: VectorL10n.authenticationQrLoginStartStep3), - QRLoginStartStep(id: 4, description: VectorL10n.authenticationQrLoginStartStep4) + QRLoginStartStep(id: 3, description: VectorL10n.authenticationQrLoginStartStep3) + // bwi: 5145 (show only the first three steps) + // QRLoginStartStep(id: 4, description: VectorL10n.authenticationQrLoginStartStep4) ] /// Sends the `scanQR` view action.