mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Use remove+add pattern for icons
This commit is contained in:
parent
d98645135b
commit
a3bc8c183e
7 changed files with 62 additions and 42 deletions
|
@ -181,9 +181,8 @@ define(['playbackManager', 'userSettings', 'alphaPicker', 'alphaNumericShortcuts
|
|||
return;
|
||||
}
|
||||
|
||||
let icons = ["arrow_downward", "arrow_upward"];
|
||||
if (values.sortOrder === 'Descending') icons = icons.reverse();
|
||||
btnSortIcon.classList.replace(icons[0], icons[1]);
|
||||
btnSortIcon.classList.remove('arrow_downward', 'arrow_upward');
|
||||
btnSortIcon.classList.add(values.sortOrder === 'Descending' ? 'arrow_downward' : 'arrow_upward');
|
||||
}
|
||||
|
||||
function bindAll(elems, eventName, fn) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue