diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 74c605a..f6d931e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] -compose = "1.7.0" -kilua = "0.0.17" -kotlin = "2.0.21" +compose = "1.8.0-alpha01" +kilua = "0.0.18" +kotlin = "2.1.0" [libraries] kilua = { module = "dev.kilua:kilua", version.ref = "kilua" } diff --git a/src/commonMain/kotlin/Extensions.kt b/src/commonMain/kotlin/Extensions.kt index a609006..d75fef6 100644 --- a/src/commonMain/kotlin/Extensions.kt +++ b/src/commonMain/kotlin/Extensions.kt @@ -17,6 +17,7 @@ import dev.kilua.html.Display import dev.kilua.html.ITag import dev.kilua.html.helpers.TagEvents import dev.kilua.html.helpers.TagStyleFun +import dev.kilua.html.style.globalStyle import dev.kilua.utils.jsObjectOf import web.dom.HTMLElement import web.dom.events.Event @@ -33,7 +34,7 @@ fun TagStyleFun.scale(scale: Float = 1f) = style("scale", " @Composable fun TagStyleFun.hideScrollbar(className: String? = null) { if (className != null) { - dev.kilua.html.style.style(".$className::-webkit-scrollbar") { + globalStyle(".$className::-webkit-scrollbar") { display(Display.None) // For Firefox style("scrollbar-width", "none") diff --git a/src/commonMain/kotlin/components/FooterPlayer.kt b/src/commonMain/kotlin/components/FooterPlayer.kt index b616b22..75472b8 100644 --- a/src/commonMain/kotlin/components/FooterPlayer.kt +++ b/src/commonMain/kotlin/components/FooterPlayer.kt @@ -31,7 +31,7 @@ import dev.kilua.html.divt import dev.kilua.html.img import dev.kilua.html.perc import dev.kilua.html.px -import dev.kilua.html.style.style +import dev.kilua.html.style.globalStyle import dev.kilua.html.vw import dev.kilua.panel.hPanel import dev.kilua.panel.vPanel @@ -243,7 +243,7 @@ private fun IComponent.SpotifyRange( val progressColor by remember { derivedStateOf { if (isHovered) Color("#1ab853") else Color.White } } - val thumbClassName = style(selector = ".$className::-webkit-slider-thumb") { + val thumbClassName = globalStyle(selector = ".$className::-webkit-slider-thumb") { background(Background(color = if (isHovered) Colors.white else Colors.transparent)) borderRadius(5.px) height(10.px) @@ -252,7 +252,7 @@ private fun IComponent.SpotifyRange( style("transform", "translate(0px, -3px)") width(10.px) } - val runnableTrackClassName = style(selector = ".$className::-webkit-slider-runnable-track") { + val runnableTrackClassName = globalStyle(selector = ".$className::-webkit-slider-runnable-track") { borderRadius(2.px) height(4.px) style( diff --git a/src/commonMain/kotlin/components/MainBody.kt b/src/commonMain/kotlin/components/MainBody.kt index 103b91b..3855a51 100644 --- a/src/commonMain/kotlin/components/MainBody.kt +++ b/src/commonMain/kotlin/components/MainBody.kt @@ -153,7 +153,7 @@ fun IComponent.MainBody() { 8 -> "More of what you like" else -> "Today's biggest hits" }, - playlists = List(7) { index -> + playlists = List(15) { index -> val imageUrl = remember { "assets/playlist_images/img_${Random.nextInt(1, 40)}.png" } diff --git a/src/commonMain/resources/index.html b/src/commonMain/resources/index.html index 39e9696..9648d22 100644 --- a/src/commonMain/resources/index.html +++ b/src/commonMain/resources/index.html @@ -5,10 +5,14 @@ - + + + Spotify - Web Player: Music for everyone