diff --git a/app/src/main/java/com/babylon/wallet/android/presentation/status/dapp/DappInteractionDialog.kt b/app/src/main/java/com/babylon/wallet/android/presentation/status/dapp/DappInteractionDialog.kt index 5a8be664c0..a9392aa575 100644 --- a/app/src/main/java/com/babylon/wallet/android/presentation/status/dapp/DappInteractionDialog.kt +++ b/app/src/main/java/com/babylon/wallet/android/presentation/status/dapp/DappInteractionDialog.kt @@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -58,33 +59,40 @@ private fun DappInteractionDialogContent( modifier: Modifier = Modifier, state: DappInteractionDialogViewModel.State ) { - Column( - modifier - .fillMaxWidth() - .background(color = RadixTheme.colors.defaultBackground) - .padding(RadixTheme.dimensions.paddingLarge), - horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.spacedBy(RadixTheme.dimensions.paddingDefault) - ) { - Image( - painter = painterResource( - id = com.babylon.wallet.android.designsystem.R.drawable.check_circle_outline - ), - contentDescription = null - ) - Text( - text = stringResource(id = R.string.dAppRequest_completion_title), - style = RadixTheme.typography.title, - color = RadixTheme.colors.gray1 - ) - Text( - text = stringResource(id = R.string.dAppRequest_completion_subtitle, state.dAppName), - style = RadixTheme.typography.body1Regular, - color = RadixTheme.colors.gray1, - textAlign = TextAlign.Center - ) + Column { + Column( + modifier + .fillMaxWidth() + .background(color = RadixTheme.colors.defaultBackground) + .padding(RadixTheme.dimensions.paddingLarge), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(RadixTheme.dimensions.paddingDefault) + ) { + Image( + painter = painterResource( + id = com.babylon.wallet.android.designsystem.R.drawable.check_circle_outline + ), + contentDescription = null + ) + Text( + text = stringResource(id = R.string.dAppRequest_completion_title), + style = RadixTheme.typography.title, + color = RadixTheme.colors.gray1 + ) + Text( + text = stringResource(id = R.string.dAppRequest_completion_subtitle, state.dAppName), + style = RadixTheme.typography.body1Regular, + color = RadixTheme.colors.gray1, + textAlign = TextAlign.Center + ) + } if (state.isMobileConnect) { + HorizontalDivider(color = RadixTheme.colors.gray4) Text( + modifier = Modifier + .fillMaxWidth() + .background(color = RadixTheme.colors.gray5) + .padding(vertical = RadixTheme.dimensions.paddingLarge, horizontal = RadixTheme.dimensions.paddingXLarge), text = stringResource(id = R.string.mobileConnect_interactionSuccess), style = RadixTheme.typography.body1Regular, color = RadixTheme.colors.gray1, diff --git a/app/src/main/java/com/babylon/wallet/android/presentation/status/transaction/TransactionStatusDialog.kt b/app/src/main/java/com/babylon/wallet/android/presentation/status/transaction/TransactionStatusDialog.kt index 7bcb84887d..2c873a0419 100644 --- a/app/src/main/java/com/babylon/wallet/android/presentation/status/transaction/TransactionStatusDialog.kt +++ b/app/src/main/java/com/babylon/wallet/android/presentation/status/transaction/TransactionStatusDialog.kt @@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -145,55 +146,62 @@ private fun SuccessContent( transactionAddress: String, isMobileConnect: Boolean ) { - Column( - modifier - .fillMaxWidth() - .background(color = RadixTheme.colors.defaultBackground) - .padding(RadixTheme.dimensions.paddingLarge), - horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.spacedBy(RadixTheme.dimensions.paddingDefault) - ) { - Image( - painter = painterResource( - id = com.babylon.wallet.android.designsystem.R.drawable.check_circle_outline - ), - contentDescription = null - ) - Text( - text = stringResource(id = R.string.transactionStatus_success_title), - style = RadixTheme.typography.title, - color = RadixTheme.colors.gray1, - textAlign = TextAlign.Center - ) + Column { + Column( + modifier + .fillMaxWidth() + .background(color = RadixTheme.colors.defaultBackground) + .padding(RadixTheme.dimensions.paddingLarge), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(RadixTheme.dimensions.paddingDefault) + ) { + Image( + painter = painterResource( + id = com.babylon.wallet.android.designsystem.R.drawable.check_circle_outline + ), + contentDescription = null + ) + Text( + text = stringResource(id = R.string.transactionStatus_success_title), + style = RadixTheme.typography.title, + color = RadixTheme.colors.gray1, + textAlign = TextAlign.Center + ) - Text( - text = stringResource(R.string.transactionStatus_success_text), - style = RadixTheme.typography.body1Regular, - color = RadixTheme.colors.gray1, - textAlign = TextAlign.Center - ) + Text( + text = stringResource(R.string.transactionStatus_success_text), + style = RadixTheme.typography.body1Regular, + color = RadixTheme.colors.gray1, + textAlign = TextAlign.Center + ) - if (transactionAddress.isNotEmpty()) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.Center - ) { - Text( - text = stringResource(id = R.string.transactionStatus_transactionID_text), - style = RadixTheme.typography.body1Regular, - color = RadixTheme.colors.gray1 - ) - Spacer(modifier = Modifier.width(RadixTheme.dimensions.paddingXSmall)) - ActionableAddressView( - transactionId = IntentHash.init(transactionAddress), - textStyle = RadixTheme.typography.body1Regular, - textColor = RadixTheme.colors.gray1 - ) + if (transactionAddress.isNotEmpty()) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.Center + ) { + Text( + text = stringResource(id = R.string.transactionStatus_transactionID_text), + style = RadixTheme.typography.body1Regular, + color = RadixTheme.colors.gray1 + ) + Spacer(modifier = Modifier.width(RadixTheme.dimensions.paddingXSmall)) + ActionableAddressView( + transactionId = IntentHash.init(transactionAddress), + textStyle = RadixTheme.typography.body1Regular, + textColor = RadixTheme.colors.gray1 + ) + } } } if (isMobileConnect) { + HorizontalDivider(color = RadixTheme.colors.gray4) Text( - text = "Switch back to your browser to continue", + modifier = Modifier + .fillMaxWidth() + .background(color = RadixTheme.colors.gray5) + .padding(vertical = RadixTheme.dimensions.paddingLarge, horizontal = RadixTheme.dimensions.paddingXLarge), + text = stringResource(id = R.string.mobileConnect_interactionSuccess), style = RadixTheme.typography.body1Regular, color = RadixTheme.colors.gray1, textAlign = TextAlign.Center diff --git a/app/src/main/java/com/babylon/wallet/android/presentation/ui/composables/Dialogs.kt b/app/src/main/java/com/babylon/wallet/android/presentation/ui/composables/Dialogs.kt index 2dbe527aa4..b74334d368 100644 --- a/app/src/main/java/com/babylon/wallet/android/presentation/ui/composables/Dialogs.kt +++ b/app/src/main/java/com/babylon/wallet/android/presentation/ui/composables/Dialogs.kt @@ -31,6 +31,7 @@ import androidx.compose.material.icons.filled.Clear import androidx.compose.material3.AlertDialog import androidx.compose.material3.BasicAlertDialog import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.ModalBottomSheet @@ -427,63 +428,70 @@ fun FailureDialogContent( transactionAddress: String, isMobileConnect: Boolean ) { - Column( - modifier - .fillMaxWidth() - .background(color = RadixTheme.colors.defaultBackground) - .padding(RadixTheme.dimensions.paddingLarge), - horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.spacedBy(RadixTheme.dimensions.paddingDefault) - ) { - Icon( - modifier = Modifier.size(104.dp), - painter = painterResource( - id = com.babylon.wallet.android.designsystem.R.drawable.ic_warning_error - ), - contentDescription = null, - tint = RadixTheme.colors.orange1 - ) - Text( - text = title, - style = RadixTheme.typography.title, - color = RadixTheme.colors.gray1, - textAlign = TextAlign.Center, - modifier = Modifier.align(alignment = Alignment.CenterHorizontally) - ) - - subtitle?.let { + Column { + Column( + modifier + .fillMaxWidth() + .background(color = RadixTheme.colors.defaultBackground) + .padding(RadixTheme.dimensions.paddingLarge), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.spacedBy(RadixTheme.dimensions.paddingDefault) + ) { + Icon( + modifier = Modifier.size(104.dp), + painter = painterResource( + id = com.babylon.wallet.android.designsystem.R.drawable.ic_warning_error + ), + contentDescription = null, + tint = RadixTheme.colors.orange1 + ) Text( - text = it, - style = RadixTheme.typography.body1Regular, + text = title, + style = RadixTheme.typography.title, color = RadixTheme.colors.gray1, - textAlign = TextAlign.Center + textAlign = TextAlign.Center, + modifier = Modifier.align(alignment = Alignment.CenterHorizontally) ) - } - val transactionId = remember(transactionAddress) { - runCatching { IntentHash.init(transactionAddress) }.getOrNull() - } - if (transactionId != null) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.Center - ) { + subtitle?.let { Text( - text = stringResource(id = R.string.transactionStatus_transactionID_text), - style = RadixTheme.typography.body1Header, - color = RadixTheme.colors.gray1 - ) - Spacer(modifier = Modifier.width(RadixTheme.dimensions.paddingXSmall)) - ActionableAddressView( - transactionId = transactionId, - textStyle = RadixTheme.typography.body1Header, - textColor = RadixTheme.colors.blue1, - iconColor = RadixTheme.colors.gray2 + text = it, + style = RadixTheme.typography.body1Regular, + color = RadixTheme.colors.gray1, + textAlign = TextAlign.Center ) } + + val transactionId = remember(transactionAddress) { + runCatching { IntentHash.init(transactionAddress) }.getOrNull() + } + if (transactionId != null) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.Center + ) { + Text( + text = stringResource(id = R.string.transactionStatus_transactionID_text), + style = RadixTheme.typography.body1Header, + color = RadixTheme.colors.gray1 + ) + Spacer(modifier = Modifier.width(RadixTheme.dimensions.paddingXSmall)) + ActionableAddressView( + transactionId = transactionId, + textStyle = RadixTheme.typography.body1Header, + textColor = RadixTheme.colors.blue1, + iconColor = RadixTheme.colors.gray2 + ) + } + } } if (isMobileConnect) { + HorizontalDivider(color = RadixTheme.colors.gray4) Text( + modifier = Modifier + .fillMaxWidth() + .background(color = RadixTheme.colors.gray5) + .padding(vertical = RadixTheme.dimensions.paddingLarge, horizontal = RadixTheme.dimensions.paddingXLarge), text = stringResource(id = R.string.mobileConnect_interactionSuccess), style = RadixTheme.typography.body1Regular, color = RadixTheme.colors.gray1,