Skip to content

Commit eed3ce0

Browse files
committed
feat: cjit onboarding view
1 parent 8bb0d24 commit eed3ce0

File tree

2 files changed

+57
-2
lines changed

2 files changed

+57
-2
lines changed

app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveQrScreen.kt

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ package to.bitkit.ui.screens.wallets.receive
22

33
import android.graphics.Bitmap
44
import androidx.compose.animation.AnimatedVisibility
5+
import androidx.compose.foundation.background
56
import androidx.compose.foundation.layout.Arrangement
7+
import androidx.compose.foundation.layout.Box
68
import androidx.compose.foundation.layout.Column
79
import androidx.compose.foundation.layout.Row
810
import androidx.compose.foundation.layout.Spacer
11+
import androidx.compose.foundation.layout.fillMaxHeight
912
import androidx.compose.foundation.layout.fillMaxSize
1013
import androidx.compose.foundation.layout.fillMaxWidth
1114
import androidx.compose.foundation.layout.height
@@ -28,6 +31,7 @@ import androidx.compose.runtime.rememberCoroutineScope
2831
import androidx.compose.runtime.setValue
2932
import androidx.compose.ui.Alignment
3033
import androidx.compose.ui.Modifier
34+
import androidx.compose.ui.draw.clip
3135
import androidx.compose.ui.graphics.painter.Painter
3236
import androidx.compose.ui.keepScreenOn
3337
import androidx.compose.ui.platform.LocalContext
@@ -44,13 +48,17 @@ import to.bitkit.ext.setClipboardText
4448
import to.bitkit.ext.truncate
4549
import to.bitkit.models.NodeLifecycleState
4650
import to.bitkit.repositories.LightningState
51+
import to.bitkit.ui.components.BodyM
4752
import to.bitkit.ui.components.BodyS
4853
import to.bitkit.ui.components.BottomSheetPreview
4954
import to.bitkit.ui.components.ButtonSize
5055
import to.bitkit.ui.components.Caption13Up
56+
import to.bitkit.ui.components.Display
57+
import to.bitkit.ui.components.FillHeight
5158
import to.bitkit.ui.components.PrimaryButton
5259
import to.bitkit.ui.components.QrCodeImage
5360
import to.bitkit.ui.components.Tooltip
61+
import to.bitkit.ui.components.VerticalSpacer
5462
import to.bitkit.ui.scaffold.SheetTopBar
5563
import to.bitkit.ui.screens.wallets.activity.components.CustomTabRowWithSpacing
5664
import to.bitkit.ui.shared.effects.SetMaxBrightness
@@ -61,6 +69,7 @@ import to.bitkit.ui.shared.util.shareText
6169
import to.bitkit.ui.theme.AppShapes
6270
import to.bitkit.ui.theme.AppThemeSurface
6371
import to.bitkit.ui.theme.Colors
72+
import to.bitkit.ui.utils.withAccent
6473
import to.bitkit.viewmodels.MainUiState
6574

6675
@Composable
@@ -339,7 +348,44 @@ private fun ReceiveQrView(
339348

340349
@Composable
341350
fun CjitOnBoardingView(modifier: Modifier = Modifier) {
342-
351+
Column(
352+
modifier = modifier
353+
.clip(AppShapes.small)
354+
.background(color = Colors.Black)
355+
.padding(32.dp),
356+
horizontalAlignment = Alignment.CenterHorizontally
357+
) {
358+
Display("Receive on <accent>spending balance</accent>".withAccent(accentColor = Colors.Purple))
359+
VerticalSpacer(8.dp)
360+
BodyM(
361+
"Enjoy instant and cheap\ntransactions with friends, family,\nand merchants.",
362+
color = Colors.White64,
363+
modifier = Modifier.fillMaxWidth()
364+
)
365+
VerticalSpacer(32.dp)
366+
Box(modifier = Modifier
367+
.fillMaxWidth()
368+
.weight(1f)
369+
) {
370+
Icon(
371+
painter = painterResource(R.drawable.ic_lightning_alt),
372+
tint = Colors.Purple,
373+
contentDescription = null,
374+
modifier = Modifier
375+
.size(64.dp)
376+
.align(Alignment.TopCenter)
377+
)
378+
Icon(
379+
painter = painterResource(R.drawable.arrow),
380+
tint = Colors.Purple,
381+
contentDescription = null,
382+
modifier = Modifier
383+
.align(Alignment.CenterStart)
384+
.padding(start = 32.dp)
385+
.fillMaxHeight()
386+
)
387+
}
388+
}
343389
}
344390

345391
@Composable
@@ -360,7 +406,7 @@ private fun ReceiveDetailsView(
360406
ReceiveTab.SAVINGS -> {
361407
if (onchainAddress.isNotEmpty()) {
362408
CopyAddressCard(
363-
title = androidx.compose.ui.res.stringResource(R.string.wallet__receive_bitcoin_invoice),
409+
title = stringResource(R.string.wallet__receive_bitcoin_invoice),
364410
address = onchainAddress,
365411
type = CopyAddressType.ONCHAIN,
366412
testTag = "ReceiveOnchainAddress",
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="48dp"
3+
android:height="200dp"
4+
android:viewportWidth="48"
5+
android:viewportHeight="200">
6+
<path
7+
android:pathData="M46.55,198.88C46.49,199.43 46,199.82 45.45,199.76L36.5,198.76C35.95,198.7 35.56,198.21 35.62,197.66C35.68,197.11 36.18,196.72 36.72,196.78L44.67,197.66L45.56,189.71C45.62,189.16 46.12,188.77 46.67,188.83C47.21,188.89 47.61,189.39 47.55,189.93L46.55,198.88ZM15.01,0.42C15.92,0.84 15.92,0.84 15.92,0.84C15.92,0.84 15.92,0.84 15.92,0.84C15.92,0.84 15.92,0.84 15.92,0.84C15.92,0.84 15.92,0.84 15.92,0.84C15.92,0.84 15.92,0.84 15.92,0.84C15.92,0.84 15.92,0.84 15.92,0.84C15.91,0.85 15.91,0.86 15.9,0.87C15.89,0.9 15.87,0.94 15.85,1C15.8,1.11 15.72,1.27 15.63,1.5C15.44,1.94 15.16,2.6 14.81,3.47L13.88,3.1L12.95,2.73C13.31,1.84 13.59,1.16 13.79,0.7C13.89,0.47 13.97,0.3 14.02,0.18C14.05,0.12 14.07,0.08 14.08,0.05C14.09,0.03 14.09,0.02 14.1,0.01C14.1,0.01 14.1,0.01 14.1,0C14.1,0 14.1,0 14.1,0C14.1,0 14.1,0 14.1,0C14.1,0 14.1,-0 14.1,-0C14.1,-0 14.1,-0 14.1,-0C14.1,-0 14.1,-0 15.01,0.42ZM11.85,8.53L12.8,8.87C12.23,10.49 11.61,12.35 10.96,14.43L10.01,14.13L9.05,13.83C9.7,11.74 10.33,9.85 10.91,8.2L11.85,8.53ZM8.37,19.7L9.34,19.97C8.85,21.74 8.35,23.62 7.87,25.61L6.9,25.37L5.92,25.13C6.41,23.13 6.91,21.23 7.41,19.44L8.37,19.7ZM5.58,31.08L6.56,31.29C6.17,33.13 5.79,35.03 5.42,37L4.44,36.82L3.46,36.64C3.82,34.65 4.21,32.73 4.61,30.87L5.58,31.08ZM3.46,42.59L4.44,42.74C4.15,44.61 3.88,46.53 3.63,48.5L2.64,48.37L1.65,48.24C1.9,46.26 2.17,44.32 2.47,42.43L3.46,42.59ZM1.98,54.17L2.98,54.27C2.79,56.17 2.62,58.1 2.49,60.07L1.49,60L0.49,59.93C0.63,57.94 0.8,55.99 0.99,54.08L1.98,54.17ZM1.16,65.84L2.16,65.88C2.08,67.8 2.03,69.74 2,71.71L1,71.7L0,71.69C0.03,69.69 0.08,67.73 0.16,65.8L1.16,65.84ZM1.01,77.56L2.01,77.54C2.04,79.45 2.1,81.38 2.19,83.34L1.19,83.38L0.19,83.43C0.1,81.45 0.04,79.5 0.01,77.57L1.01,77.56ZM1.54,89.21L2.53,89.14C2.68,91.06 2.85,92.99 3.06,94.94L2.06,95.05L1.07,95.15C0.86,93.18 0.69,91.22 0.54,89.29L1.54,89.21ZM2.76,100.86L3.75,100.73C4.01,102.63 4.3,104.54 4.62,106.46L3.63,106.63L2.64,106.79C2.32,104.84 2.03,102.91 1.77,101L2.76,100.86ZM4.68,112.38L5.66,112.19C6.03,114.08 6.44,115.98 6.88,117.9L5.9,118.12L4.93,118.35C4.48,116.41 4.07,114.49 3.7,112.58L4.68,112.38ZM7.29,123.78L8.26,123.52C8.75,125.38 9.27,127.25 9.82,129.13L8.86,129.41L7.9,129.69C7.34,127.8 6.82,125.91 6.32,124.03L7.29,123.78ZM10.61,135.01L11.56,134.7C12.15,136.51 12.78,138.34 13.45,140.17L12.51,140.51L11.57,140.85C10.9,139 10.26,137.16 9.66,135.32L10.61,135.01ZM14.59,145.99L15.52,145.62C16.23,147.41 16.97,149.2 17.75,150.99L16.83,151.39L15.91,151.78C15.13,149.97 14.38,148.16 13.66,146.36L14.59,145.99ZM19.23,156.71L20.13,156.29C20.95,158.03 21.8,159.79 22.69,161.54L21.8,161.99L20.9,162.44C20.01,160.67 19.15,158.9 18.32,157.13L19.23,156.71ZM24.49,167.14L25.37,166.66C26.29,168.36 27.25,170.06 28.23,171.76L27.37,172.26L26.5,172.77C25.51,171.05 24.54,169.33 23.61,167.62L24.49,167.14ZM30.36,177.26L31.21,176.73C32.22,178.37 33.27,180.01 34.35,181.65L33.51,182.2L32.68,182.75C31.59,181.09 30.53,179.44 29.51,177.78L30.36,177.26ZM36.78,187.03L37.6,186.46C38.7,188.04 39.83,189.61 41,191.19L40.19,191.78L39.39,192.38C38.21,190.79 37.07,189.19 35.96,187.6L36.78,187.03ZM43.72,196.44L44.51,195.83C45.11,196.6 45.72,197.37 46.34,198.14L45.56,198.77L44.78,199.39C44.15,198.61 43.54,197.84 42.93,197.06L43.72,196.44Z"
8+
android:fillColor="#B95CE8"/>
9+
</vector>

0 commit comments

Comments
 (0)