diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/BottomSheetItem.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/BottomSheetItem.kt new file mode 100644 index 000000000..6dd39f4fd --- /dev/null +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/BottomSheetItem.kt @@ -0,0 +1,80 @@ +/* + * 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.components + +import android.content.res.Configuration +import androidx.annotation.StringRes +import androidx.compose.foundation.layout.* +import androidx.compose.material3.* +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.infomaniak.swisstransfer.R +import com.infomaniak.swisstransfer.ui.icons.AppIcons +import com.infomaniak.swisstransfer.ui.icons.app.Camera +import com.infomaniak.swisstransfer.ui.theme.CustomShapes +import com.infomaniak.swisstransfer.ui.theme.Margin +import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme + +private val BOTTOM_SHEET_ITEM_HEIGHT = 56.dp + +@Composable +fun BottomSheetItem(imageVector: ImageVector, @StringRes titleRes: Int, onClick: () -> Unit) { + Button( + colors = ButtonDefaults.textButtonColors(contentColor = SwissTransferTheme.colors.primaryTextColor), + modifier = Modifier + .height(BOTTOM_SHEET_ITEM_HEIGHT) + .fillMaxWidth(), + shape = CustomShapes.None, + onClick = onClick, + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.Start, + verticalAlignment = Alignment.CenterVertically, + ) { + Icon( + modifier = Modifier.size(Margin.Large), + imageVector = imageVector, + contentDescription = null, + tint = SwissTransferTheme.materialColors.primary + ) + Spacer(modifier = Modifier.width(Margin.Large)) + Text( + text = stringResource(id = titleRes), + style = SwissTransferTheme.typography.bodyRegular, + ) + } + } +} + +@Preview(name = "Light") +@Preview(name = "Dark", uiMode = Configuration.UI_MODE_NIGHT_YES or Configuration.UI_MODE_TYPE_NORMAL) +@Composable +private fun ChoiceItemPreview() { + SwissTransferTheme { + Surface { + BottomSheetItem(AppIcons.Camera, R.string.transferUploadSourceChoiceCamera) {} + } + } +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/LargeButton.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/LargeButton.kt index 962c61a59..1dc0c555b 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/LargeButton.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/LargeButton.kt @@ -37,6 +37,8 @@ import com.infomaniak.swisstransfer.ui.theme.Margin import com.infomaniak.swisstransfer.ui.theme.Shapes import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme +private val LARGE_BUTTON_HEIGHT = 56.dp + @Composable fun LargeButton( modifier: Modifier = Modifier, @@ -47,7 +49,7 @@ fun LargeButton( imageVector: ImageVector? = null, ) { Button( - modifier = modifier.height(56.dp), + modifier = modifier.height(LARGE_BUTTON_HEIGHT), colors = style.buttonColors(), shape = Shapes.medium, enabled = enabled, diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferBottomSheet.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferBottomSheet.kt index aee96ec75..6765a6378 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferBottomSheet.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferBottomSheet.kt @@ -131,7 +131,7 @@ private fun BottomSheetDefaultsPreview() { modifier = it, titleRes = R.string.appName, style = ButtonType.ERROR, - onClick = { /*TODO*/ }, + onClick = {}, ) }, bottomButton = { @@ -139,7 +139,7 @@ private fun BottomSheetDefaultsPreview() { modifier = it, titleRes = R.string.appName, style = ButtonType.TERTIARY, - onClick = { /*TODO*/ }, + onClick = {}, ) }, ) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Camera.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Camera.kt new file mode 100644 index 000000000..1a29e02aa --- /dev/null +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Camera.kt @@ -0,0 +1,122 @@ +package com.infomaniak.swisstransfer.ui.icons.app + +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.StrokeCap.Companion.Butt +import androidx.compose.ui.graphics.StrokeJoin.Companion.Miter +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 + +val AppIcons.Camera: ImageVector + get() { + if (_camera != null) { + return _camera!! + } + _camera = Builder( + name = "Camera", + defaultWidth = 24.0.dp, + defaultHeight = 24.0.dp, + viewportWidth = 24.0f, + viewportHeight = 24.0f + ).apply { + path( + fill = null, + stroke = SolidColor(Color(0xFF9f9f9f)), + strokeLineWidth = 1.469f, + strokeLineCap = Butt, + strokeLineJoin = Miter, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(2.698f, 7.115f) + lineToRelative(0.027f, -0.98f) + arcToRelative(0.995f, 0.995f, 0.0f, false, true, 0.952f, -0.979f) + horizontalLineTo(4.6f) + arcToRelative(1.046f, 1.046f, 0.0f, false, true, 1.034f, 0.98f) + verticalLineToRelative(0.978f) + } + path( + fill = null, + stroke = SolidColor(Color(0xFF9f9f9f)), + strokeLineWidth = 1.469f, + strokeLineCap = Butt, + strokeLineJoin = Miter, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(19.96f, 7.115f) + arcToRelative(0.98f, 0.98f, 0.0f, false, true, -0.886f, -0.565f) + curveToRelative(-0.531f, -1.137f, -1.101f, -2.373f, -2.178f, -2.373f) + horizontalLineTo(12.0f) + curveToRelative(-0.912f, 0.0f, -1.37f, 0.817f, -2.644f, 2.538f) + arcToRelative(0.98f, 0.98f, 0.0f, false, true, -0.783f, 0.4f) + horizontalLineTo(2.698f) + curveToRelative(-1.469f, 0.0f, -1.959f, 0.664f, -1.959f, 1.687f) + verticalLineToRelative(10.171f) + curveToRelative(0.0f, 1.022f, 0.49f, 1.85f, 2.014f, 1.85f) + horizontalLineToRelative(18.494f) + curveToRelative(1.524f, 0.0f, 2.014f, -0.828f, 2.014f, -1.85f) + verticalLineTo(8.802f) + curveToRelative(0.0f, -1.023f, -0.49f, -1.687f, -2.014f, -1.687f) + close() + } + path( + fill = null, + stroke = SolidColor(Color(0xFF9f9f9f)), + strokeLineWidth = 1.469f, + strokeLineCap = Butt, + strokeLineJoin = Miter, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(14.448f, 18.865f) + arcToRelative(5.386f, 5.386f, 0.0f, true, false, 0.0f, -10.771f) + arcToRelative(5.386f, 5.386f, 0.0f, false, false, 0.0f, 10.77f) + close() + } + path( + fill = null, + stroke = SolidColor(Color(0xFF9f9f9f)), + strokeLineWidth = 1.469f, + strokeLineCap = Butt, + strokeLineJoin = Miter, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(14.448f, 16.417f) + arcToRelative(2.937f, 2.937f, 0.0f, true, false, 0.0f, -5.875f) + arcToRelative(2.937f, 2.937f, 0.0f, false, false, 0.0f, 5.875f) + close() + moveTo(4.167f, 12.01f) + arcToRelative(1.469f, 1.469f, 0.0f, true, false, 0.0f, -2.937f) + arcToRelative(1.469f, 1.469f, 0.0f, false, false, 0.0f, 2.937f) + close() + } + }.build() + return _camera!! + } + +private var _camera: ImageVector? = null + +@Preview +@Composable +private fun Preview() { + Box { + Image( + imageVector = AppIcons.Camera, + contentDescription = null, + modifier = Modifier.size(AppIcons.previewSize) + ) + } +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Folder.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Folder.kt new file mode 100644 index 000000000..9c761b8d0 --- /dev/null +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Folder.kt @@ -0,0 +1,70 @@ +package com.infomaniak.swisstransfer.ui.icons.app + +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.StrokeCap.Companion.Butt +import androidx.compose.ui.graphics.StrokeJoin.Companion.Miter +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 + +val AppIcons.Folder: ImageVector + get() { + if (_folder != null) { + return _folder!! + } + _folder = Builder( + name = "Folder", + defaultWidth = 24.0.dp, + defaultHeight = 24.0.dp, + viewportWidth = 24.0f, + viewportHeight = 24.0f + ).apply { + path( + fill = null, + stroke = SolidColor(Color(0xFF9f9f9f)), + strokeLineWidth = 1.5f, + strokeLineCap = Butt, + strokeLineJoin = Miter, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(23.25f, 6.75f) + arcToRelative(1.5f, 1.5f, 0.0f, false, false, -1.5f, -1.5f) + horizontalLineTo(10.5f) + lineToRelative(-1.8f, -2.4f) + arcToRelative(1.5f, 1.5f, 0.0f, false, false, -1.2f, -0.6f) + horizontalLineTo(2.25f) + arcToRelative(1.5f, 1.5f, 0.0f, false, false, -1.5f, 1.5f) + verticalLineToRelative(16.5f) + arcToRelative(1.5f, 1.5f, 0.0f, false, false, 1.5f, 1.5f) + horizontalLineToRelative(19.5f) + arcToRelative(1.5f, 1.5f, 0.0f, false, false, 1.5f, -1.5f) + close() + } + }.build() + return _folder!! + } + +private var _folder: ImageVector? = null + +@Preview +@Composable +private fun Preview() { + Box { + Image( + imageVector = AppIcons.Folder, + contentDescription = null, + modifier = Modifier.size(AppIcons.previewSize) + ) + } +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/PolaroidLandscape.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/PolaroidLandscape.kt new file mode 100644 index 000000000..d64f1857c --- /dev/null +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/PolaroidLandscape.kt @@ -0,0 +1,95 @@ +package com.infomaniak.swisstransfer.ui.icons.app + +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.StrokeCap.Companion.Butt +import androidx.compose.ui.graphics.StrokeJoin.Companion.Miter +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.ImageVector.Builder +import androidx.compose.ui.graphics.vector.group +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 + +val AppIcons.PolaroidLandscape: ImageVector + get() { + if (_polaroidLandscape != null) { + return _polaroidLandscape!! + } + _polaroidLandscape = Builder( + name = "PolaroidLandscape", + defaultWidth = 24.0.dp, + defaultHeight = 24.0.dp, + viewportWidth = 24.0f, + viewportHeight = 24.0f + ).apply { + group { + path( + fill = null, + stroke = SolidColor(Color(0xFF9f9f9f)), + strokeLineWidth = 1.5f, + strokeLineCap = Butt, + strokeLineJoin = Miter, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(21.75f, 0.75f) + horizontalLineTo(2.25f) + arcToRelative(1.5f, 1.5f, 0.0f, false, false, -1.5f, 1.5f) + verticalLineToRelative(19.5f) + arcToRelative(1.5f, 1.5f, 0.0f, false, false, 1.5f, 1.5f) + horizontalLineToRelative(19.5f) + arcToRelative(1.5f, 1.5f, 0.0f, false, false, 1.5f, -1.5f) + verticalLineTo(2.25f) + arcToRelative(1.5f, 1.5f, 0.0f, false, false, -1.5f, -1.5f) + close() + } + path( + fill = null, + stroke = SolidColor(Color(0xFF9f9f9f)), + strokeLineWidth = 1.5f, + strokeLineCap = Butt, + strokeLineJoin = Miter, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(5.25f, 17.25f) + lineToRelative(3.462f, -4.616f) + arcToRelative(1.5f, 1.5f, 0.0f, false, true, 2.261f, -0.161f) + lineTo(12.0f, 13.5f) + lineToRelative(3.3f, -4.4f) + arcToRelative(1.5f, 1.5f, 0.0f, false, true, 2.4f, 0.0f) + lineToRelative(2.67f, 3.56f) + moveTo(6.375f, 8.25f) + arcToRelative(1.875f, 1.875f, 0.0f, true, false, 0.0f, -3.75f) + arcToRelative(1.875f, 1.875f, 0.0f, false, false, 0.0f, 3.75f) + close() + moveToRelative(-5.625f, 9.0f) + horizontalLineToRelative(22.5f) + } + } + }.build() + return _polaroidLandscape!! + } + +private var _polaroidLandscape: ImageVector? = null + +@Preview +@Composable +private fun Preview() { + Box { + Image( + imageVector = AppIcons.PolaroidLandscape, + contentDescription = null, + modifier = Modifier.size(AppIcons.previewSize) + ) + } +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/MainScaffold.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/MainScaffold.kt index fbaf6c487..4bd3fd1be 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/MainScaffold.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/MainScaffold.kt @@ -67,7 +67,7 @@ private fun MainScaffold( Box(modifier = Modifier.weight(1f)) { content() } - HorizontalDivider(color = SwissTransferTheme.colors.divider) + HorizontalDivider() } } } 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 91407ac79..edb6867ce 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 @@ -19,24 +19,30 @@ package com.infomaniak.swisstransfer.ui.screen.newtransfer.importfiles import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Surface -import androidx.compose.runtime.* +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.saveable.rememberSaveable +import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.dp import com.infomaniak.swisstransfer.R import com.infomaniak.swisstransfer.ui.components.* import com.infomaniak.swisstransfer.ui.icons.AppIcons import com.infomaniak.swisstransfer.ui.icons.app.Add -import com.infomaniak.swisstransfer.ui.icons.illu.ArrowCurvedDownright +import com.infomaniak.swisstransfer.ui.icons.app.Camera +import com.infomaniak.swisstransfer.ui.icons.app.Folder +import com.infomaniak.swisstransfer.ui.icons.app.PolaroidLandscape +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 ImportFilesScreen() { - var showImportChoiceBottomSheet by remember { mutableStateOf(false) } + var showUploadSourceChoiceBottomSheet by rememberSaveable { mutableStateOf(false) } BottomStickyButtonScaffold( topBar = { SwissTransferTobAppBar() }, @@ -46,7 +52,7 @@ fun ImportFilesScreen() { titleRes = R.string.buttonAddFiles, imageVector = AppIcons.Add, style = ButtonType.TERTIARY, - onClick = { showImportChoiceBottomSheet = true }, + onClick = { showUploadSourceChoiceBottomSheet = true }, ) }, bottomButton = { modifier -> @@ -58,46 +64,31 @@ fun ImportFilesScreen() { }, ) { Column { - ImportChoiceBottomSheet( - showImportChoiceBottomSheet = { showImportChoiceBottomSheet }, - onDismissRequest = { showImportChoiceBottomSheet = false }, + UploadSourceChoiceBottomSheet( + isBottomSheetVisible = { showUploadSourceChoiceBottomSheet }, + onDismissRequest = { showUploadSourceChoiceBottomSheet = false }, ) } } } @Composable -private fun ImportChoiceBottomSheet( - showImportChoiceBottomSheet: () -> Boolean, +private fun UploadSourceChoiceBottomSheet( + isBottomSheetVisible: () -> Boolean, onDismissRequest: () -> Unit, ) { - if (showImportChoiceBottomSheet()) { + if (isBottomSheetVisible()) { SwissTransferBottomSheet( onDismissRequest = onDismissRequest, - imageVector = AppIcons.Illu.ArrowCurvedDownright, - titleRes = R.string.appName, - descriptionRes = R.string.sentEmptyTitle, + titleRes = R.string.transferUploadSourceChoiceTitle, content = { - Surface( - modifier = Modifier.size(200.dp), - color = Color.Gray, - ) {} - }, - topButton = { - LargeButton( - modifier = it, - titleRes = R.string.appName, - style = ButtonType.ERROR, - onClick = { /*TODO*/ }, - ) - }, - bottomButton = { - LargeButton( - modifier = it, - titleRes = R.string.appName, - style = ButtonType.TERTIARY, - onClick = { /*TODO*/ }, - ) + Column { + BottomSheetItem(AppIcons.Camera, R.string.transferUploadSourceChoiceCamera) { /*TODO*/ } + HorizontalDivider(Modifier.padding(horizontal = Margin.Medium)) + BottomSheetItem(AppIcons.PolaroidLandscape, R.string.transferUploadSourceChoiceGallery) { /*TODO*/ } + HorizontalDivider(Modifier.padding(horizontal = Margin.Medium)) + BottomSheetItem(AppIcons.Folder, R.string.transferUploadSourceChoiceFiles) { /*TODO*/ } + } }, ) } @@ -118,7 +109,7 @@ private fun ImportFilesScreenPreview() { private fun ImportChoiceBottomSheetPreview() { SwissTransferTheme { Surface { - ImportChoiceBottomSheet({ true }, {}) + UploadSourceChoiceBottomSheet({ true }, {}) } } } 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 e80c7fe32..ea59bca29 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 @@ -55,6 +55,8 @@ val DarkColorScheme = darkColorScheme( surfaceContainerLow = Color(dark2), // Used for bottom sheet backgrounds surfaceContainerHighest = Color(dark2), + outlineVariant = Color(dark3), // Used for divider's color + error = Color(error), // onError: uses default values ) @@ -63,6 +65,5 @@ val CustomDarkColorScheme = CustomColorScheme( primaryTextColor = Color(rabbit), secondaryTextColor = Color(shark), navigationItemBackground = Color(dark2), - divider = Color(dark3), tertiaryButtonBackground = Color(dark2), ) 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 fcc0338ea..56e9c7dde 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 @@ -60,6 +60,8 @@ val LightColorScheme = lightColorScheme( surfaceContainerLow = Color(white), // Same value as background. Used for bottom sheet backgrounds surfaceContainerHighest = Color(polar_bear), + outlineVariant = Color(mouse), // Used for divider's color + error = Color(error), // onError: uses default values ) @@ -68,6 +70,5 @@ val CustomLightColorScheme = CustomColorScheme( primaryTextColor = Color(orca), secondaryTextColor = Color(elephant), navigationItemBackground = LightColorScheme.background, - divider = Color(mouse), tertiaryButtonBackground = Color(rabbit), ) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/CustomShapes.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/CustomShapes.kt new file mode 100644 index 000000000..705cdf7e3 --- /dev/null +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/CustomShapes.kt @@ -0,0 +1,26 @@ +/* + * 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.theme + +import androidx.compose.foundation.shape.RoundedCornerShape + +object CustomShapes { + val None = RoundedCornerShape(0) + val Rounded = RoundedCornerShape(50) +} diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Shapes.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Shapes.kt index 3968f132d..e546f4c54 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Shapes.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Shapes.kt @@ -27,4 +27,5 @@ val Shapes = Shapes( small = RoundedCornerShape(8.dp), medium = RoundedCornerShape(16.dp), large = RoundedCornerShape(24.dp), + // extraLarge: uses default values, for the bottom sheet corners ) 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 3fbcea8cd..102351aee 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 @@ -64,6 +64,5 @@ data class CustomColorScheme( val primaryTextColor: Color = Color.Unspecified, val secondaryTextColor: Color = Color.Unspecified, val navigationItemBackground: Color = Color.Unspecified, - val divider: Color = Color.Unspecified, val tertiaryButtonBackground: Color = Color.Unspecified, ) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 8eb23600e..cdd2b0acf 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -24,4 +24,8 @@ Our story begins here Sent Settings + Camera + Browse files + Photo and video gallery + Upload from diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 8eb23600e..cdd2b0acf 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -24,4 +24,8 @@ Our story begins here Sent Settings + Camera + Browse files + Photo and video gallery + Upload from diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 732cff0fd..059ad05e7 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -24,4 +24,8 @@ Notre histoire commence ici Envoyé Paramètres + Appareil photo + Parcourir les fichiers + Galerie photos et vidéos + Télécharger à partir de diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 8eb23600e..cdd2b0acf 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -24,4 +24,8 @@ Our story begins here Sent Settings + Camera + Browse files + Photo and video gallery + Upload from diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d5560f4c1..d87d627ac 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -27,4 +27,8 @@ Our story begins here Sent Settings + Camera + Browse files + Photo and video gallery + Upload from