2020-08-14 08:46:34 +02:00
|
|
|
import layoutManager from '../../components/layoutManager';
|
2021-01-26 15:42:02 -05:00
|
|
|
import './emby-button.scss';
|
2020-09-08 02:43:56 -04:00
|
|
|
import 'webcomponents.js/webcomponents-lite';
|
2019-01-10 15:39:37 +03:00
|
|
|
|
2020-07-17 17:02:49 +01:00
|
|
|
const EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
|
2020-07-15 11:41:59 +01:00
|
|
|
|
2020-07-17 17:02:49 +01:00
|
|
|
EmbyButtonPrototype.createdCallback = function () {
|
2020-09-08 15:43:19 -04:00
|
|
|
this.classList.add('paper-icon-button-light');
|
2019-01-10 15:39:37 +03:00
|
|
|
|
2020-07-17 17:02:49 +01:00
|
|
|
if (layoutManager.tv) {
|
|
|
|
this.classList.add('show-focus');
|
|
|
|
}
|
|
|
|
};
|
2019-01-10 15:39:37 +03:00
|
|
|
|
2020-09-08 15:43:19 -04:00
|
|
|
document.registerElement('paper-icon-button-light', {
|
2020-07-17 17:02:49 +01:00
|
|
|
prototype: EmbyButtonPrototype,
|
|
|
|
extends: 'button'
|
|
|
|
});
|