extracted connectionManager from site.js

new module ServerConnections for ConnectionManager
all code adapted to this new module
removed Events and ConnectionManager from eslintrc
This commit is contained in:
vitorsemeano 2020-10-17 19:08:56 +01:00
parent 923d53bb71
commit 5071aedcea
81 changed files with 446 additions and 397 deletions

View file

@ -1,13 +1,14 @@
import * as userSettings from './settings/userSettings';
import * as webSettings from './settings/webSettings';
import skinManager from './themeManager';
import { ConnectionManager, Events } from 'jellyfin-apiclient';
import { Events } from 'jellyfin-apiclient';
import ServerConnections from '../components/ServerConnections';
// set the default theme when loading
skinManager.setTheme(userSettings.theme());
// set the saved theme once a user authenticates
Events.on(ConnectionManager, 'localusersignedin', function (e, user) {
Events.on(ServerConnections, 'localusersignedin', function (e, user) {
skinManager.setTheme(userSettings.theme());
});