1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

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

@ -3,12 +3,13 @@ import layoutManager from '../layoutManager';
import focusManager from '../focusManager';
import globalize from '../../scripts/globalize';
import loading from '../loading/loading';
import { ConnectionManager, Events } from 'jellyfin-apiclient';
import { Events } from 'jellyfin-apiclient';
import homeSections from '../homesections/homesections';
import dom from '../../scripts/dom';
import '../listview/listview.css';
import '../../elements/emby-select/emby-select';
import '../../elements/emby-checkbox/emby-checkbox';
import ServerConnections from '../ServerConnections';
/* eslint-disable indent */
@ -384,7 +385,7 @@ import '../../elements/emby-checkbox/emby-checkbox';
function onSubmit(e) {
const self = this;
const apiClient = ConnectionManager.getApiClient(self.options.serverId);
const apiClient = ServerConnections.getApiClient(self.options.serverId);
const userId = self.options.userId;
const userSettings = self.options.userSettings;
@ -456,7 +457,7 @@ import '../../elements/emby-checkbox/emby-checkbox';
loading.show();
const userId = self.options.userId;
const apiClient = ConnectionManager.getApiClient(self.options.serverId);
const apiClient = ServerConnections.getApiClient(self.options.serverId);
const userSettings = self.options.userSettings;
apiClient.getUser(userId).then(user => {