diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index c4b9957..31562b3 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -65,7 +65,7 @@ kotlin { implementation(compose.components.resources) implementation(compose.components.uiToolingPreview) implementation(projects.shared) - implementation(libs.composeIcons.feather) + // todo implementation(libs.composeIcons.feather) implementation(libs.lifecycle.viewmodel.compose) implementation(libs.ktor.client.core) implementation(libs.ktor.client.json) diff --git a/composeApp/src/commonMain/kotlin/ComposeApp.kt b/composeApp/src/commonMain/kotlin/ComposeApp.kt index 2d8bd56..fd66f74 100644 --- a/composeApp/src/commonMain/kotlin/ComposeApp.kt +++ b/composeApp/src/commonMain/kotlin/ComposeApp.kt @@ -25,10 +25,6 @@ import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.lifecycle.ViewModel -import compose.icons.FeatherIcons -import compose.icons.feathericons.Clipboard -import compose.icons.feathericons.Delete -import compose.icons.feathericons.UserMinus import kotlinx.coroutines.* import kotlinx.datetime.Instant import kotlinx.datetime.TimeZone @@ -280,7 +276,7 @@ private fun ColumnScope.ResultNewUrlCard( private fun ButtonDelete(onClick: () -> Unit) { IconButton(onClick = onClick) { Icon( - FeatherIcons.Delete, + Theme.Icons.Delete, contentDescription = "Delete", modifier = Modifier.size(16.dp), ) @@ -293,7 +289,7 @@ private fun ButtonCopyToClipboard(textToCopy: String) { IconButton(onClick = { clipboardManager.setText(buildAnnotatedString { append(textToCopy) }) }) { - Icon(FeatherIcons.Clipboard, contentDescription = "Copy") + Icon(Theme.Icons.Clipboard, contentDescription = "Copy") } } @@ -326,7 +322,7 @@ private fun ButtonLogout( } }, modifier = modifier) { Icon( - FeatherIcons.UserMinus, + Theme.Icons.UserMinus, contentDescription = "Logout", modifier = Modifier.graphicsLayer { diff --git a/composeApp/src/commonMain/kotlin/Theme.kt b/composeApp/src/commonMain/kotlin/Theme.kt new file mode 100644 index 0000000..69c9356 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/Theme.kt @@ -0,0 +1,204 @@ +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.Round +import androidx.compose.ui.graphics.StrokeJoin +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.unit.dp + +object Theme { + object Icons { + public val Clipboard: ImageVector + get() { + if (clipboard != null) { + return clipboard!! + } + clipboard = + Builder( + name = "Clipboard", + defaultWidth = 24.0.dp, + defaultHeight = 24.0.dp, + viewportWidth = 24.0f, + viewportHeight = 24.0f, + ).apply { + path( + fill = SolidColor(Color(0x00000000)), + stroke = SolidColor(Color(0xFF000000)), + strokeLineWidth = 2.0f, + strokeLineCap = Round, + strokeLineJoin = + StrokeJoin.Companion.Round, + strokeLineMiter = 4.0f, + pathFillType = NonZero, + ) { + moveTo(16.0f, 4.0f) + horizontalLineToRelative(2.0f) + arcToRelative(2.0f, 2.0f, 0.0f, false, true, 2.0f, 2.0f) + verticalLineToRelative(14.0f) + arcToRelative(2.0f, 2.0f, 0.0f, false, true, -2.0f, 2.0f) + horizontalLineTo(6.0f) + arcToRelative(2.0f, 2.0f, 0.0f, false, true, -2.0f, -2.0f) + verticalLineTo(6.0f) + arcToRelative(2.0f, 2.0f, 0.0f, false, true, 2.0f, -2.0f) + horizontalLineToRelative(2.0f) + } + path( + fill = SolidColor(Color(0x00000000)), + stroke = SolidColor(Color(0xFF000000)), + strokeLineWidth = 2.0f, + strokeLineCap = Round, + strokeLineJoin = + StrokeJoin.Companion.Round, + strokeLineMiter = 4.0f, + pathFillType = NonZero, + ) { + moveTo(9.0f, 2.0f) + lineTo(15.0f, 2.0f) + arcTo(1.0f, 1.0f, 0.0f, false, true, 16.0f, 3.0f) + lineTo(16.0f, 5.0f) + arcTo(1.0f, 1.0f, 0.0f, false, true, 15.0f, 6.0f) + lineTo(9.0f, 6.0f) + arcTo(1.0f, 1.0f, 0.0f, false, true, 8.0f, 5.0f) + lineTo(8.0f, 3.0f) + arcTo(1.0f, 1.0f, 0.0f, false, true, 9.0f, 2.0f) + close() + } + } + .build() + return clipboard!! + } + + private var clipboard: ImageVector? = null + public val UserMinus: ImageVector + get() { + if (userMinus != null) { + return userMinus!! + } + userMinus = + Builder( + name = "UserMinus", + defaultWidth = 24.0.dp, + defaultHeight = 24.0.dp, + viewportWidth = 24.0f, + viewportHeight = 24.0f, + ).apply { + path( + fill = SolidColor(Color(0x00000000)), + stroke = SolidColor(Color(0xFF000000)), + strokeLineWidth = 2.0f, + strokeLineCap = Round, + strokeLineJoin = + StrokeJoin.Companion.Round, + strokeLineMiter = 4.0f, + pathFillType = NonZero, + ) { + moveTo(16.0f, 21.0f) + verticalLineToRelative(-2.0f) + arcToRelative(4.0f, 4.0f, 0.0f, false, false, -4.0f, -4.0f) + horizontalLineTo(5.0f) + arcToRelative(4.0f, 4.0f, 0.0f, false, false, -4.0f, 4.0f) + verticalLineToRelative(2.0f) + } + path( + fill = SolidColor(Color(0x00000000)), + stroke = SolidColor(Color(0xFF000000)), + strokeLineWidth = 2.0f, + strokeLineCap = Round, + strokeLineJoin = + StrokeJoin.Companion.Round, + strokeLineMiter = 4.0f, + pathFillType = NonZero, + ) { + moveTo(8.5f, 7.0f) + moveToRelative(-4.0f, 0.0f) + arcToRelative(4.0f, 4.0f, 0.0f, true, true, 8.0f, 0.0f) + arcToRelative(4.0f, 4.0f, 0.0f, true, true, -8.0f, 0.0f) + } + path( + fill = SolidColor(Color(0x00000000)), + stroke = SolidColor(Color(0xFF000000)), + strokeLineWidth = 2.0f, + strokeLineCap = Round, + strokeLineJoin = + StrokeJoin.Companion.Round, + strokeLineMiter = 4.0f, + pathFillType = NonZero, + ) { + moveTo(23.0f, 11.0f) + lineTo(17.0f, 11.0f) + } + } + .build() + return userMinus!! + } + + private var userMinus: ImageVector? = null + public val Delete: ImageVector + get() { + if (delete != null) { + return delete!! + } + delete = + Builder( + name = "Delete", + defaultWidth = 24.0.dp, + defaultHeight = 24.0.dp, + viewportWidth = 24.0f, + viewportHeight = 24.0f, + ).apply { + path( + fill = SolidColor(Color(0x00000000)), + stroke = SolidColor(Color(0xFF000000)), + strokeLineWidth = 2.0f, + strokeLineCap = Round, + strokeLineJoin = + StrokeJoin.Companion.Round, + strokeLineMiter = 4.0f, + pathFillType = NonZero, + ) { + moveTo(21.0f, 4.0f) + horizontalLineTo(8.0f) + lineToRelative(-7.0f, 8.0f) + lineToRelative(7.0f, 8.0f) + horizontalLineToRelative(13.0f) + arcToRelative(2.0f, 2.0f, 0.0f, false, false, 2.0f, -2.0f) + verticalLineTo(6.0f) + arcToRelative(2.0f, 2.0f, 0.0f, false, false, -2.0f, -2.0f) + close() + } + path( + fill = SolidColor(Color(0x00000000)), + stroke = SolidColor(Color(0xFF000000)), + strokeLineWidth = 2.0f, + strokeLineCap = Round, + strokeLineJoin = + StrokeJoin.Companion.Round, + strokeLineMiter = 4.0f, + pathFillType = NonZero, + ) { + moveTo(18.0f, 9.0f) + lineTo(12.0f, 15.0f) + } + path( + fill = SolidColor(Color(0x00000000)), + stroke = SolidColor(Color(0xFF000000)), + strokeLineWidth = 2.0f, + strokeLineCap = Round, + strokeLineJoin = + StrokeJoin.Companion.Round, + strokeLineMiter = 4.0f, + pathFillType = NonZero, + ) { + moveTo(12.0f, 9.0f) + lineTo(18.0f, 15.0f) + } + } + .build() + return delete!! + } + + private var delete: ImageVector? = null + } +} diff --git a/deploy.sh b/deploy.sh index d9954ec..3d303e8 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,6 +1,6 @@ #!/bin/bash # --- Configuration --- -RELEASE_TAG="v_0.0.1.00" # Update with desired release tag +RELEASE_TAG="v_0.0.1.01" # Update with desired release tag # (https://github.com/samoylenkodmitry/shrtlin/releases) FRONTEND_ARTIFACT_NAME="frontend-web.zip" BACKEND_ARTIFACT_NAME="server-1.0.0.jar" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6a141a2..ec41fe1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -27,10 +27,10 @@ slf4j = "1.7.32" kotlinx-date-time = "0.5.0" okio = "3.9.0" # for sha256, todo consider lighter options multiplatform-settings = "1.1.1" # APACHE-2.0 https://github.com/russhwolf/multiplatform-settings -composeIcons = "1.1.0" # MIT https://github.com/DevSrSouza/compose-icons +# todo support wasm composeIcons = "1.1.0" # MIT https://github.com/DevSrSouza/compose-icons [libraries] -composeIcons-feather = { module = "br.com.devsrsouza.compose.icons:feather", version.ref = "composeIcons" } +# composeIcons-feather = { module = "br.com.devsrsouza.compose.icons:feather", version.ref = "composeIcons" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" } multiplatform-settings = { module = "com.russhwolf:multiplatform-settings", version.ref = "multiplatform-settings" } multiplatform-settings-no-arg = { module = "com.russhwolf:multiplatform-settings-no-arg", version.ref = "multiplatform-settings" }