Skip to content

Commit

Permalink
Merge pull request #1051 from soramitsu/staging
Browse files Browse the repository at this point in the history
staging
  • Loading branch information
PankraSerg authored Dec 8, 2023
2 parents 71babe3 + 9c07130 commit cffdbb4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
ext {
// App version
versionName = '3.1.1'
versionCode = 135
versionCode = 136

// SDK and tools
compileSdkVersion = 34
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,26 @@ fun H2(
)
}

@Composable
fun H2(
modifier: Modifier = Modifier,
text: AnnotatedString,
textAlign: TextAlign? = null,
color: Color = Color.Unspecified,
overflow: TextOverflow = TextOverflow.Clip,
maxLines: Int = Int.MAX_VALUE
) {
Text(
textAlign = textAlign,
text = text,
style = MaterialTheme.customTypography.header2,
modifier = modifier,
color = color,
overflow = overflow,
maxLines = maxLines
)
}

@Composable
fun H3(
modifier: Modifier = Modifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.ui.Alignment.Companion.CenterHorizontally
import androidx.compose.ui.Alignment.Companion.CenterVertically
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
Expand All @@ -26,12 +25,12 @@ import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import jp.co.soramitsu.common.compose.component.AccentButton
import jp.co.soramitsu.common.compose.component.BackgroundCornered
import jp.co.soramitsu.common.compose.component.BottomSheetScreen
import jp.co.soramitsu.common.compose.component.ColoredTextButton
import jp.co.soramitsu.common.compose.component.GrayButton
import jp.co.soramitsu.common.compose.component.H1
import jp.co.soramitsu.common.compose.component.H2
import jp.co.soramitsu.common.compose.component.H4
import jp.co.soramitsu.common.compose.component.H6
Expand Down Expand Up @@ -90,17 +89,21 @@ fun StartStakingPoolScreen(
MarginVertical(margin = 16.dp)
WhatIsStakingCard(instructionsClick)
MarginVertical(margin = 16.dp)

val formattedTitle = stringResource(id = R.string.staking_pool_start_earn_reward_title, state.assetName.uppercase())
val startValueIndex = formattedTitle.indexOf(state.assetName.uppercase())
val endValueIndex = startValueIndex + state.assetName.uppercase().length

H2(
text = stringResource(id = R.string.staking_pool_start_earn_reward_title),
text = buildAnnotatedString {
withStyle(style = SpanStyle(color = black2)) {
append(formattedTitle)
}
addStyle(SpanStyle(color = colorAccentDark, fontSize = 30.sp), startValueIndex, endValueIndex)
},
textAlign = TextAlign.Center,
color = black2
)
MarginVertical(margin = 8.dp)
H1(
text = state.assetName.uppercase(),
modifier = Modifier.align(CenterHorizontally),
color = colorAccentDark
)
MarginVertical(margin = 24.dp)
SingleValueInfoCard(R.drawable.ic_chart, R.string.staking_pool_rewards_delay_text, state.rewardsPayoutDelay)
MarginVertical(margin = 8.dp)
Expand Down

0 comments on commit cffdbb4

Please sign in to comment.