mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix: eslint no-shadow errors
This commit is contained in:
parent
6a93a2eb29
commit
832b9eaf4d
30 changed files with 273 additions and 271 deletions
|
@ -210,9 +210,9 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
return getPageData().view;
|
||||
};
|
||||
|
||||
const initPage = (tabContent) => {
|
||||
const alphaPickerElement = tabContent.querySelector('.alphaPicker');
|
||||
const itemsContainer = tabContent.querySelector('.itemsContainer');
|
||||
const initPage = (tabElement) => {
|
||||
const alphaPickerElement = tabElement.querySelector('.alphaPicker');
|
||||
const itemsContainer = tabElement.querySelector('.itemsContainer');
|
||||
|
||||
alphaPickerElement.addEventListener('alphavaluechanged', function (e) {
|
||||
const newValue = e.detail.value;
|
||||
|
@ -233,15 +233,15 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
valueChangeEvent: 'click'
|
||||
});
|
||||
|
||||
tabContent.querySelector('.alphaPicker').classList.add('alphabetPicker-right');
|
||||
tabElement.querySelector('.alphaPicker').classList.add('alphabetPicker-right');
|
||||
alphaPickerElement.classList.add('alphaPicker-fixed-right');
|
||||
itemsContainer.classList.add('padded-right-withalphapicker');
|
||||
|
||||
tabContent.querySelector('.btnFilter').addEventListener('click', () => {
|
||||
tabElement.querySelector('.btnFilter').addEventListener('click', () => {
|
||||
this.showFilterMenu();
|
||||
});
|
||||
|
||||
tabContent.querySelector('.btnSort').addEventListener('click', (e) => {
|
||||
tabElement.querySelector('.btnSort').addEventListener('click', (e) => {
|
||||
libraryBrowser.showSortMenu({
|
||||
items: [{
|
||||
name: globalize.translate('Name'),
|
||||
|
@ -274,7 +274,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
});
|
||||
});
|
||||
|
||||
const btnSelectView = tabContent.querySelector('.btnSelectView');
|
||||
const btnSelectView = tabElement.querySelector('.btnSelectView');
|
||||
btnSelectView.addEventListener('click', (e) => {
|
||||
libraryBrowser.showLayoutMenu(e.target, this.getCurrentViewStyle(), 'List,Poster,PosterCard'.split(','));
|
||||
});
|
||||
|
@ -288,8 +288,8 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
reloadItems();
|
||||
});
|
||||
|
||||
tabContent.querySelector('.btnPlayAll').addEventListener('click', playAll);
|
||||
tabContent.querySelector('.btnShuffle').addEventListener('click', shuffle);
|
||||
tabElement.querySelector('.btnPlayAll').addEventListener('click', playAll);
|
||||
tabElement.querySelector('.btnShuffle').addEventListener('click', shuffle);
|
||||
};
|
||||
|
||||
initPage(tabContent);
|
||||
|
|
|
@ -190,13 +190,13 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
return getPageData(tabContent).view;
|
||||
};
|
||||
|
||||
const initPage = (tabContent) => {
|
||||
const alphaPickerElement = tabContent.querySelector('.alphaPicker');
|
||||
const itemsContainer = tabContent.querySelector('.itemsContainer');
|
||||
const initPage = (tabElement) => {
|
||||
const alphaPickerElement = tabElement.querySelector('.alphaPicker');
|
||||
const itemsContainer = tabElement.querySelector('.itemsContainer');
|
||||
|
||||
alphaPickerElement.addEventListener('alphavaluechanged', function (e) {
|
||||
const newValue = e.detail.value;
|
||||
const query = getQuery(tabContent);
|
||||
const query = getQuery(tabElement);
|
||||
if (newValue === '#') {
|
||||
query.NameLessThan = 'A';
|
||||
delete query.NameStartsWith;
|
||||
|
@ -205,31 +205,31 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
delete query.NameLessThan;
|
||||
}
|
||||
query.StartIndex = 0;
|
||||
reloadItems(tabContent);
|
||||
reloadItems(tabElement);
|
||||
});
|
||||
this.alphaPicker = new AlphaPicker({
|
||||
element: alphaPickerElement,
|
||||
valueChangeEvent: 'click'
|
||||
});
|
||||
|
||||
tabContent.querySelector('.alphaPicker').classList.add('alphabetPicker-right');
|
||||
tabElement.querySelector('.alphaPicker').classList.add('alphabetPicker-right');
|
||||
alphaPickerElement.classList.add('alphaPicker-fixed-right');
|
||||
itemsContainer.classList.add('padded-right-withalphapicker');
|
||||
|
||||
tabContent.querySelector('.btnFilter').addEventListener('click', () => {
|
||||
tabElement.querySelector('.btnFilter').addEventListener('click', () => {
|
||||
this.showFilterMenu();
|
||||
});
|
||||
const btnSelectView = tabContent.querySelector('.btnSelectView');
|
||||
const btnSelectView = tabElement.querySelector('.btnSelectView');
|
||||
btnSelectView.addEventListener('click', (e) => {
|
||||
libraryBrowser.showLayoutMenu(e.target, this.getCurrentViewStyle(), 'List,Poster,PosterCard'.split(','));
|
||||
});
|
||||
btnSelectView.addEventListener('layoutchange', function (e) {
|
||||
const viewStyle = e.detail.viewStyle;
|
||||
getPageData(tabContent).view = viewStyle;
|
||||
libraryBrowser.saveViewSetting(getSavedQueryKey(tabContent), viewStyle);
|
||||
getQuery(tabContent).StartIndex = 0;
|
||||
getPageData(tabElement).view = viewStyle;
|
||||
libraryBrowser.saveViewSetting(getSavedQueryKey(tabElement), viewStyle);
|
||||
getQuery(tabElement).StartIndex = 0;
|
||||
onViewStyleChange();
|
||||
reloadItems(tabContent);
|
||||
reloadItems(tabElement);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ import Dashboard from '../../utils/dashboard';
|
|||
loadSuggestionsTab(view, tabContent, params.topParentId);
|
||||
}
|
||||
|
||||
function enableScrollX() {
|
||||
function enableScrollXmobile() {
|
||||
return browser.mobile;
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,7 @@ import Dashboard from '../../utils/dashboard';
|
|||
const containers = tabContent.querySelectorAll('.itemsContainer');
|
||||
|
||||
for (let i = 0, length = containers.length; i < length; i++) {
|
||||
setScrollClasses(containers[i], enableScrollX());
|
||||
setScrollClasses(containers[i], enableScrollXmobile());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -159,11 +159,11 @@ export default function (view, params, tabContent) {
|
|||
return getPageData(tabContent).view;
|
||||
};
|
||||
|
||||
function initPage(tabContent) {
|
||||
tabContent.querySelector('.btnFilter').addEventListener('click', function () {
|
||||
function initPage(tabElement) {
|
||||
tabElement.querySelector('.btnFilter').addEventListener('click', function () {
|
||||
self.showFilterMenu();
|
||||
});
|
||||
tabContent.querySelector('.btnSort').addEventListener('click', function (e) {
|
||||
tabElement.querySelector('.btnSort').addEventListener('click', function (e) {
|
||||
libraryBrowser.showSortMenu({
|
||||
items: [{
|
||||
name: globalize.translate('OptionTrackName'),
|
||||
|
@ -197,14 +197,14 @@ export default function (view, params, tabContent) {
|
|||
id: 'Random,SortName'
|
||||
}],
|
||||
callback: function () {
|
||||
getQuery(tabContent).StartIndex = 0;
|
||||
reloadItems(tabContent);
|
||||
getQuery(tabElement).StartIndex = 0;
|
||||
reloadItems(tabElement);
|
||||
},
|
||||
query: getQuery(tabContent),
|
||||
query: getQuery(tabElement),
|
||||
button: e.target
|
||||
});
|
||||
});
|
||||
tabContent.querySelector('.btnShuffle').addEventListener('click', shuffle);
|
||||
tabElement.querySelector('.btnShuffle').addEventListener('click', shuffle);
|
||||
}
|
||||
|
||||
initPage(tabContent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue