Add model favorite dot feedback

This commit is contained in:
pewdiepie-archdaemon
2026-06-02 06:50:22 +09:00
parent 4a112175e2
commit 637c7511a2
2 changed files with 20 additions and 3 deletions

View File

@@ -294,6 +294,9 @@ function _initModelPickerDropdown() {
e.stopPropagation();
const nowFav = _toggleFavorite(m.mid);
_setFavState(nowFav);
favDot.classList.remove('pulse');
void favDot.offsetWidth;
favDot.classList.add('pulse');
// Keep our in-memory copy aligned so a follow-up re-render is correct.
const idx = favs.indexOf(m.mid);
if (nowFav && idx < 0) favs.push(m.mid);