mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-21 02:08:40 +00:00
Add initial registration v5 prototype.
This commit is contained in:
committed by
jeffrey-signal
parent
1a5163fc47
commit
5ea5279fbb
@@ -109,7 +109,7 @@ fun DevicePinAuthEducationSheet(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
fun DevicePinAuthEducationSheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
DevicePinAuthEducationSheet(
|
||||
title = "To continue, confirm it's you",
|
||||
onClick = {}
|
||||
|
||||
@@ -437,7 +437,7 @@ private fun rememberSecondaryAction(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun BackupAlertSheetContentPreviewGeneric() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
val backupAlert = BackupAlert.CouldNotCompleteBackup(daysSinceLastBackup = 7)
|
||||
val primaryActionButtonState = rememberPrimaryAction(backupAlert) { }
|
||||
val secondaryActionButtonState = rememberSecondaryAction(backupAlert) { }
|
||||
@@ -449,7 +449,7 @@ private fun BackupAlertSheetContentPreviewGeneric() {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun BackupAlertSheetContentPreviewPayment() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
val backupAlert = BackupAlert.FailedToRenew
|
||||
val primaryActionButtonState = rememberPrimaryAction(backupAlert) { }
|
||||
val secondaryActionButtonState = rememberSecondaryAction(backupAlert) { }
|
||||
@@ -461,7 +461,7 @@ private fun BackupAlertSheetContentPreviewPayment() {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun BackupAlertSheetContentPreviewDelete() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
val backupAlert = BackupAlert.DownloadYourBackupData(
|
||||
isLastDay = false,
|
||||
formattedSize = "2.3MB"
|
||||
@@ -476,7 +476,7 @@ private fun BackupAlertSheetContentPreviewDelete() {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun BackupAlertSheetContentPreviewDiskFull() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
val backupAlert = BackupAlert.DiskFull(requiredSpace = "12GB")
|
||||
val primaryActionButtonState = rememberPrimaryAction(backupAlert) { }
|
||||
val secondaryActionButtonState = rememberSecondaryAction(backupAlert) { }
|
||||
@@ -488,7 +488,7 @@ private fun BackupAlertSheetContentPreviewDiskFull() {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun BackupAlertSheetContentPreviewBackupFailed() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
val backupAlert = BackupAlert.BackupFailed
|
||||
val primaryActionButtonState = rememberPrimaryAction(backupAlert) { }
|
||||
val secondaryActionButtonState = rememberSecondaryAction(backupAlert) { }
|
||||
@@ -500,7 +500,7 @@ private fun BackupAlertSheetContentPreviewBackupFailed() {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun BackupAlertSheetContentPreviewCouldNotRedeemBackup() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
val backupAlert = BackupAlert.CouldNotRedeemBackup
|
||||
val primaryActionButtonState = rememberPrimaryAction(backupAlert) { }
|
||||
val secondaryActionButtonState = rememberSecondaryAction(backupAlert) { }
|
||||
@@ -512,7 +512,7 @@ private fun BackupAlertSheetContentPreviewCouldNotRedeemBackup() {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun BackupAlertSheetContentPreviewSubscriptionExpired() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
val backupAlert = BackupAlert.ExpiredAndDowngraded
|
||||
val primaryActionButtonState = rememberPrimaryAction(backupAlert) { }
|
||||
val secondaryActionButtonState = rememberSecondaryAction(backupAlert) { }
|
||||
|
||||
@@ -204,7 +204,7 @@ private fun BackupAlertSecondaryActionButton(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun BackupAlertBottomSheetContainerPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
BackupAlertBottomSheetContainer(
|
||||
icon = { BackupAlertIcon(iconColors = BackupsIconColors.Warning) },
|
||||
title = "Test backup alert",
|
||||
|
||||
@@ -137,7 +137,7 @@ private fun CreateBackupBottomSheetContent(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun CreateBackupBottomSheetContentPaidPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
CreateBackupBottomSheetContent(
|
||||
isPaidTier = true,
|
||||
onBackupNowClick = {}
|
||||
@@ -148,7 +148,7 @@ private fun CreateBackupBottomSheetContentPaidPreview() {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun CreateBackupBottomSheetContentFreePreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
CreateBackupBottomSheetContent(
|
||||
isPaidTier = false,
|
||||
onBackupNowClick = {}
|
||||
|
||||
@@ -159,7 +159,7 @@ private fun SheetContent(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun BackupAlertSheetContentPreviewMedia() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
SheetContent(
|
||||
mediaBackupsAreOff = BackupAlert.MediaBackupsAreOff(endOfPeriodSeconds = System.currentTimeMillis().milliseconds.inWholeSeconds),
|
||||
paidBackupType = MessageBackupsType.Paid(
|
||||
|
||||
@@ -74,7 +74,7 @@ private fun NoManualBackupSheetContent(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun NoManualBackupSheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
NoManualBackupSheetContent(
|
||||
durationSinceLastBackup = 30.days
|
||||
)
|
||||
|
||||
@@ -111,7 +111,7 @@ private fun NoRemoteStorageSpaceAvailableBottomSheetContent(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun NoRemoteStorageSpaceAvailableBottomSheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
NoRemoteStorageSpaceAvailableBottomSheetContent({}, {}, {})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ private fun SaveKeyConfirmationDialogPreview() {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun CreateNewBackupKeySheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
Column {
|
||||
CreateNewBackupKeySheetContent()
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ private fun MessageBackupsKeyRecordScreenPreview() {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun BottomSheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
BottomSheetContent({}, {})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ private fun UpgradeToEnableOptimizedStorageSheetContent(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun UpgradeToEnableOptimizedStorageSheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
UpgradeToEnableOptimizedStorageSheetContent(
|
||||
messageBackupsType = testBackupTypes()[1] as MessageBackupsType.Paid,
|
||||
isSubscribeEnabled = true
|
||||
|
||||
@@ -328,7 +328,7 @@ private fun CreateCallLinkBottomSheetContent(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun CreateCallLinkBottomSheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
CreateCallLinkBottomSheetContent(
|
||||
callLink = CallLinkTable.CallLink(
|
||||
recipientId = RecipientId.UNKNOWN,
|
||||
|
||||
@@ -489,7 +489,7 @@ private fun CallQualityScreenPreview() {
|
||||
@PreviewLightDark
|
||||
@Composable
|
||||
private fun HowWasYourCallPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
Column {
|
||||
HowWasYourCall(
|
||||
onGreatClick = {},
|
||||
@@ -503,7 +503,7 @@ private fun HowWasYourCallPreview() {
|
||||
@PreviewLightDark
|
||||
@Composable
|
||||
private fun WhatIssuesDidYouHavePreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
var userSelection by remember { mutableStateOf<Set<CallQualityIssue>>(emptySet()) }
|
||||
|
||||
Column {
|
||||
@@ -524,7 +524,7 @@ private fun WhatIssuesDidYouHavePreview() {
|
||||
@PreviewLightDark
|
||||
@Composable
|
||||
private fun HelpUsImprovePreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
Column {
|
||||
HelpUsImprove(
|
||||
isShareDebugLogSelected = true,
|
||||
|
||||
@@ -105,7 +105,7 @@ private fun Sheet(onDismiss: () -> Unit = {}) {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun ConnectivityWarningSheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
Sheet()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ private fun DeviceSpecificSheet(onContinue: () -> Unit = {}, onDismiss: () -> Un
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun DeviceSpecificSheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
DeviceSpecificSheet()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ private fun SubscriptionNotFoundReason(text: String) {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun SubscriptionNotFoundContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
Column {
|
||||
SubscriptionNotFoundContent()
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ fun EducationRow(text: String, painter: Painter) {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
fun ChatFoldersEducationSheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
FolderEducationSheet(onClick = {})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ class PendingParticipantsBottomSheet : ComposeBottomSheetDialogFragment() {
|
||||
@NightPreview
|
||||
@Composable
|
||||
private fun PendingParticipantsSheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
PendingParticipantsSheet(
|
||||
pendingParticipants = listOf(
|
||||
PendingParticipantCollection.State.PENDING,
|
||||
|
||||
@@ -630,7 +630,7 @@ private fun ThreeUnknownAvatars() {
|
||||
@NightPreview
|
||||
@Composable
|
||||
private fun UnknownMembersRowPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
Column {
|
||||
UnknownMembersRow(unknownMemberCount = 1, allCallMembersAreUnknown = true)
|
||||
UnknownMembersRow(unknownMemberCount = 1, allCallMembersAreUnknown = false)
|
||||
|
||||
@@ -106,7 +106,7 @@ class CallLinkIncomingRequestSheet : ComposeBottomSheetDialogFragment() {
|
||||
@NightPreview
|
||||
@Composable
|
||||
private fun CallLinkIncomingRequestSheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
CallLinkIncomingRequestSheetContent(
|
||||
state = CallLinkIncomingRequestState(
|
||||
name = "Miles Morales",
|
||||
|
||||
@@ -266,7 +266,7 @@ private fun LegacyAudioPickerContent(
|
||||
@NightPreview
|
||||
@Composable
|
||||
private fun CallAudioPickerSheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
Column {
|
||||
LegacyAudioPickerContent(
|
||||
toggleButtonOutputState = ToggleButtonOutputState().apply {
|
||||
|
||||
@@ -118,7 +118,7 @@ private fun MediaNoLongerAvailableBottomSheetContent(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun MediaNoLongerAvailableBottomSheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
MediaNoLongerAvailableBottomSheetContent()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ fun InfoRow(text: String) {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun ProfileNameSheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
ProfileNameSheet()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ private fun isThreadListAlreadyAdded(folder: ChatFolderRecord, threadIds: List<L
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun AddToChatFolderSheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
AddToChatFolderSheetContent(
|
||||
folders = listOf(ChatFolderRecord(name = "Friends"), ChatFolderRecord(name = "Work")),
|
||||
threadIds = listOf(1),
|
||||
|
||||
@@ -84,7 +84,7 @@ fun FinishedSheet(onClick: () -> Unit) {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
fun FinishedSheetSheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
FinishedSheet(onClick = {})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ fun EducationSheet(onClick: () -> Unit) {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
fun EducationSheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
EducationSheet(onClick = {})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ private fun LinkedDeviceInformationRow(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
fun LearnMorePreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
LearnMoreSheet()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ private fun SheetOption(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
fun SyncSheetSheetSheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
SyncSheet(onLink = {})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class PermissionDeniedBottomSheet private constructor() : ComposeBottomSheetDial
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun PermissionDeniedSheetContentPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
PermissionDeniedSheetContent(
|
||||
titleRes = R.string.AttachmentManager_signal_allow_access_location,
|
||||
subtitleRes = R.string.AttachmentManager_signal_to_send_location,
|
||||
|
||||
@@ -325,7 +325,7 @@ private fun NoBackupKeyBottomSheet(
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun NoBackupKeyBottomSheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
NoBackupKeyBottomSheet(
|
||||
showSecondParagraph = true
|
||||
)
|
||||
@@ -335,7 +335,7 @@ private fun NoBackupKeyBottomSheetPreview() {
|
||||
@DayNightPreviews
|
||||
@Composable
|
||||
private fun NoBackupKeyBottomSheetNoSecondParagraphPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
NoBackupKeyBottomSheet(
|
||||
showSecondParagraph = false
|
||||
)
|
||||
|
||||
@@ -104,7 +104,7 @@ private fun Sheet(
|
||||
@Composable
|
||||
@DayNightPreviews
|
||||
private fun SheetPreview() {
|
||||
Previews.BottomSheetPreview {
|
||||
Previews.BottomSheetContentPreview {
|
||||
Sheet()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user