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

@ -142,6 +142,7 @@
"src/scripts/keyboardNavigation.js", "src/scripts/keyboardNavigation.js",
"src/scripts/settings/appSettings.js", "src/scripts/settings/appSettings.js",
"src/scripts/settings/userSettings.js", "src/scripts/settings/userSettings.js",
"src/scripts/themeLoader.js",
"src/scripts/settings/webSettings.js" "src/scripts/settings/webSettings.js"
], ],
"plugins": [ "plugins": [

View file

@ -4,8 +4,6 @@ import dom from 'dom';
import appRouter from 'appRouter'; import appRouter from 'appRouter';
import connectionManager from 'connectionManager'; import connectionManager from 'connectionManager';
'use strict';
function onGroupedCardClick(e, card) { function onGroupedCardClick(e, card) {
var itemId = card.getAttribute('data-id'); var itemId = card.getAttribute('data-id');
var serverId = card.getAttribute('data-serverid'); var serverId = card.getAttribute('data-serverid');
@ -43,3 +41,5 @@ import connectionManager from 'connectionManager';
onGroupedCardClick(e, groupedCard); onGroupedCardClick(e, groupedCard);
} }
} }
/* eslint-enable indent */

View file

@ -4,8 +4,6 @@ import appSettings from 'appSettings' ;
import browser from 'browser'; import browser from 'browser';
import events from 'events'; import events from 'events';
'use strict';
export function getSavedVolume() { export function getSavedVolume() {
return appSettings.get('volume') || 1; return appSettings.get('volume') || 1;
} }
@ -467,4 +465,4 @@ import events from 'events';
return ranges; return ranges;
} }
/* eslint-enable indent */

View file

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