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
+2
View File
@@ -2218,6 +2218,8 @@ internal nonisolated enum L10n {
internal static func screenLinkNewDeviceDesktopTitle(_ p1: Any) -> String {
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
internal static var screenLinkNewDeviceEnterNumberErrorNumbersDoNotMatch: String { return L10n.tr("Localizable", "screen_link_new_device_enter_number_error_numbers_do_not_match") }
/// Enter 2-digit code
@@ -75,12 +75,19 @@ struct QRCodeLoginScreen: View {
private var linkDesktopInstructionsContent: some View {
FullscreenDialog(topPadding: 24, horizontalPadding: 24) {
VStack(alignment: .leading, spacing: 40) {
VStack(alignment: .leading, spacing: 32) {
TitleAndIcon(title: L10n.screenLinkNewDeviceDesktopTitle(InfoPlistReader.main.productionAppName),
icon: \.computer,
iconStyle: .default)
.padding(.bottom, 8)
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: {
Button(L10n.screenLinkNewDeviceDesktopSubmit) {