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
|
@ -391,11 +391,8 @@ import 'scrollStyles';
|
||||||
dlg.setAttribute('data-autofocus', 'true');
|
dlg.setAttribute('data-autofocus', 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
let defaultEntryAnimation;
|
const defaultEntryAnimation = 'scaleup';
|
||||||
let defaultExitAnimation;
|
const defaultExitAnimation = 'scaledown';
|
||||||
|
|
||||||
defaultEntryAnimation = 'scaleup';
|
|
||||||
defaultExitAnimation = 'scaledown';
|
|
||||||
const entryAnimation = options.entryAnimation || defaultEntryAnimation;
|
const entryAnimation = options.entryAnimation || defaultEntryAnimation;
|
||||||
const exitAnimation = options.exitAnimation || defaultExitAnimation;
|
const exitAnimation = options.exitAnimation || defaultExitAnimation;
|
||||||
|
|
||||||
|
|
|
@ -873,6 +873,10 @@ define(['browser', 'datetime', 'backdrop', 'libraryBrowser', 'listView', 'imageL
|
||||||
}
|
}
|
||||||
|
|
||||||
function init(ownerView, context) {
|
function init(ownerView, context) {
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
const contextmenuHtml = `<button id="toggleContextMenu" is="paper-icon-button-light" class="btnToggleContextMenu" title=${globalize.translate('ButtonToggleContextMenu')}><span class="material-icons more_vert"></span></button>`;
|
||||||
|
>>>>>>> 4f0443b2d... Fix linting errors
|
||||||
let volumecontrolHtml = '<div class="volumecontrol flex align-items-center flex-wrap-wrap justify-content-center">';
|
let volumecontrolHtml = '<div class="volumecontrol flex align-items-center flex-wrap-wrap justify-content-center">';
|
||||||
volumecontrolHtml += `<button is="paper-icon-button-light" class="buttonMute autoSize" title=${globalize.translate('Mute')}><span class="xlargePaperIconButton material-icons volume_up"></span></button>`;
|
volumecontrolHtml += `<button is="paper-icon-button-light" class="buttonMute autoSize" title=${globalize.translate('Mute')}><span class="xlargePaperIconButton material-icons volume_up"></span></button>`;
|
||||||
volumecontrolHtml += '<div class="sliderContainer nowPlayingVolumeSliderContainer"><input is="emby-slider" type="range" step="1" min="0" max="100" value="0" class="nowPlayingVolumeSlider"/></div>';
|
volumecontrolHtml += '<div class="sliderContainer nowPlayingVolumeSliderContainer"><input is="emby-slider" type="range" step="1" min="0" max="100" value="0" class="nowPlayingVolumeSlider"/></div>';
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getTextStyles(settings, isCue) {
|
function getTextStyles(settings, isCue) {
|
||||||
let list = [];
|
const list = [];
|
||||||
|
|
||||||
if (isCue) {
|
if (isCue) {
|
||||||
switch (settings.textSize || '') {
|
switch (settings.textSize || '') {
|
||||||
|
@ -123,14 +123,14 @@ export function getStyles(settings, isCue) {
|
||||||
|
|
||||||
function applyStyleList(styles, elem) {
|
function applyStyleList(styles, elem) {
|
||||||
for (let i = 0, length = styles.length; i < length; i++) {
|
for (let i = 0, length = styles.length; i < length; i++) {
|
||||||
let style = styles[i];
|
const style = styles[i];
|
||||||
|
|
||||||
elem.style[style.name] = style.value;
|
elem.style[style.name] = style.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function applyStyles(elements, appearanceSettings) {
|
export function applyStyles(elements, appearanceSettings) {
|
||||||
let styles = getStyles(appearanceSettings);
|
const styles = getStyles(appearanceSettings);
|
||||||
|
|
||||||
if (elements.text) {
|
if (elements.text) {
|
||||||
applyStyleList(styles.text, elements.text);
|
applyStyleList(styles.text, elements.text);
|
||||||
|
|
|
@ -20,7 +20,7 @@ import 'flexStyles';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getSubtitleAppearanceObject(context) {
|
function getSubtitleAppearanceObject(context) {
|
||||||
let appearanceSettings = {};
|
const appearanceSettings = {};
|
||||||
|
|
||||||
appearanceSettings.textSize = context.querySelector('#selectTextSize').value;
|
appearanceSettings.textSize = context.querySelector('#selectTextSize').value;
|
||||||
appearanceSettings.dropShadow = context.querySelector('#selectDropShadow').value;
|
appearanceSettings.dropShadow = context.querySelector('#selectDropShadow').value;
|
||||||
|
@ -37,7 +37,7 @@ function loadForm(context, user, userSettings, appearanceSettings, apiClient) {
|
||||||
context.querySelector('.fldBurnIn').classList.remove('hide');
|
context.querySelector('.fldBurnIn').classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
let selectSubtitleLanguage = context.querySelector('#selectSubtitleLanguage');
|
const selectSubtitleLanguage = context.querySelector('#selectSubtitleLanguage');
|
||||||
|
|
||||||
settingsHelper.populateLanguages(selectSubtitleLanguage, allCultures);
|
settingsHelper.populateLanguages(selectSubtitleLanguage, allCultures);
|
||||||
|
|
||||||
|
@ -96,9 +96,9 @@ function save(instance, context, userId, userSettings, apiClient, enableSaveConf
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubtitleModeChange(e) {
|
function onSubtitleModeChange(e) {
|
||||||
let view = dom.parentWithClass(e.target, 'subtitlesettings');
|
const view = dom.parentWithClass(e.target, 'subtitlesettings');
|
||||||
|
|
||||||
let subtitlesHelp = view.querySelectorAll('.subtitlesHelp');
|
const subtitlesHelp = view.querySelectorAll('.subtitlesHelp');
|
||||||
for (let i = 0, length = subtitlesHelp.length; i < length; i++) {
|
for (let i = 0, length = subtitlesHelp.length; i < length; i++) {
|
||||||
subtitlesHelp[i].classList.add('hide');
|
subtitlesHelp[i].classList.add('hide');
|
||||||
}
|
}
|
||||||
|
@ -106,11 +106,11 @@ function onSubtitleModeChange(e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAppearanceFieldChange(e) {
|
function onAppearanceFieldChange(e) {
|
||||||
let view = dom.parentWithClass(e.target, 'subtitlesettings');
|
const view = dom.parentWithClass(e.target, 'subtitlesettings');
|
||||||
|
|
||||||
let appearanceSettings = getSubtitleAppearanceObject(view);
|
const appearanceSettings = getSubtitleAppearanceObject(view);
|
||||||
|
|
||||||
let elements = {
|
const elements = {
|
||||||
window: view.querySelector('.subtitleappearance-preview-window'),
|
window: view.querySelector('.subtitleappearance-preview-window'),
|
||||||
text: view.querySelector('.subtitleappearance-preview-text')
|
text: view.querySelector('.subtitleappearance-preview-text')
|
||||||
};
|
};
|
||||||
|
@ -156,20 +156,20 @@ export class SubtitleSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData() {
|
loadData() {
|
||||||
let self = this;
|
const self = this;
|
||||||
let context = self.options.element;
|
const context = self.options.element;
|
||||||
|
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
let userId = self.options.userId;
|
const userId = self.options.userId;
|
||||||
let apiClient = connectionManager.getApiClient(self.options.serverId);
|
const apiClient = connectionManager.getApiClient(self.options.serverId);
|
||||||
let userSettings = self.options.userSettings;
|
const userSettings = self.options.userSettings;
|
||||||
|
|
||||||
apiClient.getUser(userId).then(function (user) {
|
apiClient.getUser(userId).then(function (user) {
|
||||||
userSettings.setUserInfo(userId, apiClient).then(function () {
|
userSettings.setUserInfo(userId, apiClient).then(function () {
|
||||||
self.dataLoaded = true;
|
self.dataLoaded = true;
|
||||||
|
|
||||||
let appearanceSettings = userSettings.getSubtitleAppearanceSettings(self.options.appearanceKey);
|
const appearanceSettings = userSettings.getSubtitleAppearanceSettings(self.options.appearanceKey);
|
||||||
|
|
||||||
loadForm(context, user, userSettings, appearanceSettings, apiClient);
|
loadForm(context, user, userSettings, appearanceSettings, apiClient);
|
||||||
});
|
});
|
||||||
|
@ -186,12 +186,12 @@ export class SubtitleSettings {
|
||||||
|
|
||||||
onSubmit(e) {
|
onSubmit(e) {
|
||||||
const self = this;
|
const self = this;
|
||||||
let apiClient = connectionManager.getApiClient(self.options.serverId);
|
const apiClient = connectionManager.getApiClient(self.options.serverId);
|
||||||
let userId = self.options.userId;
|
const userId = self.options.userId;
|
||||||
let userSettings = self.options.userSettings;
|
const userSettings = self.options.userSettings;
|
||||||
|
|
||||||
userSettings.setUserInfo(userId, apiClient).then(function () {
|
userSettings.setUserInfo(userId, apiClient).then(function () {
|
||||||
let enableSaveConfirmation = self.options.enableSaveConfirmation;
|
const enableSaveConfirmation = self.options.enableSaveConfirmation;
|
||||||
save(self, self.options.element, userId, userSettings, apiClient, enableSaveConfirmation);
|
save(self, self.options.element, userId, userSettings, apiClient, enableSaveConfirmation);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import 'webcomponents';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
let EmbyCheckboxPrototype = Object.create(HTMLInputElement.prototype);
|
const EmbyCheckboxPrototype = Object.create(HTMLInputElement.prototype);
|
||||||
|
|
||||||
function onKeyDown(e) {
|
function onKeyDown(e) {
|
||||||
// Don't submit form on enter
|
// Don't submit form on enter
|
||||||
|
@ -26,7 +26,7 @@ import 'webcomponents';
|
||||||
const enableRefreshHack = browser.tizen || browser.orsay || browser.operaTv || browser.web0s ? true : false;
|
const enableRefreshHack = browser.tizen || browser.orsay || browser.operaTv || browser.web0s ? true : false;
|
||||||
|
|
||||||
function forceRefresh(loading) {
|
function forceRefresh(loading) {
|
||||||
let elem = this.parentNode;
|
const elem = this.parentNode;
|
||||||
|
|
||||||
elem.style.webkitAnimationName = 'repaintChrome';
|
elem.style.webkitAnimationName = 'repaintChrome';
|
||||||
elem.style.webkitAnimationDelay = (loading === true ? '500ms' : '');
|
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 () {
|
EmbyItemRefreshIndicatorPrototype.createdCallback = function () {
|
||||||
// base method
|
// base method
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
let ProgressBarPrototype = Object.create(HTMLDivElement.prototype);
|
const ProgressBarPrototype = Object.create(HTMLDivElement.prototype);
|
||||||
|
|
||||||
function onAutoTimeProgress() {
|
function onAutoTimeProgress() {
|
||||||
const start = parseInt(this.getAttribute('data-starttime'));
|
const start = parseInt(this.getAttribute('data-starttime'));
|
||||||
|
|
|
@ -3,7 +3,7 @@ import 'webcomponents';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
let EmbyProgressRing = Object.create(HTMLDivElement.prototype);
|
const EmbyProgressRing = Object.create(HTMLDivElement.prototype);
|
||||||
|
|
||||||
EmbyProgressRing.createdCallback = function () {
|
EmbyProgressRing.createdCallback = function () {
|
||||||
this.classList.add('progressring');
|
this.classList.add('progressring');
|
||||||
|
@ -79,7 +79,7 @@ import 'webcomponents';
|
||||||
};
|
};
|
||||||
|
|
||||||
EmbyProgressRing.detachedCallback = function () {
|
EmbyProgressRing.detachedCallback = function () {
|
||||||
let observer = this.observer;
|
const observer = this.observer;
|
||||||
|
|
||||||
if (observer) {
|
if (observer) {
|
||||||
// later, you can stop observing
|
// later, you can stop observing
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'webcomponents';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
let EmbyRadioPrototype = Object.create(HTMLInputElement.prototype);
|
const EmbyRadioPrototype = Object.create(HTMLInputElement.prototype);
|
||||||
|
|
||||||
function onKeyDown(e) {
|
function onKeyDown(e) {
|
||||||
// Don't submit form on enter
|
// Don't submit form on enter
|
||||||
|
@ -35,7 +35,7 @@ import 'webcomponents';
|
||||||
|
|
||||||
this.classList.add('mdl-radio__button');
|
this.classList.add('mdl-radio__button');
|
||||||
|
|
||||||
let labelElement = this.parentNode;
|
const labelElement = this.parentNode;
|
||||||
labelElement.classList.add('mdl-radio');
|
labelElement.classList.add('mdl-radio');
|
||||||
labelElement.classList.add('mdl-js-radio');
|
labelElement.classList.add('mdl-js-radio');
|
||||||
labelElement.classList.add('mdl-js-ripple-effect');
|
labelElement.classList.add('mdl-js-ripple-effect');
|
||||||
|
@ -43,7 +43,7 @@ import 'webcomponents';
|
||||||
labelElement.classList.add('show-focus');
|
labelElement.classList.add('show-focus');
|
||||||
}
|
}
|
||||||
|
|
||||||
let labelTextElement = labelElement.querySelector('span');
|
const labelTextElement = labelElement.querySelector('span');
|
||||||
|
|
||||||
labelTextElement.classList.add('radioButtonLabel');
|
labelTextElement.classList.add('radioButtonLabel');
|
||||||
labelTextElement.classList.add('mdl-radio__label');
|
labelTextElement.classList.add('mdl-radio__label');
|
||||||
|
|
|
@ -9,7 +9,7 @@ import 'css!./emby-scroller';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
let ScrollerPrototype = Object.create(HTMLDivElement.prototype);
|
const ScrollerPrototype = Object.create(HTMLDivElement.prototype);
|
||||||
|
|
||||||
ScrollerPrototype.createdCallback = function () {
|
ScrollerPrototype.createdCallback = function () {
|
||||||
this.classList.add('emby-scroller');
|
this.classList.add('emby-scroller');
|
||||||
|
|
|
@ -8,7 +8,7 @@ import 'emby-input';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
let EmbySliderPrototype = Object.create(HTMLInputElement.prototype);
|
const EmbySliderPrototype = Object.create(HTMLInputElement.prototype);
|
||||||
|
|
||||||
let supportsValueSetOverride = false;
|
let supportsValueSetOverride = false;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ import 'emby-input';
|
||||||
// Keep only one per slider frame request
|
// Keep only one per slider frame request
|
||||||
cancelAnimationFrame(range.updateValuesFrame);
|
cancelAnimationFrame(range.updateValuesFrame);
|
||||||
range.updateValuesFrame = requestAnimationFrame(function () {
|
range.updateValuesFrame = requestAnimationFrame(function () {
|
||||||
let backgroundLower = range.backgroundLower;
|
const backgroundLower = range.backgroundLower;
|
||||||
|
|
||||||
if (backgroundLower) {
|
if (backgroundLower) {
|
||||||
let fraction = (value - range.min) / (range.max - range.min);
|
let fraction = (value - range.min) / (range.max - range.min);
|
||||||
|
|
|
@ -8,7 +8,7 @@ import 'scrollStyles';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
let EmbyTabs = Object.create(HTMLDivElement.prototype);
|
const EmbyTabs = Object.create(HTMLDivElement.prototype);
|
||||||
const buttonClass = 'emby-tab-button';
|
const buttonClass = 'emby-tab-button';
|
||||||
const activeButtonClass = buttonClass + '-active';
|
const activeButtonClass = buttonClass + '-active';
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import 'scrollStyles';
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeActivePanelClass(tabs, index) {
|
function removeActivePanelClass(tabs, index) {
|
||||||
let tabPanel = getTabPanel(tabs, index);
|
const tabPanel = getTabPanel(tabs, index);
|
||||||
if (tabPanel) {
|
if (tabPanel) {
|
||||||
tabPanel.classList.remove('is-active');
|
tabPanel.classList.remove('is-active');
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ import 'scrollStyles';
|
||||||
removeActivePanelClass(tabs, previousIndex);
|
removeActivePanelClass(tabs, previousIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
let newPanel = getTabPanel(tabs, index);
|
const newPanel = getTabPanel(tabs, index);
|
||||||
|
|
||||||
if (newPanel) {
|
if (newPanel) {
|
||||||
// animate new panel ?
|
// animate new panel ?
|
||||||
|
@ -225,7 +225,7 @@ import 'scrollStyles';
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let currentTabButton = tabButtons[current];
|
const currentTabButton = tabButtons[current];
|
||||||
setActiveTabButton(tabs, tabButtons[selected], currentTabButton, false);
|
setActiveTabButton(tabs, tabButtons[selected], currentTabButton, false);
|
||||||
|
|
||||||
if (current !== selected && currentTabButton) {
|
if (current !== selected && currentTabButton) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue