Middleware+View+UserState: Add toast messages

This commit is contained in:
Riyyi
2024-11-21 22:48:01 +01:00
parent 6b93045514
commit 7f1e78fa08
10 changed files with 225 additions and 10 deletions
@@ -17,7 +17,10 @@ struct TodosTableComponent: HTML {
tr {
th { "#" }
th { "ID" }
th { "Title" }
th {
"Title "
i(.class("bi bi-arrow-down-circle")) {}
}
th { "Modifier" }
}
}
@@ -32,10 +35,12 @@ struct TodosTableComponent: HTML {
td { todo.title ?? "" }
td {
if let id = todo.id {
button(
.class("btn btn-danger"),
i(
.class("bi bi-trash3 text-danger"),
.data("bs-toggle", value: "tooltip"),
.data("bs-title", value: "Delete"),
.hx.delete("/\(name)/\(id.uuidString)")
) { "Delete" }
) {}
}
}
}