wip: full editing support and login of user achieved, updated minijinja to v2, htmx, hyperscript

This commit is contained in:
2024-07-18 00:45:21 +02:00
parent 402585f968
commit a26e17a064
15 changed files with 94 additions and 25 deletions

View File

@@ -11,14 +11,14 @@ path = "src/lib.rs"
[dependencies]
anyhow = "1.0.75"
axum = "0.7"
minijinja = { version = "1.0.11", features = [
minijinja = { version = "2.0.3", features = [
"loader",
"builtins",
"urlencode",
"deserialization",
] }
minijinja-autoreload = "1.0.8"
pulldown-cmark = "0.10"
minijinja-autoreload = "2.0.3"
pulldown-cmark = "0.11"
serde = { version = "1.0.188", features = ["derive"] }
tokio = { version = "1.32.0", features = ["full"] }
log = "0.4.20"

View File

@@ -121,6 +121,10 @@ pub mod repository {
Self::widget("/admin/widgets/input_textarea.jinja")
}
pub fn checkbox() -> Self {
Self::widget("/admin/widgets/checkbox_toggle.jinja")
}
pub fn required(mut self) -> Self {
self.required = true;
self

View File

@@ -329,7 +329,8 @@ pub async fn update_item<S: AdminState + Clone + Send + Sync + 'static>(
..Default::default()
}
};
templates.render_html("admin/items/item_change.jinja", context)
let response = templates.render_html("admin/items/item_change.jinja", context);
response
}
// Item Action allows running an action on one single dataset.