This commit is contained in:
2023-08-29 21:33:59 +02:00
parent e0c9bc542a
commit 201fb88aef
6 changed files with 107 additions and 6 deletions

View File

@@ -323,9 +323,11 @@ impl InventoryNewItemFormName {
."justify-items-center"
."items-center"
hx-post="/inventory/item/name/validate"
hx-trigger="input delay:1s, every 5s"
hx-trigger="input delay:1s, loaded from:document"
hx-params="new-item-name"
hx-swap="outerHTML"
#abc
{
label for="name" .font-bold { "Name" }
input

View File

@@ -1,4 +1,4 @@
use maud::{html, Markup, DOCTYPE};
use maud::{html, Markup, PreEscaped, DOCTYPE};
pub mod home;
pub mod inventory;
@@ -29,7 +29,7 @@ impl Root {
script src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.js" defer {}
link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css";
link rel="shortcut icon" type="image/svg+xml" href="/favicon.svg";
script { (include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/js/app.js"))) }
script { (PreEscaped(include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/js/app.js")))) }
}
body
hx-boost="true"