From ae2cff0c3ae44d5e9c9a26f76ba1bc96b098cafc Mon Sep 17 00:00:00 2001 From: Max Hohlfeld Date: Fri, 30 Aug 2024 23:15:00 +0200 Subject: [PATCH] refactor: color of dialog and event listening --- build.rs | 4 ++++ src/endpoints/user/post_toggle.rs | 4 ++-- src/filters.rs | 2 -- static/package-lock.json | 8 -------- static/package.json | 1 - static/style.scss | 14 ++++---------- static/utils.js | 11 +++++++++++ templates/base.html | 3 ++- templates/user/overview.html | 11 +---------- 9 files changed, 24 insertions(+), 34 deletions(-) create mode 100644 static/utils.js diff --git a/build.rs b/build.rs index 5f458cf1..d9da102e 100644 --- a/build.rs +++ b/build.rs @@ -36,6 +36,10 @@ fn main() -> std::io::Result<()> { nm_path.join("sweetalert2/dist/sweetalert2.min.js"), dist_path.join("sweetalert2.min.js"), )?; + copy( + Path::new("./static/utils.js"), + dist_path.join("utils.js"), + )?; copy( Path::new("./static/brass.jpeg"), dist_path.join("brass.jpeg"), diff --git a/src/endpoints/user/post_toggle.rs b/src/endpoints/user/post_toggle.rs index 7a1ee840..df554f22 100644 --- a/src/endpoints/user/post_toggle.rs +++ b/src/endpoints/user/post_toggle.rs @@ -56,7 +56,7 @@ pub async fn post( Entsperren
ja
-