Add a warning to the Link New Device instructions. (#5916)

This commit is contained in:
Doug
2026-07-22 14:56:49 +01:00
committed by GitHub
parent b46189d05f
commit 94313173f0
8 changed files with 20 additions and 9 deletions
@@ -950,6 +950,7 @@
"screen_link_new_device_desktop_step3" = "Scan the QR code with this device"; "screen_link_new_device_desktop_step3" = "Scan the QR code with this device";
"screen_link_new_device_desktop_submit" = "Ready to scan"; "screen_link_new_device_desktop_submit" = "Ready to scan";
"screen_link_new_device_desktop_title" = "Open %1$@ on a desktop computer to get the QR code"; "screen_link_new_device_desktop_title" = "Open %1$@ on a desktop computer to get the QR code";
"screen_link_new_device_desktop_warning" = "Only scan a QR code after following the steps above on your own device. Never scan a code sent by another person.";
"screen_link_new_device_enter_number_error_numbers_do_not_match" = "The numbers don’t match"; "screen_link_new_device_enter_number_error_numbers_do_not_match" = "The numbers don’t match";
"screen_link_new_device_enter_number_notice" = "Enter 2-digit code"; "screen_link_new_device_enter_number_notice" = "Enter 2-digit code";
"screen_link_new_device_enter_number_subtitle" = "This will verify that the connection to your other device is secure."; "screen_link_new_device_enter_number_subtitle" = "This will verify that the connection to your other device is secure.";
@@ -950,6 +950,7 @@
"screen_link_new_device_desktop_step3" = "Scan the QR code with this device"; "screen_link_new_device_desktop_step3" = "Scan the QR code with this device";
"screen_link_new_device_desktop_submit" = "Ready to scan"; "screen_link_new_device_desktop_submit" = "Ready to scan";
"screen_link_new_device_desktop_title" = "Open %1$@ on a desktop computer to get the QR code"; "screen_link_new_device_desktop_title" = "Open %1$@ on a desktop computer to get the QR code";
"screen_link_new_device_desktop_warning" = "Only scan a QR code after following the steps above on your own device. Never scan a code sent by another person.";
"screen_link_new_device_enter_number_error_numbers_do_not_match" = "The numbers don’t match"; "screen_link_new_device_enter_number_error_numbers_do_not_match" = "The numbers don’t match";
"screen_link_new_device_enter_number_notice" = "Enter 2-digit code"; "screen_link_new_device_enter_number_notice" = "Enter 2-digit code";
"screen_link_new_device_enter_number_subtitle" = "This will verify that the connection to your other device is secure."; "screen_link_new_device_enter_number_subtitle" = "This will verify that the connection to your other device is secure.";
+2
View File
@@ -2218,6 +2218,8 @@ internal nonisolated enum L10n {
internal static func screenLinkNewDeviceDesktopTitle(_ p1: Any) -> String { internal static func screenLinkNewDeviceDesktopTitle(_ p1: Any) -> String {
return L10n.tr("Localizable", "screen_link_new_device_desktop_title", String(describing: p1)) return L10n.tr("Localizable", "screen_link_new_device_desktop_title", String(describing: p1))
} }
/// Only scan a QR code after following the steps above on your own device. Never scan a code sent by another person.
internal static var screenLinkNewDeviceDesktopWarning: String { return L10n.tr("Localizable", "screen_link_new_device_desktop_warning") }
/// The numbers don’t match /// The numbers don’t match
internal static var screenLinkNewDeviceEnterNumberErrorNumbersDoNotMatch: String { return L10n.tr("Localizable", "screen_link_new_device_enter_number_error_numbers_do_not_match") } internal static var screenLinkNewDeviceEnterNumberErrorNumbersDoNotMatch: String { return L10n.tr("Localizable", "screen_link_new_device_enter_number_error_numbers_do_not_match") }
/// Enter 2-digit code /// Enter 2-digit code
@@ -75,12 +75,19 @@ struct QRCodeLoginScreen: View {
private var linkDesktopInstructionsContent: some View { private var linkDesktopInstructionsContent: some View {
FullscreenDialog(topPadding: 24, horizontalPadding: 24) { FullscreenDialog(topPadding: 24, horizontalPadding: 24) {
VStack(alignment: .leading, spacing: 40) { VStack(alignment: .leading, spacing: 32) {
TitleAndIcon(title: L10n.screenLinkNewDeviceDesktopTitle(InfoPlistReader.main.productionAppName), TitleAndIcon(title: L10n.screenLinkNewDeviceDesktopTitle(InfoPlistReader.main.productionAppName),
icon: \.computer, icon: \.computer,
iconStyle: .default) iconStyle: .default)
.padding(.bottom, 8)
SFNumberedListView(items: context.viewState.instructions.linkDesktopItems) SFNumberedListView(items: context.viewState.instructions.linkDesktopItems)
Text(L10n.screenLinkNewDeviceDesktopWarning)
.font(.compound.bodyMDSemibold)
.foregroundStyle(.compound.textCriticalPrimary)
.padding(16)
.background(.compound.bgCriticalSubtle, in: .rect(cornerRadius: 14))
} }
} bottomContent: { } bottomContent: {
Button(L10n.screenLinkNewDeviceDesktopSubmit) { Button(L10n.screenLinkNewDeviceDesktopSubmit) {
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:4d46912b1b9cb88d36f8daab25770ae998df5568d35cb8f8f5b05f270e7491e4 oid sha256:5e600e1340aa4d03ae0dff6ce33c2d4823a30494df85fe990aba805f42c63b33
size 128409 size 152338
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:b3d805fe6fe2de8c73439236a9daad1e995ca9d015d12aa4de4c7b1907980181 oid sha256:ccef7cc823dd11b19a668db8da19e4ff2dd6a2cc469832f907a72d20444cfe0f
size 159445 size 201447
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:1723a176625277e615190abaa9d38356d01395634c4a315011d80ceb3ee4e59f oid sha256:f5289a3d353afcb86a0f311d59bf843371a8445387dc7e94c85ce92a856e6d33
size 78955 size 102129
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:13d9955ecd0a6a5f48db95d507118168af1c62f3449fdd10ec50718b9bd7c83c oid sha256:a4ebd22aa591526ff9b17d081f23fc6e618ba4bfec757f0b946588aa32bebf68
size 114827 size 154496