Skip to content

Commit ca28a94

Browse files
committed
chore(flipcash): update spacing for balance empty state and copy
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent e2f26b7 commit ca28a94

File tree

6 files changed

+25
-23
lines changed

6 files changed

+25
-23
lines changed

apps/flipcash/core/src/main/kotlin/com/flipcash/app/core/transfers/TransferDirection.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ sealed interface TransferDirection : Parcelable {
3636
override val learnMoreAction: String
3737
@Composable get() = stringResource(R.string.action_learnHowToDepositFunds)
3838
override val continueAction: String
39-
@Composable get() = stringResource(R.string.action_depositFundsNow)
39+
@Composable get() = stringResource(R.string.action_depositUsdc)
4040
}
4141

4242
data object Outgoing : TransferDirection {

apps/flipcash/core/src/main/res/values/strings.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454

5555
<string name="error_description_linkExpired">The cash was automatically returned to the sender because it wasn\'t collected within 24 hours. Please ask them to send the cash again</string>
5656

57+
<string name="subtitle_balanceIsHeldInUsdStablecoins">Your balance is held in US dollar stablecoins</string>
58+
<string name="subtitle_ofUsdStablecoins">of US dollar stablecoins</string>
59+
<string name="subtitle_balanceEmptyState">Ask a friend to give you some cash with Flipcash, or deposit USDC from your crypto exchange or another crypto wallet</string>
60+
<string name="action_depositFunds">Deposit Funds</string>
5761

5862
<string name="title_depositUsdc">Deposit</string>
5963
<string name="title_withdrawUsdc">Withdraw</string>
@@ -149,9 +153,9 @@
149153

150154
<string name="subtitle_startCameraToScan">You need to start your camera to grab cash</string>
151155

152-
<string name="title_learnToDeposit">You can deposit funds from your bank account into Flipcash</string>
153-
<string name="action_learnHowToDepositFunds">Learn How to Deposit Funds</string>
154-
<string name="action_depositFundsNow">Deposit Funds Now</string>
156+
<string name="title_learnToDeposit">Purchase USDC on a crypto exchange with your bank account, and then deposit into Flipcash</string>
157+
<string name="action_learnHowToDepositFunds">Learn How to Get USDC</string>
158+
<string name="action_depositUsdc">Deposit USDC</string>
155159

156160
<string name="title_learnToWithdraw">You can withdraw your funds at any time, and move them into your bank account</string>
157161
<string name="action_learnHowToWithdrawFunds">Learn How to Withdraw Funds</string>

apps/flipcash/features/balance/src/main/kotlin/com/flipcash/app/balance/BalanceScreen.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import com.flipcash.app.balance.internal.BalanceScreen
1616
import com.flipcash.app.balance.internal.BalanceViewModel
1717
import com.flipcash.app.core.NavScreenProvider
1818
import com.flipcash.app.core.money.CurrencySelectionKind
19+
import com.flipcash.app.core.transfers.TransferDirection
1920
import com.flipcash.core.R
2021
import com.getcode.navigation.core.LocalCodeNavigator
2122
import com.getcode.navigation.extensions.getActivityScopedViewModel
@@ -83,7 +84,7 @@ class BalanceScreen: ModalScreen, NamedScreen, Parcelable {
8384
.onEach {
8485
navigator.push(
8586
ScreenRegistry.get(
86-
NavScreenProvider.HomeScreen.Menu.Transfers.Deposit
87+
NavScreenProvider.HomeScreen.Menu.Transfers.Learn(TransferDirection.Incoming)
8788
)
8889
)
8990
}.launchIn(this)

apps/flipcash/features/balance/src/main/kotlin/com/flipcash/app/balance/internal/BalanceScreenContent.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import androidx.compose.runtime.getValue
2222
import androidx.compose.ui.Alignment
2323
import androidx.compose.ui.Modifier
2424
import androidx.compose.ui.platform.LocalContext
25+
import androidx.compose.ui.res.stringResource
2526
import androidx.compose.ui.text.style.TextAlign
2627
import androidx.compose.ui.tooling.preview.Preview
2728
import androidx.paging.LoadState
@@ -37,6 +38,7 @@ import com.flipcash.app.core.feed.ActivityFeedMessage
3738
import com.flipcash.app.core.money.CurrencySelectionKind
3839
import com.flipcash.app.core.transfers.TransferDirection
3940
import com.flipcash.app.theme.FlipcashDesignSystem
41+
import com.flipcash.features.balance.R
4042
import com.getcode.navigation.core.LocalCodeNavigator
4143
import com.getcode.opencode.compose.ExchangeStub
4244
import com.getcode.opencode.compose.LocalExchange
@@ -112,19 +114,19 @@ private fun FeedList(
112114
) {
113115
Column(
114116
modifier = Modifier.fillMaxWidth().padding(horizontal = CodeTheme.dimens.inset),
115-
verticalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x6)
117+
verticalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x12)
116118
) {
117119
Text(
118120
modifier = Modifier.fillMaxWidth(),
119-
text = "Ask a friend to give you some Flipcash, or deposit USDC from your crypto exchange or other crypto wallet",
121+
text = stringResource(R.string.subtitle_balanceEmptyState),
120122
style = CodeTheme.typography.textMedium,
121123
color = CodeTheme.colors.textMain,
122124
textAlign = TextAlign.Center,
123125
)
124126

125127
CodeButton(
126128
modifier = Modifier.fillMaxWidth(),
127-
text = "Deposit USDC",
129+
text = stringResource(R.string.action_depositFunds),
128130
buttonState = ButtonState.Filled
129131
) {
130132
dispatchEvent(BalanceViewModel.Event.OpenDeposit)

apps/flipcash/features/balance/src/main/res/values/strings.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/flipcash/shared/transfers/src/main/kotlin/com/flipcash/app/transfers/TransferInformationalScreen.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class TransferInformationalScreen(
5050
val navigator = LocalCodeNavigator.current
5151
val uriHandler = LocalUriHandler.current
5252
val context = LocalContext.current
53+
5354
CodeScaffold(
5455
topBar = {
5556
AppBarWithTitle(
@@ -73,6 +74,15 @@ class TransferInformationalScreen(
7374
modifier = Modifier
7475
.fillMaxWidth(),
7576
buttonState = ButtonState.Filled,
77+
text = direction.continueAction
78+
) {
79+
navigator.push(ScreenRegistry.get(direction.nextScreen))
80+
}
81+
82+
CodeButton(
83+
modifier = Modifier
84+
.fillMaxWidth(),
85+
buttonState = ButtonState.Subtle,
7686
text = direction.learnMoreAction
7787
) {
7888
try {
@@ -88,16 +98,6 @@ class TransferInformationalScreen(
8898
message = context.getString(R.string.error_description_failedToOpenExternalLink)
8999
)
90100
}
91-
92-
}
93-
94-
CodeButton(
95-
modifier = Modifier
96-
.fillMaxWidth(),
97-
buttonState = ButtonState.Filled,
98-
text = direction.continueAction
99-
) {
100-
navigator.push(ScreenRegistry.get(direction.nextScreen))
101101
}
102102
}
103103
}

0 commit comments

Comments
 (0)