feat: add toggle watchlist on anime cards and improve dropdown

This commit is contained in:
2026-05-02 15:28:37 +02:00
committed by Mikkel Elvers
parent 94e60e0d8b
commit cc9ca1ba9e
14 changed files with 396 additions and 76 deletions

View File

@@ -1,6 +1,7 @@
class UIDropdown extends HTMLElement {
isOpen: boolean = false
contentEl: HTMLElement | null = null
isClosing: boolean = false
constructor() {
super()
@@ -28,6 +29,7 @@ class UIDropdown extends HTMLElement {
}
toggle() {
if (this.isClosing) return
this.isOpen = !this.isOpen
if (this.contentEl) {
if (this.isOpen) {
@@ -39,10 +41,15 @@ class UIDropdown extends HTMLElement {
}
close() {
if (this.isClosing) return
this.isClosing = true
this.isOpen = false
if (this.contentEl) {
this.contentEl.classList.add('hidden')
}
setTimeout(() => {
this.isClosing = false
}, 100)
}
handleClickOutside(event: MouseEvent) {

View File

@@ -95,7 +95,11 @@ html, body {
.scrollbar-hide::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.3);
}
.scrollbar-hide {
button.in-watchlist .watchlist-icon {
fill: currentColor !important;
}
.scrollbar-hide {
-ms-overflow-style: auto;
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);