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