- Done across all screens - Closes #1054 - Closes #1055 Fix Ktlint warnings
This commit is contained in:
parent
8966615a39
commit
f34aa78f3d
|
@ -60,7 +60,7 @@ fun PrimaryButton(
|
|||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
outerPaddingValues: PaddingValues = PaddingValues(
|
||||
horizontal = ZcashTheme.dimens.spacingDefault,
|
||||
horizontal = ZcashTheme.dimens.spacingNone,
|
||||
vertical = ZcashTheme.dimens.spacingSmall
|
||||
),
|
||||
enabled: Boolean = true,
|
||||
|
@ -70,7 +70,7 @@ fun PrimaryButton(
|
|||
Button(
|
||||
shape = RectangleShape,
|
||||
enabled = enabled,
|
||||
modifier = modifier
|
||||
modifier = modifier.then(Modifier.fillMaxWidth())
|
||||
.padding(outerPaddingValues)
|
||||
.shadow(
|
||||
contentColor = textColor,
|
||||
|
@ -109,7 +109,7 @@ fun SecondaryButton(
|
|||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
outerPaddingValues: PaddingValues = PaddingValues(
|
||||
horizontal = ZcashTheme.dimens.spacingDefault,
|
||||
horizontal = ZcashTheme.dimens.spacingNone,
|
||||
vertical = ZcashTheme.dimens.spacingSmall
|
||||
),
|
||||
enabled: Boolean = true,
|
||||
|
@ -119,7 +119,7 @@ fun SecondaryButton(
|
|||
Button(
|
||||
shape = RectangleShape,
|
||||
enabled = enabled,
|
||||
modifier = modifier
|
||||
modifier = modifier.then(Modifier.fillMaxWidth())
|
||||
.padding(outerPaddingValues)
|
||||
.shadow(
|
||||
contentColor = textColor,
|
||||
|
|
|
@ -32,10 +32,11 @@ data class Dimens(
|
|||
val topAppBarZcashLogoHeight: Dp,
|
||||
val topAppBarActionRippleCorner: Dp,
|
||||
|
||||
// In screen custom spacings:
|
||||
// Screen custom spacings:
|
||||
val inScreenZcashLogoHeight: Dp,
|
||||
val inScreenZcashLogoWidth: Dp,
|
||||
val inScreenZcashTextLogoHeight: Dp,
|
||||
val screenHorizontalSpacing: Dp
|
||||
)
|
||||
|
||||
private val defaultDimens = Dimens(
|
||||
|
@ -57,6 +58,7 @@ private val defaultDimens = Dimens(
|
|||
inScreenZcashLogoHeight = 100.dp,
|
||||
inScreenZcashLogoWidth = 60.dp,
|
||||
inScreenZcashTextLogoHeight = 30.dp,
|
||||
screenHorizontalSpacing = 64.dp,
|
||||
)
|
||||
|
||||
private val normalDimens = defaultDimens
|
||||
|
|
|
@ -77,8 +77,8 @@ fun About(
|
|||
.padding(
|
||||
top = paddingValues.calculateTopPadding() + ZcashTheme.dimens.spacingDefault,
|
||||
bottom = paddingValues.calculateBottomPadding() + ZcashTheme.dimens.spacingDefault,
|
||||
start = ZcashTheme.dimens.spacingHuge,
|
||||
end = ZcashTheme.dimens.spacingHuge
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package co.electriccoin.zcash.ui.screen.debug.view
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.List
|
||||
|
@ -9,6 +10,7 @@ import androidx.compose.material.icons.filled.Shield
|
|||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import co.electriccoin.zcash.spackle.model.Index
|
||||
import co.electriccoin.zcash.spackle.model.Progress
|
||||
import co.electriccoin.zcash.ui.design.component.Body
|
||||
|
@ -41,9 +43,9 @@ fun DesignGuide() {
|
|||
Body(text = "body")
|
||||
NavigationButton(onClick = { }, text = "Back")
|
||||
NavigationButton(onClick = { }, text = "Next")
|
||||
PrimaryButton(onClick = { }, text = "Primary button")
|
||||
SecondaryButton(onClick = { }, text = "Secondary button")
|
||||
TertiaryButton(onClick = { }, text = "Tertiary button")
|
||||
PrimaryButton(onClick = { }, text = "Primary button", outerPaddingValues = PaddingValues(24.dp))
|
||||
SecondaryButton(onClick = { }, text = "Secondary button", outerPaddingValues = PaddingValues(24.dp))
|
||||
TertiaryButton(onClick = { }, text = "Tertiary button", outerPaddingValues = PaddingValues(24.dp))
|
||||
Callout(Icons.Filled.Shield, contentDescription = "Shield")
|
||||
Callout(Icons.Filled.Person, contentDescription = "Person")
|
||||
Callout(Icons.Filled.List, contentDescription = "List")
|
||||
|
|
|
@ -69,8 +69,8 @@ fun ExportPrivateData(
|
|||
.padding(
|
||||
top = paddingValues.calculateTopPadding(),
|
||||
bottom = paddingValues.calculateBottomPadding(),
|
||||
start = ZcashTheme.dimens.spacingHuge,
|
||||
end = ZcashTheme.dimens.spacingHuge
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
.verticalScroll(rememberScrollState())
|
||||
)
|
||||
|
@ -140,12 +140,14 @@ private fun ExportPrivateDataContent(
|
|||
.weight(MINIMAL_WEIGHT)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
|
||||
PrimaryButton(
|
||||
onClick = onConfirm,
|
||||
text = stringResource(R.string.export_data_confirm).uppercase(),
|
||||
enabled = checkedState.value
|
||||
)
|
||||
|
||||
Spacer(Modifier.height(ZcashTheme.dimens.spacingXlarge))
|
||||
Spacer(Modifier.height(ZcashTheme.dimens.spacingHuge))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ package co.electriccoin.zcash.ui.screen.home.view
|
|||
import android.content.res.Configuration
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.aspectRatio
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
|
@ -53,6 +52,7 @@ import co.electriccoin.zcash.ui.R
|
|||
import co.electriccoin.zcash.ui.common.DisableScreenTimeout
|
||||
import co.electriccoin.zcash.ui.common.closeDrawerMenu
|
||||
import co.electriccoin.zcash.ui.common.openDrawerMenu
|
||||
import co.electriccoin.zcash.ui.design.MINIMAL_WEIGHT
|
||||
import co.electriccoin.zcash.ui.design.component.Body
|
||||
import co.electriccoin.zcash.ui.design.component.BodyWithFiatCurrencySymbol
|
||||
import co.electriccoin.zcash.ui.design.component.GradientSurface
|
||||
|
@ -137,9 +137,9 @@ fun Home(
|
|||
goHistory = goHistory,
|
||||
modifier = Modifier.padding(
|
||||
top = paddingValues.calculateTopPadding() + ZcashTheme.dimens.spacingDefault,
|
||||
bottom = paddingValues.calculateBottomPadding() + ZcashTheme.dimens.spacingDefault,
|
||||
start = ZcashTheme.dimens.spacingDefault,
|
||||
end = ZcashTheme.dimens.spacingDefault
|
||||
bottom = paddingValues.calculateBottomPadding() + ZcashTheme.dimens.spacingHuge,
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -247,25 +247,28 @@ private fun HomeMainContent(
|
|||
) {
|
||||
Status(walletSnapshot, isUpdateAvailable, isFiatConversionEnabled, isCircularProgressBarEnabled)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
Spacer(
|
||||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
.weight(MINIMAL_WEIGHT)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingSmall))
|
||||
|
||||
PrimaryButton(
|
||||
onClick = goSend,
|
||||
text = stringResource(R.string.home_button_send),
|
||||
outerPaddingValues = PaddingValues(
|
||||
horizontal = ZcashTheme.dimens.spacingNone,
|
||||
vertical = ZcashTheme.dimens.spacingSmall
|
||||
)
|
||||
text = stringResource(R.string.home_button_send)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingSmall))
|
||||
|
||||
PrimaryButton(
|
||||
onClick = goReceive,
|
||||
text = stringResource(R.string.home_button_receive),
|
||||
outerPaddingValues = PaddingValues(
|
||||
horizontal = ZcashTheme.dimens.spacingNone,
|
||||
vertical = ZcashTheme.dimens.spacingSmall
|
||||
)
|
||||
text = stringResource(R.string.home_button_receive)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingSmall))
|
||||
|
||||
TertiaryButton(onClick = goHistory, text = stringResource(R.string.home_button_history))
|
||||
|
||||
if (isKeepScreenOnDuringSync == true && walletSnapshot.status == Synchronizer.Status.SYNCING) {
|
||||
|
|
|
@ -140,7 +140,7 @@ private fun NewWalletRecoveryMainContent(
|
|||
TopScreenLogoTitle(
|
||||
title = stringResource(R.string.new_wallet_recovery_header),
|
||||
logoContentDescription = stringResource(R.string.zcash_logo_content_description),
|
||||
modifier = Modifier.padding(horizontal = ZcashTheme.dimens.spacingHuge)
|
||||
modifier = Modifier.padding(horizontal = ZcashTheme.dimens.screenHorizontalSpacing)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
|
@ -148,7 +148,7 @@ private fun NewWalletRecoveryMainContent(
|
|||
BodySmall(
|
||||
text = stringResource(R.string.new_wallet_recovery_description),
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier.padding(horizontal = ZcashTheme.dimens.spacingHuge)
|
||||
modifier = Modifier.padding(horizontal = ZcashTheme.dimens.screenHorizontalSpacing)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingDefault))
|
||||
|
@ -167,13 +167,15 @@ private fun NewWalletRecoveryMainContent(
|
|||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
|
||||
NewWalletRecoveryBottomNav(
|
||||
onComplete = onComplete,
|
||||
PrimaryButton(
|
||||
onClick = onComplete,
|
||||
text = stringResource(R.string.new_wallet_recovery_button_finished),
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
bottom = ZcashTheme.dimens.spacingHuge
|
||||
bottom = ZcashTheme.dimens.spacingHuge,
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
.fillMaxWidth(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -221,16 +223,3 @@ private fun NewWalletRecoverySeedPhrase(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun NewWalletRecoveryBottomNav(
|
||||
onComplete: () -> Unit,
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
Column(
|
||||
modifier = modifier,
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
PrimaryButton(onClick = onComplete, text = stringResource(R.string.new_wallet_recovery_button_finished))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import androidx.compose.animation.slideOutVertically
|
|||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
|
@ -113,9 +112,9 @@ fun ShortOnboarding(
|
|||
modifier = Modifier
|
||||
.padding(
|
||||
top = paddingValues.calculateTopPadding() + ZcashTheme.dimens.spacingHuge,
|
||||
bottom = paddingValues.calculateBottomPadding() + ZcashTheme.dimens.spacingHuge,
|
||||
start = ZcashTheme.dimens.spacingHuge,
|
||||
end = ZcashTheme.dimens.spacingHuge
|
||||
bottom = paddingValues.calculateBottomPadding(),
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
.height(screenHeight.contentHeight - paddingValues.calculateBottomPadding())
|
||||
)
|
||||
|
@ -199,22 +198,14 @@ private fun OnboardingMainContent(
|
|||
|
||||
PrimaryButton(
|
||||
onClick = onCreateWallet,
|
||||
text = stringResource(R.string.onboarding_short_create_new_wallet),
|
||||
outerPaddingValues = PaddingValues(
|
||||
horizontal = ZcashTheme.dimens.spacingNone,
|
||||
vertical = ZcashTheme.dimens.spacingSmall
|
||||
),
|
||||
text = stringResource(R.string.onboarding_short_create_new_wallet)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
|
||||
SecondaryButton(
|
||||
onImportWallet,
|
||||
stringResource(R.string.onboarding_short_import_existing_wallet),
|
||||
outerPaddingValues = PaddingValues(
|
||||
horizontal = ZcashTheme.dimens.spacingNone,
|
||||
vertical = ZcashTheme.dimens.spacingSmall
|
||||
)
|
||||
stringResource(R.string.onboarding_short_import_existing_wallet)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package co.electriccoin.zcash.ui.screen.receive.view
|
|||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
|
@ -33,8 +32,8 @@ import co.electriccoin.zcash.ui.R
|
|||
import co.electriccoin.zcash.ui.common.BrightenScreen
|
||||
import co.electriccoin.zcash.ui.common.DisableScreenTimeout
|
||||
import co.electriccoin.zcash.ui.design.MINIMAL_WEIGHT
|
||||
import co.electriccoin.zcash.ui.design.component.Body
|
||||
import co.electriccoin.zcash.ui.design.component.GradientSurface
|
||||
import co.electriccoin.zcash.ui.design.component.Header
|
||||
import co.electriccoin.zcash.ui.design.component.PrimaryButton
|
||||
import co.electriccoin.zcash.ui.design.theme.ZcashTheme
|
||||
import co.electriccoin.zcash.ui.screen.receive.util.AndroidQrCodeImageGenerator
|
||||
|
@ -63,6 +62,7 @@ fun Receive(
|
|||
onBack: () -> Unit,
|
||||
onAddressDetails: () -> Unit,
|
||||
) {
|
||||
// Rework this into Scaffold
|
||||
Column {
|
||||
ReceiveTopAppBar(onBack = onBack)
|
||||
ReceiveContents(
|
||||
|
@ -71,7 +71,11 @@ fun Receive(
|
|||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
.verticalScroll(rememberScrollState())
|
||||
.padding(all = ZcashTheme.dimens.spacingDefault)
|
||||
.padding(
|
||||
top = ZcashTheme.dimens.spacingDefault,
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +115,7 @@ private fun ReceiveContents(
|
|||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
|
||||
Header(
|
||||
Body(
|
||||
text = stringResource(id = R.string.wallet_address_unified),
|
||||
Modifier.align(Alignment.CenterHorizontally)
|
||||
)
|
||||
|
@ -135,13 +139,14 @@ private fun ReceiveContents(
|
|||
.weight(MINIMAL_WEIGHT)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
|
||||
PrimaryButton(
|
||||
onClick = onAddressDetails,
|
||||
text = stringResource(id = R.string.receive_see_address_details),
|
||||
outerPaddingValues = PaddingValues(
|
||||
bottom = ZcashTheme.dimens.spacingHuge
|
||||
)
|
||||
text = stringResource(id = R.string.receive_see_address_details)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingHuge))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package co.electriccoin.zcash.ui.screen.request.view
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.text.KeyboardOptions
|
||||
|
@ -72,9 +71,14 @@ fun Request(
|
|||
RequestTopAppBar(onBack = goBack)
|
||||
}) { paddingValues ->
|
||||
RequestMainContent(
|
||||
paddingValues = paddingValues,
|
||||
myAddress = myAddress,
|
||||
onCreateAndSend = onCreateAndSend
|
||||
onCreateAndSend = onCreateAndSend,
|
||||
modifier = Modifier.padding(
|
||||
top = paddingValues.calculateTopPadding() + ZcashTheme.dimens.spacingDefault,
|
||||
bottom = paddingValues.calculateTopPadding(),
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -102,9 +106,9 @@ private fun RequestTopAppBar(onBack: () -> Unit) {
|
|||
// TODO [#288]: TextField component can't do long-press backspace.
|
||||
@Composable
|
||||
private fun RequestMainContent(
|
||||
paddingValues: PaddingValues,
|
||||
myAddress: WalletAddress.Unified,
|
||||
onCreateAndSend: (ZecRequest) -> Unit
|
||||
onCreateAndSend: (ZecRequest) -> Unit,
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
val monetarySeparators = MonetarySeparators.current()
|
||||
|
@ -114,9 +118,7 @@ private fun RequestMainContent(
|
|||
var message by rememberSaveable { mutableStateOf("") }
|
||||
|
||||
Column(
|
||||
Modifier
|
||||
.fillMaxSize()
|
||||
.padding(top = paddingValues.calculateTopPadding()),
|
||||
modifier = modifier,
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
// TODO [#289]: Crash occurs while typed more than some acceptable amount to this field.
|
||||
|
@ -140,7 +142,13 @@ private fun RequestMainContent(
|
|||
}
|
||||
}, label = { Text(stringResource(id = R.string.request_message)) })
|
||||
|
||||
Spacer(Modifier.fillMaxHeight(MINIMAL_WEIGHT))
|
||||
Spacer(
|
||||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
.weight(MINIMAL_WEIGHT)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingSmall))
|
||||
|
||||
val zatoshi = Zatoshi.fromZecString(context, amountZecString, monetarySeparators)
|
||||
|
||||
|
@ -151,5 +159,7 @@ private fun RequestMainContent(
|
|||
text = stringResource(id = R.string.request_create),
|
||||
enabled = null != zatoshi
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingHuge))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,8 +201,8 @@ fun RestoreWallet(
|
|||
.padding(
|
||||
top = paddingValues.calculateTopPadding() + dimens.spacingDefault,
|
||||
bottom = paddingValues.calculateBottomPadding() + dimens.spacingSmall,
|
||||
start = dimens.spacingDefault,
|
||||
end = dimens.spacingDefault
|
||||
start = dimens.screenHorizontalSpacing,
|
||||
end = dimens.screenHorizontalSpacing
|
||||
)
|
||||
|
||||
when (currentStage) {
|
||||
|
@ -248,7 +248,11 @@ fun RestoreWallet(
|
|||
|
||||
@Composable
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
private fun RestoreTopAppBar(onBack: () -> Unit, isShowClear: Boolean, onClear: () -> Unit) {
|
||||
private fun RestoreTopAppBar(
|
||||
onBack: () -> Unit,
|
||||
isShowClear: Boolean,
|
||||
onClear: () -> Unit
|
||||
) {
|
||||
TopAppBar(
|
||||
title = { Text(text = stringResource(id = R.string.restore_title)) },
|
||||
navigationIcon = {
|
||||
|
|
|
@ -13,7 +13,6 @@ import androidx.compose.foundation.background
|
|||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
|
@ -156,11 +155,7 @@ fun ScanBottomItems(
|
|||
|
||||
SecondaryButton(
|
||||
onClick = onOpenSettings,
|
||||
text = stringResource(id = R.string.scan_settings_button),
|
||||
outerPaddingValues = PaddingValues(
|
||||
vertical = ZcashTheme.dimens.spacingSmall,
|
||||
horizontal = ZcashTheme.dimens.spacingNone
|
||||
)
|
||||
text = stringResource(id = R.string.scan_settings_button)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -298,8 +293,8 @@ private fun ScanMainContent(
|
|||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(
|
||||
vertical = ZcashTheme.dimens.spacingDefault,
|
||||
horizontal = ZcashTheme.dimens.spacingDefault
|
||||
vertical = ZcashTheme.dimens.spacingHuge,
|
||||
horizontal = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -81,8 +81,8 @@ fun SecurityWarning(
|
|||
.padding(
|
||||
top = paddingValues.calculateTopPadding(),
|
||||
bottom = paddingValues.calculateBottomPadding(),
|
||||
start = ZcashTheme.dimens.spacingHuge,
|
||||
end = ZcashTheme.dimens.spacingHuge
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
.verticalScroll(rememberScrollState())
|
||||
)
|
||||
|
@ -152,7 +152,7 @@ private fun SecurityWarningContent(
|
|||
enabled = checkedState.value
|
||||
)
|
||||
|
||||
Spacer(Modifier.height(ZcashTheme.dimens.spacingXlarge))
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingHuge))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ private fun SeedRecoveryMainContent(
|
|||
TopScreenLogoTitle(
|
||||
title = stringResource(R.string.seed_recovery_header),
|
||||
logoContentDescription = stringResource(R.string.zcash_logo_content_description),
|
||||
modifier = Modifier.padding(horizontal = ZcashTheme.dimens.spacingHuge)
|
||||
modifier = Modifier.padding(horizontal = ZcashTheme.dimens.screenHorizontalSpacing)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
|
@ -155,7 +155,7 @@ private fun SeedRecoveryMainContent(
|
|||
BodySmall(
|
||||
text = stringResource(R.string.seed_recovery_description),
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier.padding(horizontal = ZcashTheme.dimens.spacingHuge)
|
||||
modifier = Modifier.padding(horizontal = ZcashTheme.dimens.screenHorizontalSpacing)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingDefault))
|
||||
|
@ -174,13 +174,15 @@ private fun SeedRecoveryMainContent(
|
|||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
|
||||
SeedRecoveryBottomNav(
|
||||
onDone = onDone,
|
||||
PrimaryButton(
|
||||
onClick = onDone,
|
||||
text = stringResource(R.string.seed_recovery_button_finished),
|
||||
modifier = Modifier
|
||||
.padding(
|
||||
bottom = ZcashTheme.dimens.spacingHuge
|
||||
bottom = ZcashTheme.dimens.spacingHuge,
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
.fillMaxWidth(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -228,17 +230,3 @@ private fun SeedRecoverySeedPhrase(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
@Composable
|
||||
private fun SeedRecoveryBottomNav(
|
||||
onDone: () -> Unit,
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
Column(
|
||||
modifier = modifier,
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
PrimaryButton(onClick = onDone, text = stringResource(R.string.seed_recovery_button_finished))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,9 +171,9 @@ fun Send(
|
|||
)
|
||||
.padding(
|
||||
top = paddingValues.calculateTopPadding() + dimens.spacingDefault,
|
||||
bottom = paddingValues.calculateBottomPadding() + dimens.spacingDefault,
|
||||
start = dimens.spacingDefault,
|
||||
end = dimens.spacingDefault
|
||||
bottom = paddingValues.calculateBottomPadding() + dimens.spacingHuge,
|
||||
start = dimens.screenHorizontalSpacing,
|
||||
end = dimens.screenHorizontalSpacing
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -253,15 +253,15 @@ private fun SendMainContent(
|
|||
(sendStage == SendStage.SendSuccessful) -> {
|
||||
SendSuccessful(
|
||||
zecSend = zecSend,
|
||||
onDone = onBack,
|
||||
modifier = modifier,
|
||||
onDone = onBack
|
||||
)
|
||||
}
|
||||
(sendStage == SendStage.SendFailure) -> {
|
||||
SendFailure(
|
||||
zecSend = zecSend,
|
||||
onDone = onBack,
|
||||
modifier = modifier,
|
||||
onDone = onBack
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package co.electriccoin.zcash.ui.screen.settings.view
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
|
@ -101,9 +100,9 @@ fun Settings(
|
|||
)
|
||||
.padding(
|
||||
top = paddingValues.calculateTopPadding() + dimens.spacingHuge,
|
||||
bottom = paddingValues.calculateBottomPadding() + dimens.spacingHuge,
|
||||
start = dimens.spacingHuge,
|
||||
end = dimens.spacingHuge
|
||||
bottom = paddingValues.calculateBottomPadding(),
|
||||
start = dimens.screenHorizontalSpacing,
|
||||
end = dimens.screenHorizontalSpacing
|
||||
),
|
||||
onSeedRecovery = onSeedRecovery,
|
||||
onDocumentation = onDocumentation,
|
||||
|
@ -246,72 +245,50 @@ private fun SettingsMainContent(
|
|||
) {
|
||||
PrimaryButton(
|
||||
onClick = onSeedRecovery,
|
||||
text = stringResource(R.string.settings_backup_wallet),
|
||||
outerPaddingValues = PaddingValues(
|
||||
horizontal = dimens.spacingNone,
|
||||
vertical = dimens.spacingSmall
|
||||
),
|
||||
text = stringResource(R.string.settings_backup_wallet)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(dimens.spacingDefault))
|
||||
|
||||
PrimaryButton(
|
||||
onClick = onFeedback,
|
||||
text = stringResource(R.string.settings_send_us_feedback),
|
||||
outerPaddingValues = PaddingValues(
|
||||
horizontal = dimens.spacingNone,
|
||||
vertical = dimens.spacingSmall
|
||||
),
|
||||
text = stringResource(R.string.settings_send_us_feedback)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(dimens.spacingDefault))
|
||||
|
||||
PrimaryButton(
|
||||
onClick = onPrivacyPolicy,
|
||||
text = stringResource(R.string.settings_privacy_policy),
|
||||
outerPaddingValues = PaddingValues(
|
||||
horizontal = dimens.spacingNone,
|
||||
vertical = dimens.spacingSmall
|
||||
),
|
||||
text = stringResource(R.string.settings_privacy_policy)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(dimens.spacingDefault))
|
||||
|
||||
PrimaryButton(
|
||||
onClick = onDocumentation,
|
||||
text = stringResource(R.string.settings_documentation),
|
||||
outerPaddingValues = PaddingValues(
|
||||
horizontal = dimens.spacingNone,
|
||||
vertical = dimens.spacingSmall
|
||||
),
|
||||
text = stringResource(R.string.settings_documentation)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(dimens.spacingDefault))
|
||||
|
||||
PrimaryButton(
|
||||
onClick = onExportPrivateData,
|
||||
text = stringResource(R.string.settings_export_private_data),
|
||||
outerPaddingValues = PaddingValues(
|
||||
horizontal = dimens.spacingNone,
|
||||
vertical = dimens.spacingSmall
|
||||
),
|
||||
text = stringResource(R.string.settings_export_private_data)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(dimens.spacingDefault))
|
||||
|
||||
Spacer(
|
||||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
.weight(MINIMAL_WEIGHT)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(dimens.spacingDefault))
|
||||
|
||||
PrimaryButton(
|
||||
onClick = onAbout,
|
||||
text = stringResource(R.string.settings_about),
|
||||
outerPaddingValues = PaddingValues(
|
||||
horizontal = dimens.spacingNone,
|
||||
vertical = dimens.spacingSmall
|
||||
),
|
||||
text = stringResource(R.string.settings_about)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(dimens.spacingHuge))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package co.electriccoin.zcash.ui.screen.support.view
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
|
@ -85,9 +84,9 @@ fun Support(
|
|||
setShowDialog = setShowDialog,
|
||||
modifier = Modifier.padding(
|
||||
top = paddingValues.calculateTopPadding() + ZcashTheme.dimens.spacingDefault,
|
||||
bottom = paddingValues.calculateBottomPadding() + ZcashTheme.dimens.spacingDefault,
|
||||
start = ZcashTheme.dimens.spacingDefault,
|
||||
end = ZcashTheme.dimens.spacingDefault
|
||||
bottom = paddingValues.calculateBottomPadding(),
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -150,19 +149,20 @@ private fun SupportMainContent(
|
|||
|
||||
Body(stringResource(id = R.string.support_disclaimer))
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
|
||||
Spacer(
|
||||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
.weight(MINIMAL_WEIGHT)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingLarge))
|
||||
|
||||
PrimaryButton(
|
||||
onClick = { setShowDialog(true) },
|
||||
text = stringResource(id = R.string.support_send),
|
||||
outerPaddingValues = PaddingValues(all = ZcashTheme.dimens.spacingNone)
|
||||
text = stringResource(id = R.string.support_send)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(ZcashTheme.dimens.spacingHuge))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,8 +78,8 @@ fun Update(
|
|||
.padding(
|
||||
top = ZcashTheme.dimens.spacingDefault,
|
||||
bottom = ZcashTheme.dimens.spacingHuge,
|
||||
start = ZcashTheme.dimens.spacingDefault,
|
||||
end = ZcashTheme.dimens.spacingDefault
|
||||
start = ZcashTheme.dimens.screenHorizontalSpacing,
|
||||
end = ZcashTheme.dimens.screenHorizontalSpacing
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<string name="wallet_address_title">My wallet addresses</string>
|
||||
<string name="wallet_address_back_content_description">Back</string>
|
||||
|
||||
<string name="wallet_address_unified">Your Unified Address</string>
|
||||
<string name="wallet_address_unified">Your Unified Address:</string>
|
||||
<string name="wallet_address_header_includes">which includes</string>
|
||||
<string name="wallet_address_sapling">Shielded Sapling (NU1)</string>
|
||||
<string name="wallet_address_transparent">Transparent</string>
|
||||
|
|
Loading…
Reference in New Issue