From 9f674eb7fd1ec071f627d2f2db784e9ffe352719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxi=20Quo=C3=9F?= Date: Sat, 12 Mar 2022 11:33:33 +0100 Subject: [PATCH] hide modals on button click --- app/frontend/src/components/Navbar.svelte | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/frontend/src/components/Navbar.svelte b/app/frontend/src/components/Navbar.svelte index f0a2bb2b..d16cac40 100644 --- a/app/frontend/src/components/Navbar.svelte +++ b/app/frontend/src/components/Navbar.svelte @@ -31,6 +31,7 @@ type: "update_settings", data: settings }) + hideModal("settings"); } function scanNetwork() { @@ -70,6 +71,7 @@ } } } + hideModal("settings"); } function backupToFile() { @@ -78,6 +80,12 @@ }) } + function hideModal(id) { + const modalEl = document.querySelector(`#${id}`); + const modal = bootstrap.Modal.getInstance(modalEl); + modal.hide(); + } +