mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-15 07:28:30 +00:00
Update recovery key education sheet.
This commit is contained in:
committed by
Greyson Parrelli
parent
1d13a62088
commit
869eada21c
@@ -5,9 +5,12 @@
|
||||
|
||||
package org.thoughtcrime.securesms.backup.v2.ui.subscription
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
@@ -15,6 +18,7 @@ import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -72,20 +76,19 @@ fun MessageBackupsKeyEducationScreen(
|
||||
modifier = Modifier.padding(top = 16.dp)
|
||||
)
|
||||
|
||||
Text(
|
||||
text = stringResource(R.string.MessageBackupsKeyEducationScreen__your_backup_key_is_a),
|
||||
textAlign = TextAlign.Center,
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
modifier = Modifier.padding(top = 12.dp)
|
||||
InfoRow(
|
||||
R.drawable.symbol_number_24,
|
||||
R.string.MessageBackupsKeyEducationScreen__your_backup_key_is_a
|
||||
)
|
||||
|
||||
Text(
|
||||
text = stringResource(R.string.MessageBackupsKeyEducationScreen__if_you_forget_your_key),
|
||||
textAlign = TextAlign.Center,
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
modifier = Modifier.padding(top = 16.dp)
|
||||
InfoRow(
|
||||
R.drawable.symbol_lock_24,
|
||||
R.string.MessageBackupsKeyEducationScreen__store_your_recovery
|
||||
)
|
||||
|
||||
InfoRow(
|
||||
R.drawable.symbol_error_circle_24,
|
||||
R.string.MessageBackupsKeyEducationScreen__if_you_lose_it
|
||||
)
|
||||
|
||||
Spacer(
|
||||
@@ -101,10 +104,11 @@ fun MessageBackupsKeyEducationScreen(
|
||||
) {
|
||||
Buttons.LargeTonal(
|
||||
onClick = onNextClick,
|
||||
modifier = Modifier.align(Alignment.BottomEnd)
|
||||
modifier = Modifier.align(Alignment.Center)
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.MessageBackupsKeyEducationScreen__next)
|
||||
text = stringResource(R.string.MessageBackupsKeyEducationScreen__view_recovery_key),
|
||||
modifier = Modifier.padding(horizontal = 20.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -112,6 +116,27 @@ fun MessageBackupsKeyEducationScreen(
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun InfoRow(@DrawableRes iconId: Int, @StringRes textId: Int) {
|
||||
Row(
|
||||
verticalAlignment = Alignment.Top,
|
||||
modifier = Modifier.padding(top = 24.dp)
|
||||
) {
|
||||
Icon(
|
||||
imageVector = ImageVector.vectorResource(iconId),
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
|
||||
)
|
||||
Text(
|
||||
text = stringResource(textId),
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
modifier = Modifier.padding(start = 16.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun MessageBackupsKeyEducationScreenPreview() {
|
||||
|
||||
@@ -8425,13 +8425,15 @@
|
||||
|
||||
<!-- MessageBackupsKeyEducationScreen -->
|
||||
<!-- Screen headline -->
|
||||
<string name="MessageBackupsKeyEducationScreen__your_backup_key">Your recovery key</string>
|
||||
<string name="MessageBackupsKeyEducationScreen__your_backup_key">Recovery key</string>
|
||||
<!-- Screen body part 1 -->
|
||||
<string name="MessageBackupsKeyEducationScreen__your_backup_key_is_a">Your recovery key is a 64-character code that lets you restore your backup when you re-install Signal.</string>
|
||||
<string name="MessageBackupsKeyEducationScreen__your_backup_key_is_a">Your recovery key is a 64-character code that you will need to restore your backup.</string>
|
||||
<!-- Screen body part 2 -->
|
||||
<string name="MessageBackupsKeyEducationScreen__if_you_forget_your_key">If you forget your key, you will not be able to restore your backup. Signal cannot help you recover your backup.</string>
|
||||
<string name="MessageBackupsKeyEducationScreen__store_your_recovery">Store your recovery key somewhere safe like a secure password manager, and don’t share it with anyone.</string>
|
||||
<!-- Screen body part 3 -->
|
||||
<string name="MessageBackupsKeyEducationScreen__if_you_lose_it">If you lose it, you won’t be able to recover your messages.</string>
|
||||
<!-- Action button label -->
|
||||
<string name="MessageBackupsKeyEducationScreen__next">Next</string>
|
||||
<string name="MessageBackupsKeyEducationScreen__view_recovery_key">View recovery key</string>
|
||||
|
||||
<!-- MessageBackupsKeyRecordScreen -->
|
||||
<!-- Screen headline -->
|
||||
|
||||
Reference in New Issue
Block a user