mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
4d618da015
commit
1fd4ea266c
7 changed files with 56 additions and 17 deletions
|
@ -45,6 +45,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
function enableAnimation() {
|
||||
if (browser.tv) {
|
||||
// too slow
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
EmbyButtonPrototype.attachedCallback = function () {
|
||||
|
||||
if (this.getAttribute('data-embybutton') == 'true') {
|
||||
|
@ -57,12 +65,14 @@
|
|||
this.classList.add('noflex');
|
||||
}
|
||||
|
||||
this.addEventListener('keydown', onKeyDown);
|
||||
if (browser.safari) {
|
||||
this.addEventListener('click', animateButton);
|
||||
} else {
|
||||
this.addEventListener('mousedown', onMouseDown);
|
||||
//this.addEventListener('touchstart', animateButton);
|
||||
if (enableAnimation()) {
|
||||
this.addEventListener('keydown', onKeyDown);
|
||||
if (browser.safari) {
|
||||
this.addEventListener('click', animateButton);
|
||||
} else {
|
||||
this.addEventListener('mousedown', onMouseDown);
|
||||
//this.addEventListener('touchstart', animateButton);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue