mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Use connectionManager global
This commit is contained in:
parent
4d540bf9ca
commit
c97d7a6f59
79 changed files with 233 additions and 319 deletions
|
@ -36,7 +36,7 @@ import 'emby-button';
|
|||
function submitServer(page) {
|
||||
loading.show();
|
||||
const host = page.querySelector('#txtServerHost').value;
|
||||
ConnectionManager.connectToAddress(host, {
|
||||
window.connectionManager.connectToAddress(host, {
|
||||
enableAutoLogin: appSettings.enableAutoLogin()
|
||||
}).then(function(result) {
|
||||
handleConnectionResult(page, result);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import appHost from 'apphost';
|
||||
import appSettings from 'appSettings';
|
||||
import dom from 'dom';
|
||||
import connectionManager from 'connectionManager';
|
||||
import loading from 'loading';
|
||||
import layoutManager from 'layoutManager';
|
||||
import libraryMenu from 'libraryMenu';
|
||||
|
@ -139,7 +138,7 @@ import 'emby-checkbox';
|
|||
const serverId = params.serverid;
|
||||
|
||||
if (serverId) {
|
||||
return connectionManager.getOrCreateApiClient(serverId);
|
||||
return window.connectionManager.getOrCreateApiClient(serverId);
|
||||
}
|
||||
|
||||
return ApiClient;
|
||||
|
|
|
@ -4,7 +4,6 @@ import layoutManager from 'layoutManager';
|
|||
import libraryMenu from 'libraryMenu';
|
||||
import appSettings from 'appSettings';
|
||||
import focusManager from 'focusManager';
|
||||
import connectionManager from 'connectionManager';
|
||||
import globalize from 'globalize';
|
||||
import actionSheet from 'actionsheet';
|
||||
import dom from 'dom';
|
||||
|
@ -113,7 +112,7 @@ import 'emby-button';
|
|||
export default function (view, params) {
|
||||
function connectToServer(server) {
|
||||
loading.show();
|
||||
connectionManager.connectToServer(server, {
|
||||
window.connectionManager.connectToServer(server, {
|
||||
enableAutoLogin: appSettings.enableAutoLogin()
|
||||
}).then(function (result) {
|
||||
loading.hide();
|
||||
|
@ -145,7 +144,7 @@ import 'emby-button';
|
|||
|
||||
function deleteServer(server) {
|
||||
loading.show();
|
||||
connectionManager.deleteServer(server.Id).then(function () {
|
||||
window.connectionManager.deleteServer(server.Id).then(function () {
|
||||
loading.hide();
|
||||
loadServers();
|
||||
});
|
||||
|
@ -187,7 +186,7 @@ import 'emby-button';
|
|||
|
||||
function loadServers() {
|
||||
loading.show();
|
||||
connectionManager.getAvailableServers().then(onServersRetrieved);
|
||||
window.connectionManager.getAvailableServers().then(onServersRetrieved);
|
||||
}
|
||||
|
||||
let servers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue