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
|
@ -1,7 +1,15 @@
|
|||
define(['css!./emby-button', 'registerElement'], function () {
|
||||
define(['browser', 'css!./emby-button', 'registerElement'], function (browser) {
|
||||
|
||||
var EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
|
||||
|
||||
function enableAnimation() {
|
||||
if (browser.tv) {
|
||||
// too slow
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function animateButtonInternal(e, btn) {
|
||||
|
||||
var div = document.createElement('div');
|
||||
|
@ -46,8 +54,10 @@
|
|||
|
||||
this.setAttribute('data-embybutton', 'true');
|
||||
|
||||
this.addEventListener('keydown', onKeyDown);
|
||||
this.addEventListener('click', animateButton);
|
||||
if (enableAnimation()) {
|
||||
this.addEventListener('keydown', onKeyDown);
|
||||
this.addEventListener('click', animateButton);
|
||||
}
|
||||
};
|
||||
|
||||
document.registerElement('paper-icon-button-light', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue