mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix linting errors
This commit is contained in:
parent
f16df9788a
commit
8f098dc26d
12 changed files with 42 additions and 41 deletions
|
@ -5,7 +5,7 @@ import 'webcomponents';
|
|||
|
||||
/* eslint-disable indent */
|
||||
|
||||
let EmbyCheckboxPrototype = Object.create(HTMLInputElement.prototype);
|
||||
const EmbyCheckboxPrototype = Object.create(HTMLInputElement.prototype);
|
||||
|
||||
function onKeyDown(e) {
|
||||
// Don't submit form on enter
|
||||
|
@ -26,7 +26,7 @@ import 'webcomponents';
|
|||
const enableRefreshHack = browser.tizen || browser.orsay || browser.operaTv || browser.web0s ? true : false;
|
||||
|
||||
function forceRefresh(loading) {
|
||||
let elem = this.parentNode;
|
||||
const elem = this.parentNode;
|
||||
|
||||
elem.style.webkitAnimationName = 'repaintChrome';
|
||||
elem.style.webkitAnimationDelay = (loading === true ? '500ms' : '');
|
||||
|
|
|
@ -40,7 +40,7 @@ import 'webcomponents';
|
|||
}
|
||||
}
|
||||
|
||||
let EmbyItemRefreshIndicatorPrototype = Object.create(EmbyProgressRing);
|
||||
const EmbyItemRefreshIndicatorPrototype = Object.create(EmbyProgressRing);
|
||||
|
||||
EmbyItemRefreshIndicatorPrototype.createdCallback = function () {
|
||||
// base method
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable indent */
|
||||
|
||||
let ProgressBarPrototype = Object.create(HTMLDivElement.prototype);
|
||||
const ProgressBarPrototype = Object.create(HTMLDivElement.prototype);
|
||||
|
||||
function onAutoTimeProgress() {
|
||||
const start = parseInt(this.getAttribute('data-starttime'));
|
||||
|
|
|
@ -3,7 +3,7 @@ import 'webcomponents';
|
|||
|
||||
/* eslint-disable indent */
|
||||
|
||||
let EmbyProgressRing = Object.create(HTMLDivElement.prototype);
|
||||
const EmbyProgressRing = Object.create(HTMLDivElement.prototype);
|
||||
|
||||
EmbyProgressRing.createdCallback = function () {
|
||||
this.classList.add('progressring');
|
||||
|
@ -79,7 +79,7 @@ import 'webcomponents';
|
|||
};
|
||||
|
||||
EmbyProgressRing.detachedCallback = function () {
|
||||
let observer = this.observer;
|
||||
const observer = this.observer;
|
||||
|
||||
if (observer) {
|
||||
// later, you can stop observing
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'webcomponents';
|
|||
|
||||
/* eslint-disable indent */
|
||||
|
||||
let EmbyRadioPrototype = Object.create(HTMLInputElement.prototype);
|
||||
const EmbyRadioPrototype = Object.create(HTMLInputElement.prototype);
|
||||
|
||||
function onKeyDown(e) {
|
||||
// Don't submit form on enter
|
||||
|
@ -35,7 +35,7 @@ import 'webcomponents';
|
|||
|
||||
this.classList.add('mdl-radio__button');
|
||||
|
||||
let labelElement = this.parentNode;
|
||||
const labelElement = this.parentNode;
|
||||
labelElement.classList.add('mdl-radio');
|
||||
labelElement.classList.add('mdl-js-radio');
|
||||
labelElement.classList.add('mdl-js-ripple-effect');
|
||||
|
@ -43,7 +43,7 @@ import 'webcomponents';
|
|||
labelElement.classList.add('show-focus');
|
||||
}
|
||||
|
||||
let labelTextElement = labelElement.querySelector('span');
|
||||
const labelTextElement = labelElement.querySelector('span');
|
||||
|
||||
labelTextElement.classList.add('radioButtonLabel');
|
||||
labelTextElement.classList.add('mdl-radio__label');
|
||||
|
|
|
@ -9,7 +9,7 @@ import 'css!./emby-scroller';
|
|||
|
||||
/* eslint-disable indent */
|
||||
|
||||
let ScrollerPrototype = Object.create(HTMLDivElement.prototype);
|
||||
const ScrollerPrototype = Object.create(HTMLDivElement.prototype);
|
||||
|
||||
ScrollerPrototype.createdCallback = function () {
|
||||
this.classList.add('emby-scroller');
|
||||
|
|
|
@ -8,7 +8,7 @@ import 'emby-input';
|
|||
|
||||
/* eslint-disable indent */
|
||||
|
||||
let EmbySliderPrototype = Object.create(HTMLInputElement.prototype);
|
||||
const EmbySliderPrototype = Object.create(HTMLInputElement.prototype);
|
||||
|
||||
let supportsValueSetOverride = false;
|
||||
|
||||
|
@ -94,7 +94,7 @@ import 'emby-input';
|
|||
// Keep only one per slider frame request
|
||||
cancelAnimationFrame(range.updateValuesFrame);
|
||||
range.updateValuesFrame = requestAnimationFrame(function () {
|
||||
let backgroundLower = range.backgroundLower;
|
||||
const backgroundLower = range.backgroundLower;
|
||||
|
||||
if (backgroundLower) {
|
||||
let fraction = (value - range.min) / (range.max - range.min);
|
||||
|
|
|
@ -8,7 +8,7 @@ import 'scrollStyles';
|
|||
|
||||
/* eslint-disable indent */
|
||||
|
||||
let EmbyTabs = Object.create(HTMLDivElement.prototype);
|
||||
const EmbyTabs = Object.create(HTMLDivElement.prototype);
|
||||
const buttonClass = 'emby-tab-button';
|
||||
const activeButtonClass = buttonClass + '-active';
|
||||
|
||||
|
@ -21,7 +21,7 @@ import 'scrollStyles';
|
|||
}
|
||||
|
||||
function removeActivePanelClass(tabs, index) {
|
||||
let tabPanel = getTabPanel(tabs, index);
|
||||
const tabPanel = getTabPanel(tabs, index);
|
||||
if (tabPanel) {
|
||||
tabPanel.classList.remove('is-active');
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ import 'scrollStyles';
|
|||
removeActivePanelClass(tabs, previousIndex);
|
||||
}
|
||||
|
||||
let newPanel = getTabPanel(tabs, index);
|
||||
const newPanel = getTabPanel(tabs, index);
|
||||
|
||||
if (newPanel) {
|
||||
// animate new panel ?
|
||||
|
@ -225,7 +225,7 @@ import 'scrollStyles';
|
|||
}
|
||||
}));
|
||||
|
||||
let currentTabButton = tabButtons[current];
|
||||
const currentTabButton = tabButtons[current];
|
||||
setActiveTabButton(tabs, tabButtons[selected], currentTabButton, false);
|
||||
|
||||
if (current !== selected && currentTabButton) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue