From 9f8607ea2b0bfe343f78b4a1b8ae8face74f0fa8 Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Tue, 15 Oct 2024 09:48:44 +0200 Subject: [PATCH] refactor: Update Matomo & Sentry light & dark icons & illus --- .../SettingsDataManagementMatomoScreen.kt | 24 ++++++++----------- .../SettingsDataManagementSentryScreen.kt | 24 ++++++++----------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDataManagementMatomoScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDataManagementMatomoScreen.kt index f6092d78d..af4f6d51e 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDataManagementMatomoScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDataManagementMatomoScreen.kt @@ -19,7 +19,6 @@ package com.infomaniak.swisstransfer.ui.screen.main.settings import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll @@ -30,19 +29,11 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import com.infomaniak.swisstransfer.R -import com.infomaniak.swisstransfer.ui.components.SharpRippleButton import com.infomaniak.swisstransfer.ui.components.SwissTransferTopAppBar import com.infomaniak.swisstransfer.ui.components.TopAppBarButton -import com.infomaniak.swisstransfer.ui.images.AppImages.AppIcons import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus -import com.infomaniak.swisstransfer.ui.images.icons.Matomo -import com.infomaniak.swisstransfer.ui.images.icons.Sentry -import com.infomaniak.swisstransfer.ui.images.illus.DataProtection +import com.infomaniak.swisstransfer.ui.images.illus.Matomo import com.infomaniak.swisstransfer.ui.screen.main.components.SmallWindowTopAppBarScaffold -import com.infomaniak.swisstransfer.ui.screen.main.settings.SettingsOptionScreens.* -import com.infomaniak.swisstransfer.ui.screen.main.settings.components.EndIconType.CHEVRON -import com.infomaniak.swisstransfer.ui.screen.main.settings.components.SettingItem -import com.infomaniak.swisstransfer.ui.theme.Dimens import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow @@ -55,7 +46,7 @@ fun SettingsDataManagementMatomoScreen( SmallWindowTopAppBarScaffold( smallWindowTopAppBar = { SwissTransferTopAppBar( - titleRes = R.string.settingsOptionDataManagement, + titleRes = R.string.matomo, navigationMenu = TopAppBarButton.backButton(navigateBack ?: {}), ) }, @@ -64,8 +55,13 @@ fun SettingsDataManagementMatomoScreen( modifier = Modifier.verticalScroll(rememberScrollState()), horizontalAlignment = Alignment.CenterHorizontally, ) { + Image( + imageVector = AppIllus.Matomo.image(), + contentDescription = null, + modifier = Modifier.padding(Margin.Medium), + ) Text( - text = stringResource(R.string.matomo), + text = stringResource(R.string.settingsMatomoDescription), style = SwissTransferTheme.typography.bodyRegular, color = SwissTransferTheme.colors.primaryTextColor, modifier = Modifier.padding(Margin.Medium), @@ -76,10 +72,10 @@ fun SettingsDataManagementMatomoScreen( @PreviewSmallWindow @Composable -private fun SettingsDataManagementScreenPreview() { +private fun SettingsDataManagementMatomoScreenPreview() { SwissTransferTheme { Surface { - SettingsDataManagementScreen({}, {}) + SettingsDataManagementMatomoScreen {} } } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDataManagementSentryScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDataManagementSentryScreen.kt index 39d42cfdd..8a1629215 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDataManagementSentryScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsDataManagementSentryScreen.kt @@ -19,7 +19,6 @@ package com.infomaniak.swisstransfer.ui.screen.main.settings import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll @@ -30,19 +29,11 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import com.infomaniak.swisstransfer.R -import com.infomaniak.swisstransfer.ui.components.SharpRippleButton import com.infomaniak.swisstransfer.ui.components.SwissTransferTopAppBar import com.infomaniak.swisstransfer.ui.components.TopAppBarButton -import com.infomaniak.swisstransfer.ui.images.AppImages.AppIcons import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus -import com.infomaniak.swisstransfer.ui.images.icons.Matomo -import com.infomaniak.swisstransfer.ui.images.icons.Sentry -import com.infomaniak.swisstransfer.ui.images.illus.DataProtection +import com.infomaniak.swisstransfer.ui.images.illus.Sentry import com.infomaniak.swisstransfer.ui.screen.main.components.SmallWindowTopAppBarScaffold -import com.infomaniak.swisstransfer.ui.screen.main.settings.SettingsOptionScreens.* -import com.infomaniak.swisstransfer.ui.screen.main.settings.components.EndIconType.CHEVRON -import com.infomaniak.swisstransfer.ui.screen.main.settings.components.SettingItem -import com.infomaniak.swisstransfer.ui.theme.Dimens import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme import com.infomaniak.swisstransfer.ui.utils.PreviewSmallWindow @@ -55,7 +46,7 @@ fun SettingsDataManagementSentryScreen( SmallWindowTopAppBarScaffold( smallWindowTopAppBar = { SwissTransferTopAppBar( - titleRes = R.string.settingsOptionDataManagement, + titleRes = R.string.sentry, navigationMenu = TopAppBarButton.backButton(navigateBack ?: {}), ) }, @@ -64,8 +55,13 @@ fun SettingsDataManagementSentryScreen( modifier = Modifier.verticalScroll(rememberScrollState()), horizontalAlignment = Alignment.CenterHorizontally, ) { + Image( + imageVector = AppIllus.Sentry.image(), + contentDescription = null, + modifier = Modifier.padding(Margin.Medium), + ) Text( - text = stringResource(R.string.sentry), + text = stringResource(R.string.settingsSentryDescription), style = SwissTransferTheme.typography.bodyRegular, color = SwissTransferTheme.colors.primaryTextColor, modifier = Modifier.padding(Margin.Medium), @@ -76,10 +72,10 @@ fun SettingsDataManagementSentryScreen( @PreviewSmallWindow @Composable -private fun SettingsDataManagementScreenPreview() { +private fun SettingsDataManagementSentryScreenPreview() { SwissTransferTheme { Surface { - SettingsDataManagementScreen({}, {}) + SettingsDataManagementSentryScreen {} } } }