mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
29 lines
851 B
JavaScript
29 lines
851 B
JavaScript
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';
|
|
|
|
if (viewType !== currentViewType) {
|
|
currentViewType = viewType;
|
|
var theme;
|
|
var context;
|
|
|
|
if (viewType === 'a') {
|
|
theme = userSettings.dashboardTheme();
|
|
context = 'serverdashboard';
|
|
} else {
|
|
theme = userSettings.theme();
|
|
}
|
|
|
|
skinManager.setTheme(theme, context);
|
|
}
|
|
});
|
|
|
|
events.on(connectionManager, 'localusersignedin', function (e, user) {
|
|
currentViewType = null;
|
|
});
|