WIP: Updates rooms view.

This commit is contained in:
2026-01-02 10:04:28 -05:00
parent 54847d0b34
commit 89fdf0930b
10 changed files with 127 additions and 59 deletions

View File

@@ -7,16 +7,6 @@ struct EffectiveLengthForm: HTML, Sendable {
let dismiss: Bool
var body: some HTML {
// div(
// .id("effectiveLengthForm"),
// .class(
// """
// fixed top-40 left-[25vw] w-1/2 z-50 text-gray-800
// bg-gray-200 border border-gray-400
// rounded-lg shadow-lg mx-10
// """
// )
// ) {
ModalForm(id: "effectiveLengthForm", dismiss: dismiss) {
h1(.class("text-2xl font-bold")) { "Effective Length" }
form(.class("space-y-4 p-4")) {

View File

@@ -13,13 +13,19 @@ struct EffectiveLengthsView: HTML, Sendable {
) {
Row {
h1(.class("text-2xl font-bold")) { "Effective Lengths" }
button(
.hx.get(route: .effectiveLength(.form(dismiss: false))),
.hx.target("#effectiveLengthForm"),
.hx.swap(.outerHTML)
) {
Icon(.circlePlus)
}
PlusButton()
.attributes(
.hx.get(route: .effectiveLength(.form(dismiss: false))),
.hx.target("#effectiveLengthForm"),
.hx.swap(.outerHTML)
)
// button(
// .hx.get(route: .effectiveLength(.form(dismiss: false))),
// .hx.target("#effectiveLengthForm"),
// .hx.swap(.outerHTML)
// ) {
// Icon(.circlePlus)
// }
}
.attributes(.class("pb-6"))
@@ -32,7 +38,7 @@ struct EffectiveLengthsView: HTML, Sendable {
}
}
div(.id("effectiveLengthForm")) {}
EffectiveLengthForm(dismiss: true)
}
}