aboutsummaryrefslogtreecommitdiff
path: root/src/app/js/toast.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/js/toast.js')
-rw-r--r--src/app/js/toast.js12
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(() => {