mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
run eslint to fix most var instances
This commit is contained in:
parent
24699c0aca
commit
39eddeb205
55 changed files with 614 additions and 614 deletions
|
@ -4,7 +4,7 @@ import layoutManager from 'layoutManager';
|
|||
import 'emby-tabs';
|
||||
|
||||
function onViewDestroy(e) {
|
||||
var tabControllers = this.tabControllers;
|
||||
const tabControllers = this.tabControllers;
|
||||
|
||||
if (tabControllers) {
|
||||
tabControllers.forEach(function (t) {
|
||||
|
@ -32,9 +32,9 @@ class TabbedView {
|
|||
this.view = view;
|
||||
this.params = params;
|
||||
|
||||
var self = this;
|
||||
const self = this;
|
||||
|
||||
var currentTabIndex = parseInt(params.tab || this.getDefaultTabIndex(params.parentId));
|
||||
let currentTabIndex = parseInt(params.tab || this.getDefaultTabIndex(params.parentId));
|
||||
this.initialTabIndex = currentTabIndex;
|
||||
|
||||
function validateTabLoad(index) {
|
||||
|
@ -44,7 +44,7 @@ class TabbedView {
|
|||
function loadTab(index, previousIndex) {
|
||||
validateTabLoad(index).then(function () {
|
||||
self.getTabController(index).then(function (controller) {
|
||||
var refresh = !controller.refreshed;
|
||||
const refresh = !controller.refreshed;
|
||||
|
||||
controller.onResume({
|
||||
autoFocus: previousIndex == null && layoutManager.tv,
|
||||
|
@ -64,10 +64,10 @@ class TabbedView {
|
|||
}
|
||||
|
||||
function onTabChange(e) {
|
||||
var newIndex = parseInt(e.detail.selectedTabIndex);
|
||||
var previousIndex = e.detail.previousIndex;
|
||||
const newIndex = parseInt(e.detail.selectedTabIndex);
|
||||
const previousIndex = e.detail.previousIndex;
|
||||
|
||||
var previousTabController = previousIndex == null ? null : self.tabControllers[previousIndex];
|
||||
const previousTabController = previousIndex == null ? null : self.tabControllers[previousIndex];
|
||||
if (previousTabController && previousTabController.onPause) {
|
||||
previousTabController.onPause();
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ class TabbedView {
|
|||
this.setTitle();
|
||||
backdrop.clearBackdrop();
|
||||
|
||||
var currentTabController = this.currentTabController;
|
||||
const currentTabController = this.currentTabController;
|
||||
|
||||
if (!currentTabController) {
|
||||
mainTabsManager.selectedTabIndex(this.initialTabIndex);
|
||||
|
@ -102,7 +102,7 @@ class TabbedView {
|
|||
}
|
||||
|
||||
onPause() {
|
||||
var currentTabController = this.currentTabController;
|
||||
const currentTabController = this.currentTabController;
|
||||
|
||||
if (currentTabController && currentTabController.onPause) {
|
||||
currentTabController.onPause();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue