diff options
author | 0neGal <mail@0negal.com> | 2023-09-16 18:17:04 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2023-09-16 18:17:04 +0200 |
commit | f3e5e1596a22c3df38a8c00a5ceadf8a5dd2967a (patch) | |
tree | a5ae56bdc7baedc22930697de9cefc171705410d /src/app/js/toast.js | |
parent | 53c19052738a4a9cc43feca31e8231c844b4d2b5 (diff) | |
download | Viper-f3e5e1596a22c3df38a8c00a5ceadf8a5dd2967a.tar.gz Viper-f3e5e1596a22c3df38a8c00a5ceadf8a5dd2967a.zip |
added buttons for fixing some problems and alike
I will likely add more buttons in the future, but for now this is most
of the ones a user could need to repair problems.
Diffstat (limited to 'src/app/js/toast.js')
-rw-r--r-- | src/app/js/toast.js | 12 |
1 files changed, 10 insertions, 2 deletions
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(() => { |