From 070ee39db3c7a480c5a184ff204794f720149248 Mon Sep 17 00:00:00 2001 From: KrugarValdes Date: Mon, 4 Aug 2025 13:44:00 +0600 Subject: [PATCH 1/2] fix: Adjust room info UI layout and spacing --- .../uiComponent/CommonRoomInfoComponent.kt | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/clients/tablet/feature/main/src/commonMain/kotlin/band/effective/office/tablet/feature/main/components/uiComponent/CommonRoomInfoComponent.kt b/clients/tablet/feature/main/src/commonMain/kotlin/band/effective/office/tablet/feature/main/components/uiComponent/CommonRoomInfoComponent.kt index 9f1554bd..77e1ed98 100644 --- a/clients/tablet/feature/main/src/commonMain/kotlin/band/effective/office/tablet/feature/main/components/uiComponent/CommonRoomInfoComponent.kt +++ b/clients/tablet/feature/main/src/commonMain/kotlin/band/effective/office/tablet/feature/main/components/uiComponent/CommonRoomInfoComponent.kt @@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width +import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text @@ -85,19 +86,20 @@ fun RoomProperty( electricSocketCount: Int ) { Row { - RoomPropertyComponent( - image = Res.drawable.quantity, - text = "$capacity", - color = roomInfoColor - ) if (isHaveTv) { - Spacer(modifier = Modifier.width(spaceBetweenProperty)) RoomPropertyComponent( image = Res.drawable.tv, - text = stringResource(band.effective.office.tablet.feature.main.Res.string.tv_property), + text = "", color = roomInfoColor ) + Spacer(modifier = Modifier.width(spaceBetweenProperty)) } + RoomPropertyComponent( + image = Res.drawable.quantity, + text = "$capacity", + color = roomInfoColor, + textModifier = Modifier.widthIn(min = 20.dp) + ) if (electricSocketCount > 0) { Spacer(modifier = Modifier.width(spaceBetweenProperty)) RoomPropertyComponent( @@ -110,7 +112,12 @@ fun RoomProperty( } @Composable -fun RoomPropertyComponent(image: DrawableResource, text: String, color: Color) { +fun RoomPropertyComponent( + image: DrawableResource, + text: String, + color: Color, + textModifier: Modifier = Modifier +) { Row( horizontalArrangement = Arrangement.Center, verticalAlignment = Alignment.CenterVertically @@ -121,7 +128,9 @@ fun RoomPropertyComponent(image: DrawableResource, text: String, color: Color) { contentDescription = null, colorFilter = ColorFilter.tint(color) ) - Spacer(modifier = Modifier.width(8.dp)) - Text(text = text, style = MaterialTheme.typography.h8) + if (text.isNotEmpty()) { + Spacer(modifier = Modifier.width(8.dp)) + Text(text = text, style = MaterialTheme.typography.h8, modifier = textModifier) + } } } \ No newline at end of file -- GitLab From e3fd5e94d040e667cd7760aaf66ed4dda1224aa2 Mon Sep 17 00:00:00 2001 From: KrugarValdes Date: Mon, 4 Aug 2025 14:17:29 +0600 Subject: [PATCH 2/2] chore: update version to 1.0.0 in build files --- clients/tablet/composeApp/build.gradle.kts | 4 ++-- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clients/tablet/composeApp/build.gradle.kts b/clients/tablet/composeApp/build.gradle.kts index 25a3b5a3..b439ce2e 100644 --- a/clients/tablet/composeApp/build.gradle.kts +++ b/clients/tablet/composeApp/build.gradle.kts @@ -84,8 +84,8 @@ android { targetSdk = libs.versions.android.targetSdk.get().toInt() applicationId = "band.effective.office.tablet" - versionCode = 1 - versionName = "0.0.2" + versionCode = 2 + versionName = "1.0.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" diff --git a/gradle.properties b/gradle.properties index 7ec2d05f..7f2c12bb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,6 @@ kotlin.incremental=true # Project properties group=band.effective.office -version=0.0.3 +version=1.0.0 android.useAndroidX=true -- GitLab