This commit is contained in:
Flummi
2021-12-29 05:48:04 +01:00
parent 5fc0c1cf36
commit a87273cea0
12 changed files with 63 additions and 44 deletions

View File

@ -86,21 +86,11 @@ const flash = ({ type, msg }) => {
a.innerHTML = tag.tag;
const span = document.createElement("span");
span.classList.add("badge", "badge-light", "mr-2");
span.classList.add("badge", "mr-2");
span.setAttribute('tooltip', tag.user);
span.dataset.tagid = tag.id;
if(tag.tag == "sfw") {
span.classList.remove("badge-light");
span.classList.add("badge-success");
}
if(tag.tag == "nsfw") {
span.classList.remove("badge-light");
span.classList.add("badge-danger");
}
if(tag.tag.startsWith(">")) {
span.classList.add("badge-greentext");
}
tag.badge.split(" ").forEach(b => span.classList.add(b));
const delbutton = document.createElement("a");
delbutton.innerHTML = " ×";