diff --git a/features/linknewdevice/impl/src/main/kotlin/io/element/android/features/linknewdevice/impl/screens/desktop/DesktopNoticeView.kt b/features/linknewdevice/impl/src/main/kotlin/io/element/android/features/linknewdevice/impl/screens/desktop/DesktopNoticeView.kt
index c7f0bb61e7..ad2e67dbc7 100644
--- a/features/linknewdevice/impl/src/main/kotlin/io/element/android/features/linknewdevice/impl/screens/desktop/DesktopNoticeView.kt
+++ b/features/linknewdevice/impl/src/main/kotlin/io/element/android/features/linknewdevice/impl/screens/desktop/DesktopNoticeView.kt
@@ -9,21 +9,25 @@
package io.element.android.features.linknewdevice.impl.screens.desktop
+import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
-import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.unit.dp
+import io.element.android.compound.theme.ElementTheme
import io.element.android.compound.tokens.generated.CompoundIcons
import io.element.android.features.linknewdevice.impl.R
import io.element.android.libraries.designsystem.atomic.organisms.NumberedListOrganism
@@ -34,6 +38,7 @@ import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.theme.LocalBuildMeta
import io.element.android.libraries.designsystem.theme.components.Button
import io.element.android.libraries.designsystem.theme.components.Icon
+import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.utils.annotatedTextWithBold
import io.element.android.libraries.permissions.api.PermissionsView
import kotlinx.collections.immutable.persistentListOf
@@ -71,11 +76,10 @@ fun DesktopNoticeView(
}
) {
Column(
- Modifier.fillMaxWidth()
+ Modifier.fillMaxWidth(),
) {
Spacer(modifier = Modifier.height(40.dp))
NumberedListOrganism(
- modifier = Modifier.fillMaxSize(),
items = persistentListOf(
AnnotatedString(stringResource(R.string.screen_link_new_device_desktop_step1, appName)),
annotatedTextWithBold(
@@ -88,6 +92,17 @@ fun DesktopNoticeView(
AnnotatedString(stringResource(R.string.screen_link_new_device_desktop_step3)),
)
)
+ Spacer(modifier = Modifier.height(32.dp))
+ Text(
+ modifier = Modifier
+ .clip(RoundedCornerShape(12.dp))
+ .background(ElementTheme.colors.bgCriticalSubtle)
+ .padding(16.dp)
+ .fillMaxWidth(),
+ text = stringResource(R.string.screen_link_new_device_desktop_warning),
+ style = ElementTheme.typography.fontBodyMdMedium,
+ color = ElementTheme.colors.textCriticalPrimary,
+ )
}
}
diff --git a/features/linknewdevice/impl/src/main/res/values/localazy.xml b/features/linknewdevice/impl/src/main/res/values/localazy.xml
index 6ffcce227a..47d25cbff6 100644
--- a/features/linknewdevice/impl/src/main/res/values/localazy.xml
+++ b/features/linknewdevice/impl/src/main/res/values/localazy.xml
@@ -5,6 +5,7 @@
"Scan the QR code with this device"
"Ready to scan"
"Open %1$s on a desktop computer to get the QR code"
+ "Only scan a QR code after following the steps above on your own device. Never scan a code sent by another person."
"The numbers don’t match"
"Enter 2-digit code"
"This will verify that the connection to your other device is secure."
diff --git a/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Day_0_en.png b/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Day_0_en.png
index b1fef99b4a..a83e8f7923 100644
--- a/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Day_0_en.png
+++ b/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Day_0_en.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:8b0acb8106154715ea852d54e6a8c06dec3ed367f14cd4a6eb7ea68baab11014
-size 43495
+oid sha256:3e6d5e199d232901dfddcfaf6d2821e0a9a7bf2b98db7dcfe4d8db40ba4176f4
+size 60579
diff --git a/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Day_1_en.png b/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Day_1_en.png
index 300ffa1122..51090926ba 100644
--- a/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Day_1_en.png
+++ b/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Day_1_en.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:88609772b74d36b5bd1f0d192a6dd10e9c5c324e670b02932b6d2204c92cdfff
-size 42846
+oid sha256:aa0ea6f6fd6ed40abd3d6a1055a2f0d034208c518bd5841e5536cb9c83dd292d
+size 56366
diff --git a/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Night_0_en.png b/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Night_0_en.png
index 01618be617..4c26bd27c9 100644
--- a/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Night_0_en.png
+++ b/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Night_0_en.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d8c70e27a0b88c40e6ea2a3e8b03ec3f5034eef8c25843f16677e75354eff1be
-size 42244
+oid sha256:80cc35d9eea08e8ce92a1025c3432f7e10821493896b1cd5156ae5382cdac14e
+size 58031
diff --git a/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Night_1_en.png b/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Night_1_en.png
index 638fb99be6..c59e81351c 100644
--- a/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Night_1_en.png
+++ b/tests/uitests/src/test/snapshots/images/features.linknewdevice.impl.screens.desktop_DesktopNoticeView_Night_1_en.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f0b25c02e6c1c1d70e560c8d570d2a0224b2496ebcc1f782be03f247038a62f2
-size 40846
+oid sha256:9a3e89bd126e83ace147edacfa70b3ad8930d2485f3165f89e2b08ce7e94cf61
+size 53462