From d3e475aa09cc832835cea64482a494ca185d0d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Let=C3=ADcia=20Aguiar?= Date: Sun, 4 Aug 2024 07:47:02 -0300 Subject: [PATCH] feat: create feature button at settings page (#3389) --- .../java/com/ivy/settings/SettingsScreen.kt | 36 +++++++++++++++++++ .../src/main/res/values-pt-rBR/strings.xml | 1 + .../ui/core/src/main/res/values/strings.xml | 1 + 3 files changed, 38 insertions(+) diff --git a/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt b/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt index cde35564fb..745152a4fb 100644 --- a/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt +++ b/screen/settings/src/main/java/com/ivy/settings/SettingsScreen.kt @@ -50,6 +50,7 @@ import com.ivy.legacy.utils.drawColoredShadow import com.ivy.navigation.AttributionsScreen import com.ivy.navigation.ContributorsScreen import com.ivy.navigation.ExchangeRatesScreen +import com.ivy.navigation.FeaturesScreen import com.ivy.navigation.ImportScreen import com.ivy.navigation.Navigation import com.ivy.navigation.ReleasesScreen @@ -377,6 +378,12 @@ private fun BoxWithConstraintsScope.UI( ) { chooseStartDateOfMonthVisible = true } + + Spacer(Modifier.height(12.dp)) + + CustomFeatures( + onClick = { nav.navigateTo(FeaturesScreen) } + ) } // item { @@ -609,6 +616,35 @@ private fun StartDateOfMonth( } } +@Composable +private fun CustomFeatures( + onClick: () -> Unit +) { + SettingsButtonRow( + onClick = onClick + ) { + Spacer(Modifier.width(12.dp)) + + IvyIconScaled( + icon = R.drawable.ic_custom_programming_m, + tint = UI.colors.pureInverse, + iconScale = IconScale.M, + padding = 0.dp + ) + + Spacer(modifier = Modifier.width(8.dp)) + + Text( + modifier = Modifier.padding(vertical = 20.dp), + text = stringResource(R.string.advanced_features), + style = UI.typo.b2.style( + color = UI.colors.pureInverse, + fontWeight = FontWeight.Bold + ) + ) + } +} + @Composable private fun IvyTelegram() { val rootActivity = rootScreen() diff --git a/shared/ui/core/src/main/res/values-pt-rBR/strings.xml b/shared/ui/core/src/main/res/values-pt-rBR/strings.xml index 1eb2896213..c6ab4501df 100644 --- a/shared/ui/core/src/main/res/values-pt-rBR/strings.xml +++ b/shared/ui/core/src/main/res/values-pt-rBR/strings.xml @@ -489,5 +489,6 @@ "\n!!!⚠️AVISO: A importação pode duplicar transações!!!\nTransações duplicadas NÃO podem ser excluídas facilmente e você precisará remover manualmente cada uma delas! \nMotivo: podemos Não analisamos IDs de transação porque o Ivy Wallet funciona apenas com UUID e outros aplicativos não.\nSe você está começando do zero, não se preocupe. Por favor, ignore esta mensagem." Selecionar tags Linguagem + Configurações avançadas Orçamento excedido por %1$s %2$s diff --git a/shared/ui/core/src/main/res/values/strings.xml b/shared/ui/core/src/main/res/values/strings.xml index 3fc85f99b6..505b406669 100644 --- a/shared/ui/core/src/main/res/values/strings.xml +++ b/shared/ui/core/src/main/res/values/strings.xml @@ -492,4 +492,5 @@ Select Tags Your bill for %1$s %2$s has been paid Language + Advanced features