diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/ChainTilted.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/ChainTilted.kt new file mode 100644 index 000000000..4d3f44072 --- /dev/null +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/ChainTilted.kt @@ -0,0 +1,78 @@ +package com.infomaniak.swisstransfer.ui.icons.illu + +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.size +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.PathFillType.Companion.NonZero +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.ImageVector.Builder +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.infomaniak.swisstransfer.ui.icons.AppIcons +import androidx.compose.ui.graphics.StrokeCap.Companion.Round as strokeCapRound +import androidx.compose.ui.graphics.StrokeJoin.Companion.Round as strokeJoinRound + +val AppIcons.Illu.ChainTilted: ImageVector + get() { + if (_chainTilted != null) { + return _chainTilted!! + } + _chainTilted = Builder( + name = "ChainTilted", + defaultWidth = 120.0.dp, + defaultHeight = 80.0.dp, + viewportWidth = 120.0f, + viewportHeight = 80.0f + ).apply { + path( + fill = null, + stroke = SolidColor(Color(0xFF3CB572)), + strokeLineWidth = 3.0f, + strokeLineCap = strokeCapRound, + strokeLineJoin = strokeJoinRound, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(47.17f, 75.82f) + lineToRelative(-4.56f, 4.56f) + arcToRelative(22.03f, 22.03f, 0.0f, true, true, -31.16f, -31.15f) + lineToRelative(23.37f, -23.37f) + arcToRelative(22.03f, 22.03f, 0.0f, false, true, 33.41f, 28.52f) + } + path( + fill = null, + stroke = SolidColor(Color(0xFF3CB572)), + strokeLineWidth = 3.0f, + strokeLineCap = strokeCapRound, + strokeLineJoin = strokeJoinRound, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(73.88f, 12.5f) + lineToRelative(3.67f, -3.67f) + arcToRelative(22.03f, 22.03f, 0.0f, false, true, 31.16f, 31.16f) + lineTo(85.34f, 63.36f) + arcToRelative(22.03f, 22.03f, 0.0f, false, true, -33.41f, -28.52f) + } + }.build() + return _chainTilted!! + } + +private var _chainTilted: ImageVector? = null + +@Preview +@Composable +private fun Preview() { + Box { + Image( + imageVector = AppIcons.Illu.ChainTilted, + contentDescription = null, + modifier = Modifier.size(AppIcons.previewSize) + ) + } +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/EnvelopeTilted.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/EnvelopeTilted.kt new file mode 100644 index 000000000..34e70a409 --- /dev/null +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/EnvelopeTilted.kt @@ -0,0 +1,80 @@ +package com.infomaniak.swisstransfer.ui.icons.illu + +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.size +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.PathFillType.Companion.NonZero +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.ImageVector.Builder +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.infomaniak.swisstransfer.ui.icons.AppIcons +import androidx.compose.ui.graphics.StrokeCap.Companion.Round as strokeCapRound +import androidx.compose.ui.graphics.StrokeJoin.Companion.Round as strokeJoinRound + +val AppIcons.Illu.EnvelopeTilted: ImageVector + get() { + if (_envelopeTilted != null) { + return _envelopeTilted!! + } + _envelopeTilted = Builder( + name = "EnvelopeTilted", + defaultWidth = 120.0.dp, + defaultHeight = 80.0.dp, + viewportWidth = 120.0f, + viewportHeight = 80.0f + ).apply { + path( + fill = null, + stroke = SolidColor(Color(0xFF014958)), + strokeLineWidth = 3.0f, + strokeLineCap = strokeCapRound, + strokeLineJoin = strokeJoinRound, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(85.95f, 4.79f) + lineTo(63.9f, 63.07f) + lineTo(2.41f, 53.02f) + } + path( + fill = null, + stroke = SolidColor(Color(0xFF014958)), + strokeLineWidth = 3.0f, + strokeLineCap = strokeCapRound, + strokeLineJoin = strokeJoinRound, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(80.94f, 5.11f) + lineTo(5.18f, 48.85f) + curveTo(2.04f, 50.66f, 1.0f, 54.73f, 2.85f, 57.94f) + lineToRelative(26.83f, 46.47f) + curveToRelative(1.85f, 3.21f, 5.9f, 4.34f, 9.03f, 2.53f) + lineToRelative(75.76f, -43.74f) + curveToRelative(3.14f, -1.81f, 4.18f, -5.88f, 2.33f, -9.09f) + lineTo(89.98f, 7.63f) + curveToRelative(-1.85f, -3.21f, -5.9f, -4.34f, -9.03f, -2.53f) + } + }.build() + return _envelopeTilted!! + } + +private var _envelopeTilted: ImageVector? = null + +@Preview +@Composable +private fun Preview() { + Box { + Image( + imageVector = AppIcons.Illu.EnvelopeTilted, + contentDescription = null, + modifier = Modifier.size(AppIcons.previewSize) + ) + } +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/QrCodeTilted.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/QrCodeTilted.kt new file mode 100644 index 000000000..b48dc7192 --- /dev/null +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/QrCodeTilted.kt @@ -0,0 +1,85 @@ +package com.infomaniak.swisstransfer.ui.icons.illu + +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.PathFillType.Companion.NonZero +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.ImageVector.Builder +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.infomaniak.swisstransfer.ui.icons.AppIcons +import androidx.compose.ui.graphics.StrokeCap.Companion.Round as strokeCapRound +import androidx.compose.ui.graphics.StrokeJoin.Companion.Round as strokeJoinRound + + +val AppIcons.Illu.QrCodeTilted: ImageVector + get() { + if (_qrCodeTilted != null) { + return _qrCodeTilted!! + } + _qrCodeTilted = Builder( + name = "QrCodeTilted", + defaultWidth = 120.0.dp, + defaultHeight = 80.0.dp, + viewportWidth = 120.0f, + viewportHeight = 80.0f + ).apply { + path( + fill = null, + stroke = SolidColor(Color(0xFF3CB572)), + strokeLineWidth = 3.0f, + strokeLineCap = strokeCapRound, + strokeLineJoin = strokeJoinRound, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(15.56f, 56.33f) + lineTo(29.99f, 48.0f) + lineToRelative(-8.33f, -14.43f) + lineTo(7.23f, 41.9f) + close() + moveToRelative(79.69f, 21.35f) + lineToRelative(14.43f, -8.33f) + lineToRelative(-8.33f, -14.43f) + lineToRelative(-14.43f, 8.33f) + close() + moveTo(23.9f, 70.76f) + lineToRelative(28.86f, -16.67f) + lineToRelative(-4.17f, -7.22f) + moveToRelative(14.44f, -8.33f) + lineToRelative(-12.5f, -21.65f) + lineToRelative(21.65f, -12.5f) + lineToRelative(12.5f, 21.65f) + lineToRelative(-7.22f, 4.17f) + moveToRelative(-37.2f, 2.23f) + lineToRelative(-4.17f, -7.22f) + moveTo(73.6f, 90.18f) + lineTo(61.1f, 68.53f) + lineToRelative(7.22f, -4.17f) + moveToRelative(10.26f, -15.55f) + lineToRelative(14.43f, -8.33f) + } + }.build() + return _qrCodeTilted!! + } + +private var _qrCodeTilted: ImageVector? = null + +@Preview +@Composable +private fun Preview() { + Box { + Image( + imageVector = AppIcons.Illu.QrCodeTilted, + contentDescription = null, + modifier = Modifier.size(AppIcons.previewSize) + ) + } +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/WaveSignalTilted.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/WaveSignalTilted.kt new file mode 100644 index 000000000..a80a6387f --- /dev/null +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/WaveSignalTilted.kt @@ -0,0 +1,66 @@ +package com.infomaniak.swisstransfer.ui.icons.illu + +import androidx.compose.foundation.Image +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.PathFillType.Companion.NonZero +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.ImageVector.Builder +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.infomaniak.swisstransfer.ui.icons.AppIcons +import androidx.compose.ui.graphics.StrokeCap.Companion.Round as strokeCapRound +import androidx.compose.ui.graphics.StrokeJoin.Companion.Round as strokeJoinRound + + +val AppIcons.Illu.WaveSignalTilted: ImageVector + get() { + if (_waveSignalTilted != null) { + return _waveSignalTilted!! + } + _waveSignalTilted = Builder( + name = "WaveSignalTilted", + defaultWidth = 120.0.dp, + defaultHeight = 80.0.dp, + viewportWidth = 120.0f, + viewportHeight = 80.0f + ).apply { + path( + fill = null, + stroke = SolidColor(Color(0xFFCF9E1B)), + strokeLineWidth = 3.0f, + strokeLineCap = strokeCapRound, + strokeLineJoin = strokeJoinRound, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(93.93f, 50.48f) + arcToRelative(32.97f, 32.97f, 0.0f, false, false, -40.38f, 23.31f) + moveToRelative(46.19f, -42.81f) + arcToRelative(52.75f, 52.75f, 0.0f, false, false, -64.6f, 37.3f) + moveToRelative(66.36f, -56.51f) + arcToRelative(72.53f, 72.53f, 0.0f, false, false, -85.65f, 49.45f) + } + }.build() + return _waveSignalTilted!! + } + +private var _waveSignalTilted: ImageVector? = null + +@Preview +@Composable +private fun Preview() { + Box { + Image( + imageVector = AppIcons.Illu.WaveSignalTilted, + contentDescription = null, + modifier = Modifier.size(AppIcons.previewSize) + ) + } +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/NewTransferNavHost.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/NewTransferNavHost.kt index 2b27689c1..54467d858 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/NewTransferNavHost.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/NewTransferNavHost.kt @@ -18,9 +18,7 @@ package com.infomaniak.swisstransfer.ui.screen.newtransfer -import androidx.compose.foundation.layout.safeDrawingPadding import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier import androidx.navigation.NavHostController import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable @@ -38,10 +36,10 @@ fun NewTransferNavHost(navController: NavHostController) { NavHost(navController, NewTransferNavigation.startDestination) { composable { - ImportFilesScreen() + ImportFilesScreen(navigateToTransferTypeScreen = { navController.navigate(TransferTypeDestination) }) } composable { - TransferTypeScreen() + TransferTypeScreen(navigateToTransfer = { /*TODO*/ }) } composable { TransferOptionsScreen() diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt index edb6867ce..428370127 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt @@ -41,7 +41,7 @@ import com.infomaniak.swisstransfer.ui.utils.PreviewMobile import com.infomaniak.swisstransfer.ui.utils.PreviewTablet @Composable -fun ImportFilesScreen() { +fun ImportFilesScreen(navigateToTransferTypeScreen: () -> Unit) { var showUploadSourceChoiceBottomSheet by rememberSaveable { mutableStateOf(false) } BottomStickyButtonScaffold( @@ -59,7 +59,7 @@ fun ImportFilesScreen() { LargeButton( modifier = modifier, titleRes = R.string.buttonNext, - onClick = { /*TODO*/ }, + onClick = { navigateToTransferTypeScreen() }, ) }, ) { @@ -99,7 +99,7 @@ private fun UploadSourceChoiceBottomSheet( @Composable private fun ImportFilesScreenPreview() { SwissTransferTheme { - ImportFilesScreen() + ImportFilesScreen {} } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/TransferTypeScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/TransferTypeScreen.kt index 5f02f61d0..0b7660dde 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/TransferTypeScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/TransferTypeScreen.kt @@ -18,10 +18,90 @@ package com.infomaniak.swisstransfer.ui.screen.newtransfer.importfiles +import androidx.annotation.StringRes +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextAlign +import com.infomaniak.swisstransfer.R +import com.infomaniak.swisstransfer.ui.components.SwissTransferTobAppBar +import com.infomaniak.swisstransfer.ui.icons.AppIcons +import com.infomaniak.swisstransfer.ui.icons.illu.ChainTilted +import com.infomaniak.swisstransfer.ui.icons.illu.EnvelopeTilted +import com.infomaniak.swisstransfer.ui.icons.illu.QrCodeTilted +import com.infomaniak.swisstransfer.ui.icons.illu.WaveSignalTilted +import com.infomaniak.swisstransfer.ui.screen.newtransfer.importfiles.components.TransferTypeButtons +import com.infomaniak.swisstransfer.ui.theme.Margin +import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme +import com.infomaniak.swisstransfer.ui.utils.PreviewMobile +import com.infomaniak.swisstransfer.ui.utils.PreviewTablet @Composable -fun TransferTypeScreen() { - Text("TransferTypeScreen") +fun TransferTypeScreen(navigateToTransfer: (TransferType) -> Unit) { + Scaffold(topBar = { SwissTransferTobAppBar() }) { contentPaddings -> + Column( + modifier = Modifier + .fillMaxWidth() + .padding(contentPaddings) + ) { + Text( + modifier = Modifier + .fillMaxWidth() + .padding(vertical = Margin.Large, horizontal = Margin.Medium), + text = stringResource(R.string.transferTypeTitle), + style = SwissTransferTheme.typography.h1, + textAlign = TextAlign.Center, + ) + + TransferTypeButtons(TransferType.entries, navigateToTransfer) + } + } +} + +enum class TransferType( + @StringRes val titleRes: Int, + val background: @Composable () -> Color, + val foreground: @Composable () -> Color, + val icon: ImageVector, +) { + LINK( + R.string.transferTypeLink, + { SwissTransferTheme.colors.transferTypeLinkContainer }, + { SwissTransferTheme.colors.transferTypeLinkOnContainer }, + AppIcons.Illu.ChainTilted + ), + EMAIL( + R.string.transferTypeEmail, + { SwissTransferTheme.colors.transferTypeEmailContainer }, + { SwissTransferTheme.colors.transferTypeEmailOnContainer }, + AppIcons.Illu.EnvelopeTilted + ), + QR_CODE( + R.string.transferTypeQrCode, + { SwissTransferTheme.colors.transferTypeQrContainer }, + { SwissTransferTheme.colors.transferTypeQrOnContainer }, + AppIcons.Illu.QrCodeTilted + ), + PROXIMITY( + R.string.transferTypeProximity, + { SwissTransferTheme.colors.transferTypeProximityContainer }, + { SwissTransferTheme.colors.transferTypeProximityOnContainer }, + AppIcons.Illu.WaveSignalTilted + ), +} + +@PreviewMobile +@PreviewTablet +@Composable +private fun TransferTypeScreenPreview() { + SwissTransferTheme { + TransferTypeScreen {} + } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferTypeButtons.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferTypeButtons.kt new file mode 100644 index 000000000..60dfd17aa --- /dev/null +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferTypeButtons.kt @@ -0,0 +1,121 @@ +/* + * Infomaniak SwissTransfer - Android + * Copyright (C) 2024 Infomaniak Network SA + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.infomaniak.swisstransfer.ui.screen.newtransfer.importfiles.components + +import android.content.res.Configuration +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.foundation.lazy.grid.items +import androidx.compose.material3.* +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.infomaniak.swisstransfer.ui.screen.newtransfer.importfiles.TransferType +import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme + +private val SPACE_AROUND_BUTTONS = 20.dp +private val COLUMN_MIN_WIDTH = 150.dp + +@Composable +fun TransferTypeButtons(items: List, navigateToTransfer: (TransferType) -> Unit) { + LazyVerticalGrid( + modifier = Modifier + .padding(horizontal = SPACE_AROUND_BUTTONS) + .wrapContentHeight(), + userScrollEnabled = false, + columns = GridCells.Adaptive(COLUMN_MIN_WIDTH), + verticalArrangement = Arrangement.spacedBy(SPACE_AROUND_BUTTONS), + horizontalArrangement = Arrangement.spacedBy(SPACE_AROUND_BUTTONS), + ) { + items(items = items, key = { it.titleRes }) { item -> + TransferTypeButton( + modifier = Modifier.aspectRatio(0.87f), + item = item, + onClick = { navigateToTransfer(item) } + ) + } + } +} + +@Composable +private fun TransferTypeButton(modifier: Modifier = Modifier, item: TransferType, onClick: () -> Unit) { + Button( + contentPadding = PaddingValues(0.dp), + modifier = modifier.fillMaxSize(), + colors = ButtonDefaults.buttonColors(containerColor = item.background(), contentColor = item.foreground()), + shape = ShapeDefaults.Medium, + onClick = onClick, + ) { + Box(modifier = Modifier.fillMaxSize()) { + Text( + modifier = Modifier + .fillMaxHeight(0.80f) + .align(Alignment.BottomCenter), + text = stringResource(id = item.titleRes), + textAlign = TextAlign.Center, + style = SwissTransferTheme.typography.bodyMedium, + ) + + Icon( + modifier = Modifier + .fillMaxWidth(0.75f) + .align(Alignment.BottomCenter), + imageVector = item.icon, + contentDescription = null, + ) + } + } +} + +@Preview(name = "Light") +@Preview(name = "Dark", uiMode = Configuration.UI_MODE_NIGHT_YES or Configuration.UI_MODE_TYPE_NORMAL) +@Composable +private fun TransferTypeButtonPreview() { + SwissTransferTheme { + Surface { + Column { + TransferType.entries.forEach { entry -> + TransferTypeButton( + modifier = Modifier + .size(160.dp, 200.dp) + .padding(20.dp), + item = entry, + ) {} + } + } + } + } +} + + +@Preview(name = "Light") +@Preview(name = "Dark", uiMode = Configuration.UI_MODE_NIGHT_YES or Configuration.UI_MODE_TYPE_NORMAL) +@Composable +private fun TransferTypeButtonsPreview() { + SwissTransferTheme { + Surface { + TransferTypeButtons(TransferType.entries) {} + } + } +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/ColorDark.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/ColorDark.kt index 342a7c3e4..64e72d278 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/ColorDark.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/ColorDark.kt @@ -36,6 +36,7 @@ private const val specific1 = 0xFF124426 private const val specific2 = 0xFF334117 private const val specific3 = 0xFF503E0F private const val specific4 = 0xFFEAC35D +private const val specific5 = 0xFF49DEFD // Extra palette private const val error = 0xFFFC8878 @@ -70,4 +71,12 @@ val CustomDarkColorScheme = CustomColorScheme( navigationItemBackground = Color(dark2), tertiaryButtonBackground = Color(dark2), selectedSettingItem = Color(dark2), + transferTypeLinkContainer = Color(specific1), + transferTypeLinkOnContainer = Color(green_main), + transferTypeEmailContainer = Color(green_dark), + transferTypeEmailOnContainer = Color(specific5), + transferTypeQrContainer = Color(specific2), + transferTypeQrOnContainer = Color(green_main), + transferTypeProximityContainer = Color(specific3), + transferTypeProximityOnContainer = Color(specific4), ) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/ColorLight.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/ColorLight.kt index 80c2bef8c..3e14028dc 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/ColorLight.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/ColorLight.kt @@ -74,4 +74,12 @@ val CustomLightColorScheme = CustomColorScheme( navigationItemBackground = LightColorScheme.background, tertiaryButtonBackground = Color(rabbit), selectedSettingItem = Color(rabbit), + transferTypeLinkContainer = Color(specific1), + transferTypeLinkOnContainer = Color(green_main), + transferTypeEmailContainer = Color(specific2), + transferTypeEmailOnContainer = Color(green_dark), + transferTypeQrContainer = Color(green_secondary), + transferTypeQrOnContainer = Color(green_main), + transferTypeProximityContainer = Color(specific3), + transferTypeProximityOnContainer = Color(specific4), ) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt index def44f51c..dd5d9350e 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt @@ -68,4 +68,12 @@ data class CustomColorScheme( val navigationItemBackground: Color = Color.Unspecified, val tertiaryButtonBackground: Color = Color.Unspecified, val selectedSettingItem: Color = Color.Unspecified, + val transferTypeLinkContainer: Color = Color.Unspecified, + val transferTypeLinkOnContainer: Color = Color.Unspecified, + val transferTypeEmailContainer: Color = Color.Unspecified, + val transferTypeEmailOnContainer: Color = Color.Unspecified, + val transferTypeQrContainer: Color = Color.Unspecified, + val transferTypeQrOnContainer: Color = Color.Unspecified, + val transferTypeProximityContainer: Color = Color.Unspecified, + val transferTypeProximityOnContainer: Color = Color.Unspecified, ) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index aa5b42743..da0b9f8ac 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -35,6 +35,11 @@ Thema Dauer der Gültigkeit Einstellungen + E-Mail + Link + In der Nähe + QR-Code + Schicke deine Dateien per Kamera Dateien durchsuchen Foto- und Videogalerie diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 7882db19e..35daa1d37 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -35,6 +35,11 @@ Tema Periodo de validez Parámetros + Correo electrónico + Enlace + Proximidad + Código QR + Envía tus archivos por Cámara Examinar archivos Galería de fotos y vídeos diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index ac5185aee..1e149e3ea 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -35,6 +35,11 @@ Thème Durée de validité Paramètres + E-mail + Lien + A proximité + QR Code + Envoie tes fichiers par Appareil photo Parcourir les fichiers Galerie photos et vidéos diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 6b540844d..6ea448e15 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -35,6 +35,11 @@ Tema Periodo di validità Parametri + Email + Link + Vicino + Codice QR + Inviate i vostri file tramite Macchina fotografica Sfogliare i file Galleria di foto e video diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 11fd8a015..51f388933 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -38,6 +38,11 @@ Theme Validity period Settings + Email + Link + Proximity + QR Code + Send your files by Camera Browse files Photo and video gallery