1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Migrate themeLoader to ES6

fix bug

remove console log

Revert "remove console log"

This reverts commit 944c1673df95b4047864f38a5e3c6fceb90b991c.

Revert "Revert "remove console log""

This reverts commit 7b086194443b37a2515e17faaaa36e89161a9a5b.

fix lint

added eslint-enable indent

fix lint

fix lint

remove console log

Revert "remove console log"

This reverts commit 944c1673df95b4047864f38a5e3c6fceb90b991c.

Revert "Revert "remove console log""

This reverts commit 7b086194443b37a2515e17faaaa36e89161a9a5b.

added eslint-enable indent

fix lint
This commit is contained in:
Influence365 2020-06-16 18:46:54 +01:00 committed by MrTimscampi
parent d27fb43d68
commit eab7ef00df
4 changed files with 29 additions and 27 deletions

View file

@ -1,27 +1,30 @@
define(['userSettings', 'skinManager', 'connectionManager', 'events'], function (userSettings, skinManager, connectionManager, events) {
'use strict';
import * as userSettings from 'userSettings';
import skinManager from 'skinManager';
import connectionManager from 'connectionManager';
import events from 'events';
var currentViewType;
pageClassOn('viewbeforeshow', 'page', function () {
var classList = this.classList;
var viewType = classList.contains('type-interior') || classList.contains('wizardPage') ? 'a' : 'b';
var currentViewType;
pageClassOn('viewbeforeshow', 'page', function () {
var classList = this.classList;
var viewType = classList.contains('type-interior') || classList.contains('wizardPage') ? 'a' : 'b';
if (viewType !== currentViewType) {
currentViewType = viewType;
var theme;
var context;
if (viewType !== currentViewType) {
currentViewType = viewType;
var theme;
var context;
if ('a' === viewType) {
theme = userSettings.dashboardTheme();
context = 'serverdashboard';
} else {
theme = userSettings.theme();
}
skinManager.setTheme(theme, context);
if ('a' === viewType) {
theme = userSettings.dashboardTheme();
context = 'serverdashboard';
} else {
theme = userSettings.theme();
}
});
events.on(connectionManager, 'localusersignedin', function (e, user) {
currentViewType = null;
});
skinManager.setTheme(theme, context);
}
});
events.on(connectionManager, 'localusersignedin', function (e, user) {
currentViewType = null;
});