mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
themeloader.js
This commit is contained in:
parent
e0cf014197
commit
5ebf1bda80
@ -1,15 +1,27 @@
|
|||||||
define(["userSettings", "skinManager", "connectionManager", "events"], function(userSettings, skinManager, connectionManager, events) {
|
define(["userSettings", "skinManager", "connectionManager", "events"], function (userSettings, skinManager, connectionManager, events) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var currentViewType;
|
var currentViewType;
|
||||||
pageClassOn("viewbeforeshow", "page", function() {
|
pageClassOn("viewbeforeshow", "page", function () {
|
||||||
var classList = this.classList,
|
var classList = this.classList;
|
||||||
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, context;
|
var theme;
|
||||||
"a" === viewType ? (theme = userSettings.dashboardTheme(), context = "serverdashboard") : theme = userSettings.theme(), skinManager.setTheme(theme, context)
|
var context;
|
||||||
|
|
||||||
|
if ("a" === viewType) {
|
||||||
|
theme = userSettings.dashboardTheme();
|
||||||
|
context = "serverdashboard";
|
||||||
|
} else {
|
||||||
|
theme = userSettings.theme();
|
||||||
|
}
|
||||||
|
|
||||||
|
skinManager.setTheme(theme, context);
|
||||||
}
|
}
|
||||||
}), events.on(connectionManager, "localusersignedin", function(e, user) {
|
});
|
||||||
currentViewType = null
|
events.on(connectionManager, "localusersignedin", function (e, user) {
|
||||||
})
|
currentViewType = null;
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user