diff options
Diffstat (limited to 'src/app/js')
-rw-r--r-- | src/app/js/settings.js | 1 | ||||
-rw-r--r-- | src/app/js/toast.js | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/app/js/settings.js b/src/app/js/settings.js index db29300..8aeb2ca 100644 --- a/src/app/js/settings.js +++ b/src/app/js/settings.js @@ -1,4 +1,3 @@ - var Settings = { toggle: (state) => { let settings_btn = document.getElementById("settings"); diff --git a/src/app/js/toast.js b/src/app/js/toast.js index 3bc1745..e0aba6b 100644 --- a/src/app/js/toast.js +++ b/src/app/js/toast.js @@ -1,8 +1,8 @@ function Toast(properties) { let toast = { - fg: "#000000", - bg: "#FFFFFF", timeout: 3000, + fg: "#FFFFFF", + bg: "var(--selbg)", callback: () => {}, title: "Untitled Toast", description: "No description provided for toast", @@ -45,6 +45,14 @@ function Toast(properties) { <div class="description">${toast.description}</div> ` + if (! toast.title) { + el.querySelector(".title").remove(); + } + + if (! toast.description) { + el.querySelector(".description").remove(); + } + toasts.appendChild(el); setTimeout(() => { |