Skip to content

Commit 2194908

Browse files
authored
Add a subtitle to the QR login instructions. (#3386)
1 parent 5c2b107 commit 2194908

File tree

7 files changed

+22
-12
lines changed

7 files changed

+22
-12
lines changed

ElementX/Resources/Localizations/en.lproj/Localizable.strings

+1
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@
588588
"screen_qr_code_login_initial_state_item_3" = "Select %1$@";
589589
"screen_qr_code_login_initial_state_item_3_action" = "“Link new device”";
590590
"screen_qr_code_login_initial_state_item_4" = "Scan the QR code with this device";
591+
"screen_qr_code_login_initial_state_subtitle" = "Only available if your account provider supports it.";
591592
"screen_qr_code_login_initial_state_title" = "Open %1$@ on another device to get the QR code";
592593
"screen_qr_code_login_invalid_scan_state_description" = "Use the QR code shown on the other device.";
593594
"screen_qr_code_login_invalid_scan_state_subtitle" = "Wrong QR code";

ElementX/Sources/Generated/Strings.swift

+2
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,8 @@ internal enum L10n {
13951395
internal static var screenQrCodeLoginInitialStateItem3Action: String { return L10n.tr("Localizable", "screen_qr_code_login_initial_state_item_3_action") }
13961396
/// Scan the QR code with this device
13971397
internal static var screenQrCodeLoginInitialStateItem4: String { return L10n.tr("Localizable", "screen_qr_code_login_initial_state_item_4") }
1398+
/// Only available if your account provider supports it.
1399+
internal static var screenQrCodeLoginInitialStateSubtitle: String { return L10n.tr("Localizable", "screen_qr_code_login_initial_state_subtitle") }
13981400
/// Open %1$@ on another device to get the QR code
13991401
internal static func screenQrCodeLoginInitialStateTitle(_ p1: Any) -> String {
14001402
return L10n.tr("Localizable", "screen_qr_code_login_initial_state_title", String(describing: p1))

ElementX/Sources/Screens/QRCodeLoginScreen/View/QRCodeLoginScreen.swift

+11-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,17 @@ struct QRCodeLoginScreen: View {
4343
VStack(spacing: 16) {
4444
HeroImage(icon: \.computer, style: .subtle)
4545

46-
Text(L10n.screenQrCodeLoginInitialStateTitle(InfoPlistReader.main.productionAppName))
47-
.foregroundColor(.compound.textPrimary)
48-
.font(.compound.headingMDBold)
49-
.multilineTextAlignment(.center)
46+
VStack(spacing: 8) {
47+
Text(L10n.screenQrCodeLoginInitialStateTitle(InfoPlistReader.main.productionAppName))
48+
.foregroundColor(.compound.textPrimary)
49+
.font(.compound.headingMDBold)
50+
.multilineTextAlignment(.center)
51+
52+
Text(L10n.screenQrCodeLoginInitialStateSubtitle)
53+
.font(.compound.bodyMD)
54+
.multilineTextAlignment(.center)
55+
.foregroundColor(.compound.textSecondary)
56+
}
5057
}
5158
.padding(.horizontal, 24)
5259

0 commit comments

Comments
 (0)