Add green flash animation on queue-add button click
Visual feedback when adding items to the queue: the "+" button pops to 1.3x scale with a green background, then eases back. Reflow trick allows re-triggering on repeated clicks.
This commit is contained in:
parent
fd39b2ae80
commit
11056cf208
2 changed files with 11 additions and 0 deletions
|
|
@ -3154,6 +3154,14 @@ textarea {
|
|||
color: var(--text-primary, #333);
|
||||
}
|
||||
|
||||
@keyframes queue-added-flash {
|
||||
0% { background: var(--green-color, #a3c765); color: #fff; transform: scale(1.3); }
|
||||
100% { background: transparent; color: inherit; transform: scale(1); }
|
||||
}
|
||||
.queue-add-btn.queue-added {
|
||||
animation: queue-added-flash 0.5s ease-out;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.mps-footer {
|
||||
background-color: var(--bg-secondary, #f8f9fa);
|
||||
|
|
|
|||
|
|
@ -1564,6 +1564,9 @@
|
|||
media_type: queueBtn.getAttribute('data-media-type'),
|
||||
thumbnail_url: queueBtn.getAttribute('data-thumbnail')
|
||||
});
|
||||
queueBtn.classList.remove('queue-added');
|
||||
void queueBtn.offsetWidth; // reflow to restart animation
|
||||
queueBtn.classList.add('queue-added');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue