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:
parent
d27fb43d68
commit
eab7ef00df
4 changed files with 29 additions and 27 deletions
|
@ -142,6 +142,7 @@
|
|||
"src/scripts/keyboardNavigation.js",
|
||||
"src/scripts/settings/appSettings.js",
|
||||
"src/scripts/settings/userSettings.js",
|
||||
"src/scripts/themeLoader.js",
|
||||
"src/scripts/settings/webSettings.js"
|
||||
],
|
||||
"plugins": [
|
||||
|
|
|
@ -4,8 +4,6 @@ import dom from 'dom';
|
|||
import appRouter from 'appRouter';
|
||||
import connectionManager from 'connectionManager';
|
||||
|
||||
'use strict';
|
||||
|
||||
function onGroupedCardClick(e, card) {
|
||||
var itemId = card.getAttribute('data-id');
|
||||
var serverId = card.getAttribute('data-serverid');
|
||||
|
@ -43,3 +41,5 @@ import connectionManager from 'connectionManager';
|
|||
onGroupedCardClick(e, groupedCard);
|
||||
}
|
||||
}
|
||||
|
||||
/* eslint-enable indent */
|
||||
|
|
|
@ -4,8 +4,6 @@ import appSettings from 'appSettings' ;
|
|||
import browser from 'browser';
|
||||
import events from 'events';
|
||||
|
||||
'use strict';
|
||||
|
||||
export function getSavedVolume() {
|
||||
return appSettings.get('volume') || 1;
|
||||
}
|
||||
|
@ -467,4 +465,4 @@ import events from 'events';
|
|||
return ranges;
|
||||
}
|
||||
|
||||
|
||||
/* eslint-enable indent */
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue