mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix inconsistent naming formats
This commit is contained in:
parent
f9092e0678
commit
fdccb5c915
7 changed files with 41 additions and 39 deletions
|
@ -1941,47 +1941,47 @@ export default function (view) {
|
|||
|
||||
// Register to SyncPlay playback events and show big animated icon
|
||||
const showIcon = (action) => {
|
||||
let primary_icon_name = '';
|
||||
let secondary_icon_name = '';
|
||||
let animation_class = 'oneShotPulse';
|
||||
let primaryIconName = '';
|
||||
let secondaryIconName = '';
|
||||
let animationClass = 'oneShotPulse';
|
||||
let iconVisibilityTime = 1500;
|
||||
const syncPlayIcon = view.querySelector('#syncPlayIcon');
|
||||
|
||||
switch (action) {
|
||||
case 'schedule-play':
|
||||
primary_icon_name = 'sync spin';
|
||||
secondary_icon_name = 'play_arrow centered';
|
||||
animation_class = 'infinitePulse';
|
||||
primaryIconName = 'sync spin';
|
||||
secondaryIconName = 'play_arrow centered';
|
||||
animationClass = 'infinitePulse';
|
||||
iconVisibilityTime = -1;
|
||||
hideOsd();
|
||||
break;
|
||||
case 'unpause':
|
||||
primary_icon_name = 'play_circle_outline';
|
||||
primaryIconName = 'play_circle_outline';
|
||||
break;
|
||||
case 'pause':
|
||||
primary_icon_name = 'pause_circle_outline';
|
||||
primaryIconName = 'pause_circle_outline';
|
||||
showOsd();
|
||||
break;
|
||||
case 'seek':
|
||||
primary_icon_name = 'update';
|
||||
animation_class = 'infinitePulse';
|
||||
primaryIconName = 'update';
|
||||
animationClass = 'infinitePulse';
|
||||
iconVisibilityTime = -1;
|
||||
break;
|
||||
case 'buffering':
|
||||
primary_icon_name = 'schedule';
|
||||
animation_class = 'infinitePulse';
|
||||
primaryIconName = 'schedule';
|
||||
animationClass = 'infinitePulse';
|
||||
iconVisibilityTime = -1;
|
||||
break;
|
||||
case 'wait-pause':
|
||||
primary_icon_name = 'schedule';
|
||||
secondary_icon_name = 'pause shifted';
|
||||
animation_class = 'infinitePulse';
|
||||
primaryIconName = 'schedule';
|
||||
secondaryIconName = 'pause shifted';
|
||||
animationClass = 'infinitePulse';
|
||||
iconVisibilityTime = -1;
|
||||
break;
|
||||
case 'wait-unpause':
|
||||
primary_icon_name = 'schedule';
|
||||
secondary_icon_name = 'play_arrow shifted';
|
||||
animation_class = 'infinitePulse';
|
||||
primaryIconName = 'schedule';
|
||||
secondaryIconName = 'play_arrow shifted';
|
||||
animationClass = 'infinitePulse';
|
||||
iconVisibilityTime = -1;
|
||||
break;
|
||||
default: {
|
||||
|
@ -1990,13 +1990,13 @@ export default function (view) {
|
|||
}
|
||||
}
|
||||
|
||||
syncPlayIcon.setAttribute('class', 'syncPlayIconCircle ' + animation_class);
|
||||
syncPlayIcon.setAttribute('class', 'syncPlayIconCircle ' + animationClass);
|
||||
|
||||
const primaryIcon = syncPlayIcon.querySelector('.primary-icon');
|
||||
primaryIcon.setAttribute('class', 'primary-icon material-icons ' + primary_icon_name);
|
||||
primaryIcon.setAttribute('class', 'primary-icon material-icons ' + primaryIconName);
|
||||
|
||||
const secondaryIcon = syncPlayIcon.querySelector('.secondary-icon');
|
||||
secondaryIcon.setAttribute('class', 'secondary-icon material-icons ' + secondary_icon_name);
|
||||
secondaryIcon.setAttribute('class', 'secondary-icon material-icons ' + secondaryIconName);
|
||||
|
||||
const clone = syncPlayIcon.cloneNode(true);
|
||||
clone.style.visibility = 'visible';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue