diff --git a/apps/flipcash/core/src/main/res/drawable/ic_coins_add.xml b/apps/flipcash/core/src/main/res/drawable/ic_coins_add.xml new file mode 100644 index 000000000..e33415f03 --- /dev/null +++ b/apps/flipcash/core/src/main/res/drawable/ic_coins_add.xml @@ -0,0 +1,15 @@ + + + + diff --git a/apps/flipcash/core/src/main/res/values/strings.xml b/apps/flipcash/core/src/main/res/values/strings.xml index c9caa95e9..141425cd1 100644 --- a/apps/flipcash/core/src/main/res/values/strings.xml +++ b/apps/flipcash/core/src/main/res/values/strings.xml @@ -628,6 +628,7 @@ No currencies have been created in the last week No popular currencies right now Create Your Own Currency + Create a Currency Create a currency in minutes and immediately use it as cash Not Yet Available Check back soon diff --git a/apps/flipcash/features/balance/src/main/kotlin/com/flipcash/app/balance/internal/WalletScreenContent.kt b/apps/flipcash/features/balance/src/main/kotlin/com/flipcash/app/balance/internal/WalletScreenContent.kt index fde636ee5..9b120b233 100644 --- a/apps/flipcash/features/balance/src/main/kotlin/com/flipcash/app/balance/internal/WalletScreenContent.kt +++ b/apps/flipcash/features/balance/src/main/kotlin/com/flipcash/app/balance/internal/WalletScreenContent.kt @@ -3,6 +3,7 @@ package com.flipcash.app.balance.internal import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -18,8 +19,6 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material.Icon -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.AddCircleOutline import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -27,7 +26,6 @@ import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.graphicsLayer -import androidx.compose.ui.graphics.vector.rememberVectorPainter import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp @@ -195,33 +193,67 @@ internal fun WalletScreenContent( } item { - // Fixed, width-proportional height (like iOS) so both tiles are equal height and tall - // enough for the icon (top) and label (bottom) to sit apart — labels bottom-align even - // when one wraps to two lines. - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x2), + // 2x2 action grid. Fixed, width-proportional tile height (like iOS) so tiles are + // equal height and tall enough for the icon (top) and label (bottom) to sit apart — + // labels bottom-align even when one wraps to two lines. + Column( + verticalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x2), ) { - TileButton( - modifier = Modifier - .weight(1f) - .aspectRatio(1.45f), - style = TileButtonStyle.Spread, - text = stringResource(R.string.action_addMoney), - icon = rememberVectorPainter(Icons.Outlined.AddCircleOutline), + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x2), ) { - dispatchEvent(WalletViewModel.Event.PresentDepositOptions) + // ic_menu_deposit/ic_menu_withdraw are the app's canonical glyphs for this + // pair (the Settings-sheet money tiles) — matched arrows, not ad-hoc icons. + TileButton( + modifier = Modifier + .weight(1f) + .aspectRatio(1.45f), + style = TileButtonStyle.Spread, + text = stringResource(R.string.action_addMoney), + icon = painterResource(R.drawable.ic_menu_deposit), + ) { + dispatchEvent(WalletViewModel.Event.PresentDepositOptions) + } + + TileButton( + modifier = Modifier + .weight(1f) + .aspectRatio(1.45f), + style = TileButtonStyle.Spread, + text = stringResource(R.string.action_withdrawMoney), + icon = painterResource(R.drawable.ic_menu_withdraw), + ) { + dispatchEvent(WalletViewModel.Event.OpenScreen(AppRoute.Transfers.Withdrawal())) + } } - TileButton( - modifier = Modifier - .weight(1f) - .aspectRatio(1.45f), - style = TileButtonStyle.Spread, - text = stringResource(R.string.action_discoverCurrencies), - icon = painterResource(R.drawable.ic_globe), + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x2), ) { - dispatchEvent(WalletViewModel.Event.OpenScreen(AppRoute.Token.Discovery)) + TileButton( + modifier = Modifier + .weight(1f) + .aspectRatio(1.45f), + style = TileButtonStyle.Spread, + text = stringResource(R.string.action_discoverCurrencies), + icon = painterResource(R.drawable.ic_globe), + ) { + dispatchEvent(WalletViewModel.Event.OpenScreen(AppRoute.Token.Discovery)) + } + + // Currency creation now lives here rather than as a Discover promo. + TileButton( + modifier = Modifier + .weight(1f) + .aspectRatio(1.45f), + style = TileButtonStyle.Spread, + text = stringResource(R.string.action_createCurrency), + icon = painterResource(R.drawable.ic_coins_add), + ) { + dispatchEvent(WalletViewModel.Event.OpenScreen(AppRoute.Token.CurrencyCreator)) + } } } } diff --git a/apps/flipcash/features/discovery/src/main/kotlin/com/flipcash/app/discovery/internal/components/TokenLeaderboard.kt b/apps/flipcash/features/discovery/src/main/kotlin/com/flipcash/app/discovery/internal/components/TokenLeaderboard.kt index 6613c8a11..0372d12c2 100644 --- a/apps/flipcash/features/discovery/src/main/kotlin/com/flipcash/app/discovery/internal/components/TokenLeaderboard.kt +++ b/apps/flipcash/features/discovery/src/main/kotlin/com/flipcash/app/discovery/internal/components/TokenLeaderboard.kt @@ -7,7 +7,6 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyColumn @@ -64,8 +63,9 @@ internal fun TokenLeaderboard( val features = LocalFeatureFlags.current val isNewUi by features.observe(FeatureFlag.NewUi).collectAsStateWithLifecycle() - // The v2 upsell card sits over the list as the bottom bar; frost it against the leaderboard - // scrolling beneath. The inline (non-v2) card is part of the list itself, so it gets no hazeState. + // v2 surfaces currency creation as a Wallet action tile, so Discover drops its promo entirely; + // v1 keeps it as the first row above the leaderboard. The haze source stays wired for the + // scroll gradient's benefit. val hazeState = rememberHazeState() val currencyCreatorCard = @Composable { modifier: Modifier, haze: HazeState? -> @@ -73,20 +73,7 @@ internal fun TokenLeaderboard( dispatch(TokenDiscoveryViewModel.Event.CreateCurrency) } } - CodeScaffold( - bottomBar = { - if (isNewUi) { - currencyCreatorCard( - Modifier - .fillMaxWidth() - .padding(horizontal = CodeTheme.dimens.inset) - .navigationBarsPadding() - .padding(bottom = CodeTheme.dimens.grid.x3), - hazeState, - ) - } - }, - ) { padding -> + CodeScaffold { padding -> LazyColumn( modifier = Modifier .fillMaxSize()