feat: Some style updates, form improvements on project-room view.

This commit is contained in:
2026-01-06 16:58:42 -05:00
parent 8fb313fddc
commit dbf7e3b1b4
10 changed files with 103 additions and 57 deletions

View File

@@ -10,14 +10,26 @@ struct RoomForm: HTML, Sendable {
static let id = "roomForm"
let id: String
let dismiss: Bool
let projectID: Project.ID
let room: Room?
init(
id: String = Self.id,
dismiss: Bool,
projectID: Project.ID,
room: Room? = nil
) {
self.id = id
self.dismiss = dismiss
self.projectID = projectID
self.room = room
}
var body: some HTML {
ModalForm(id: Self.id, dismiss: dismiss) {
ModalForm(id: id, dismiss: dismiss) {
h1(.class("text-3xl font-bold pb-6")) { "Room" }
// TODO: Use htmx here.
form(
.class("modal-backdrop"),
.init(name: "method", value: "dialog"),
@@ -62,9 +74,8 @@ struct RoomForm: HTML, Sendable {
.value("\(room != nil ? room!.registerCount : 1)"),
)
}
div(.class("flex justify-end space-x-4")) {
SubmitButton()
}
SubmitButton()
.attributes(.class("btn-block"))
}
}
}