update added jwt tokens
This commit is contained in:
1 parent
a5e28c5533
commit
b0064a9b81
25 files changed
+2004
-31
No files matched your search
@@ -0,0 +1,34 @@
|
||||
const notificationsection = document.querySelector(".notificationsection");
|
||||
|
||||
const notification = (text, type) => {
|
||||
const notificationbox = document.createElement("div");
|
||||
const notificationtextbox = document.createElement("div");
|
||||
const notificationtext = document.createElement("h3");
|
||||
notificationtext.classList.add("notificationtext");
|
||||
notificationtextbox.append(notificationtext);
|
||||
notificationtextbox.classList.add("notificationtextbox");
|
||||
notificationtextbox.classList.add("card-header");
|
||||
notificationbox.append(notificationtextbox);
|
||||
notificationbox.classList.add("notification");
|
||||
notificationbox.addEventListener("click", () => {
|
||||
notificationbox.classList.remove("active");
|
||||
});
|
||||
notificationsection.append(notificationbox);
|
||||
if (type === "error") {
|
||||
notificationbox.classList.remove("success");
|
||||
notificationbox.classList.add("error");
|
||||
} else {
|
||||
notificationbox.classList.remove("error");
|
||||
notificationbox.classList.add("success");
|
||||
}
|
||||
notificationtext.innerHTML = text;
|
||||
setTimeout(() => {
|
||||
notificationbox.classList.add("active");
|
||||
}, 300);
|
||||
setTimeout(() => {
|
||||
notificationbox.classList.remove("active");
|
||||
setTimeout(() => {
|
||||
notificationsection.removeChild(notificationbox);
|
||||
}, 200);
|
||||
}, 3000);
|
||||
};
|
||||
Reference in new issue
Block a user