Skip to content

Commit

Permalink
Merge branch 'release/0.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
DonRobo committed Jul 21, 2024
2 parents 4cb65c5 + 4149d4c commit f0328a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

allprojects {
version = "0.3.0"
version = "0.3.1"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion home-assistant-addon/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Home Former"
version: "0.3.0"
version: "0.3.1"
slug: "homeformer"
description: >-
Former of homes
Expand Down
4 changes: 2 additions & 2 deletions web/src/main/kotlin/at/robert/hf/htmx/util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import kotlinx.html.*

val hxObjectMapper = jacksonObjectMapper()
fun Tag.hxPost(hxCtx: HtmxContext, vararg params: Pair<String, Any>) {
attributes["hx-post"] = hxCtx.route
attributes["hx-post"] = hxCtx.route.removePrefix("/")
attributes["hx-target"] = "#${hxCtx.component}"
attributes["hx-swap"] = "innerHTML"
attributes["hx-vals"] = params.toMap().let { hxObjectMapper.writeValueAsString(it) }
Expand All @@ -17,7 +17,7 @@ fun FlowContent.hxActionForm(
block: FORM.() -> Unit
) {
form {
attributes["hx-post"] = hxCtx.route
attributes["hx-post"] = hxCtx.route.removePrefix("/")
attributes["hx-target"] = "#${hxCtx.component}"
attributes["hx-swap"] = "innerHTML"

Expand Down

0 comments on commit f0328a6

Please sign in to comment.