mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove most of Dashboard global window usage
This commit is contained in:
parent
4e88835382
commit
923d53bb71
58 changed files with 65 additions and 26 deletions
|
@ -83,7 +83,6 @@ module.exports = {
|
|||
'ApiClient': 'writable',
|
||||
'chrome': 'writable',
|
||||
'DlnaProfilePage': 'writable',
|
||||
'Dashboard': 'writable',
|
||||
'DashboardPage': 'writable',
|
||||
'Emby': 'readonly',
|
||||
'Events': 'writable',
|
||||
|
|
|
@ -9,6 +9,7 @@ import loading from './loading/loading';
|
|||
import page from 'page';
|
||||
import viewManager from './viewManager/viewManager';
|
||||
import AppInfo from './AppInfo';
|
||||
import Dashboard from '../scripts/clientUtils';
|
||||
|
||||
class AppRouter {
|
||||
allRoutes = [];
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import dom from '../scripts/dom';
|
||||
import { appRouter } from './appRouter';
|
||||
import { ConnectionManager } from 'jellyfin-apiclient';
|
||||
import Dashboard from '../scripts/clientUtils';
|
||||
|
||||
function onGroupedCardClick(e, card) {
|
||||
const itemId = card.getAttribute('data-id');
|
||||
|
|
|
@ -10,6 +10,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
import '../../elements/emby-scroller/emby-scroller';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import './homesections.css';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import '../../elements/emby-button/paper-icon-button-light';
|
|||
import '../../elements/emby-select/emby-select';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import '../../assets/css/flexstyles.css';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
export default function (page, providerId, options) {
|
||||
function reload() {
|
||||
|
|
|
@ -5,6 +5,7 @@ import '../../elements/emby-checkbox/emby-checkbox';
|
|||
import '../../elements/emby-input/emby-input';
|
||||
import '../listview/listview.css';
|
||||
import '../../elements/emby-button/paper-icon-button-light';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
export default function (page, providerId, options) {
|
||||
function getListingProvider(config, id) {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import './viewManager/viewContainer.css';
|
||||
import Dashboard from '../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
function setControllerClass(view, options) {
|
||||
|
|
|
@ -18,6 +18,7 @@ import '../../elements/emby-button/emby-button';
|
|||
import '../../assets/css/flexstyles.css';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import taskButton from '../../scripts/taskbutton';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import loading from '../../../components/loading/loading';
|
|||
import dom from '../../../scripts/dom';
|
||||
import '../../../elements/emby-input/emby-input';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import { localeWithSuffix } from '../../../scripts/dfnshelper';
|
|||
import '../../../elements/emby-button/emby-button';
|
||||
import '../../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import '../../../components/cardbuilder/card.css';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import '../../../elements/emby-button/emby-button';
|
|||
import '../../../elements/emby-input/emby-input';
|
||||
import '../../../elements/emby-checkbox/emby-checkbox';
|
||||
import '../../../components/listview/listview.css';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'jquery';
|
|||
import loading from '../../../components/loading/loading';
|
||||
import libraryMenu from '../../../scripts/libraryMenu';
|
||||
import globalize from '../../../scripts/globalize';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import loading from '../../components/loading/loading';
|
|||
import globalize from '../../scripts/globalize';
|
||||
import dom from '../../scripts/dom';
|
||||
import libraryMenu from '../../scripts/libraryMenu';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import '../../elements/emby-input/emby-input';
|
|||
import '../../elements/emby-select/emby-select';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import AppInfo from '../../components/AppInfo';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import dom from '../../scripts/dom';
|
|||
import imageHelper from '../../scripts/imagehelper';
|
||||
import '../../components/cardbuilder/card.css';
|
||||
import '../../elements/emby-itemrefreshindicator/emby-itemrefreshindicator';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import loading from '../../components/loading/loading';
|
|||
import libraryMenu from '../../scripts/libraryMenu';
|
||||
import '../../elements/emby-checkbox/emby-checkbox';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import loading from '../../components/loading/loading';
|
|||
import libraryMenu from '../../scripts/libraryMenu';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import '../../components/listview/listview.css';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'jquery';
|
|||
import loading from '../../components/loading/loading';
|
||||
import libraryMenu from '../../scripts/libraryMenu';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import loading from '../../components/loading/loading';
|
|||
import globalize from '../../scripts/globalize';
|
||||
import '../../elements/emby-checkbox/emby-checkbox';
|
||||
import '../../elements/emby-select/emby-select';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'jquery';
|
||||
import '../../../../elements/emby-checkbox/emby-checkbox';
|
||||
import Dashboard from '../../../../scripts/clientUtils';
|
||||
|
||||
function fillItems(elem, items, cssClass, idPrefix, currentList, isEnabledList) {
|
||||
let html = '<div class="checkboxList paperList" style="padding: .5em 1em;">';
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'jquery';
|
|||
import loading from '../../components/loading/loading';
|
||||
import libraryMenu from '../../scripts/libraryMenu';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'jquery';
|
|||
import loading from '../../../../components/loading/loading';
|
||||
import globalize from '../../../../scripts/globalize';
|
||||
import '../../../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../../../scripts/clientUtils';
|
||||
|
||||
function populateHistory(packageInfo, page) {
|
||||
let html = '';
|
||||
|
|
|
@ -4,6 +4,7 @@ import dom from '../../../../scripts/dom';
|
|||
import globalize from '../../../../scripts/globalize';
|
||||
import '../../../../components/cardbuilder/card.css';
|
||||
import '../../../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../../../scripts/clientUtils';
|
||||
|
||||
function deletePlugin(page, uniqueid, name) {
|
||||
const msg = globalize.translate('UninstallPluginConfirmation', name);
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'jquery';
|
|||
import libraryMenu from '../../scripts/libraryMenu';
|
||||
import loading from '../../components/loading/loading';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'jquery';
|
|||
import loading from '../../../components/loading/loading';
|
||||
import libraryMenu from '../../../scripts/libraryMenu';
|
||||
import globalize from '../../../scripts/globalize';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'jquery';
|
|||
import loading from '../../../components/loading/loading';
|
||||
import libraryMenu from '../../../scripts/libraryMenu';
|
||||
import globalize from '../../../scripts/globalize';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'jquery';
|
|||
import loading from '../../../components/loading/loading';
|
||||
import globalize from '../../../scripts/globalize';
|
||||
import '../../../elements/emby-checkbox/emby-checkbox';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import loading from '../../../components/loading/loading';
|
|||
import libraryMenu from '../../../scripts/libraryMenu';
|
||||
import globalize from '../../../scripts/globalize';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import '../../../components/cardbuilder/card.css';
|
|||
import '../../../elements/emby-button/emby-button';
|
||||
import '../../../components/indicators/indicators.css';
|
||||
import '../../../assets/css/flexstyles.css';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ import '../../elements/emby-ratingbutton/emby-ratingbutton';
|
|||
import '../../elements/emby-scroller/emby-scroller';
|
||||
import '../../elements/emby-select/emby-select';
|
||||
import itemShortcuts from '../../components/shortcuts';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
function getPromise(apiClient, params) {
|
||||
const id = params.id;
|
||||
|
|
|
@ -4,6 +4,7 @@ import imageLoader from '../../components/images/imageLoader';
|
|||
import '../../scripts/livetvcomponents';
|
||||
import '../../components/listview/listview.css';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
function renderRecordings(elem, recordings, cardOptions, scrollX) {
|
||||
if (!elem) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import loading from '../../components/loading/loading';
|
|||
import '../../scripts/livetvcomponents';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
function enableScrollX() {
|
||||
return !layoutManager.desktop;
|
||||
|
|
|
@ -10,6 +10,7 @@ import '../../assets/css/scrollstyles.css';
|
|||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import '../../elements/emby-tabs/emby-tabs';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
function enableScrollX() {
|
||||
return !layoutManager.desktop;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { Events } from 'jellyfin-apiclient';
|
||||
import loading from '../components/loading/loading';
|
||||
import globalize from '../scripts/globalize';
|
||||
import Dashboard from '../scripts/clientUtils';
|
||||
|
||||
function onListingsSubmitted() {
|
||||
Dashboard.navigate('livetvstatus.html');
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'jquery';
|
|||
import loading from '../components/loading/loading';
|
||||
import globalize from '../scripts/globalize';
|
||||
import '../elements/emby-button/emby-button';
|
||||
import Dashboard from '../scripts/clientUtils';
|
||||
|
||||
function loadPage(page, config) {
|
||||
$('.liveTvSettingsForm', page).show();
|
||||
|
|
|
@ -11,6 +11,7 @@ import '../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
import '../components/cardbuilder/card.css';
|
||||
import 'material-design-icons-iconfont';
|
||||
import '../elements/emby-button/emby-button';
|
||||
import Dashboard from '../scripts/clientUtils';
|
||||
|
||||
const enableFocusTransform = !browser.slow && !browser.edge;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import '../elements/emby-input/emby-input';
|
|||
import '../elements/emby-button/emby-button';
|
||||
import '../elements/emby-checkbox/emby-checkbox';
|
||||
import '../elements/emby-select/emby-select';
|
||||
import Dashboard from '../scripts/clientUtils';
|
||||
|
||||
function isM3uVariant(type) {
|
||||
return ['nextpvr'].indexOf(type || '') !== -1;
|
||||
|
|
|
@ -14,6 +14,7 @@ import '../../elements/emby-scroller/emby-scroller';
|
|||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import '../../elements/emby-tabs/emby-tabs';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
import '../../elements/emby-tabs/emby-tabs';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import '../../assets/css/flexstyles.css';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import loading from '../../components/loading/loading';
|
|||
import * as userSettings from '../../scripts/settings/userSettings';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import appSettings from '../../../scripts/settings/appSettings';
|
|||
import loading from '../../../components/loading/loading';
|
||||
import globalize from '../../../scripts/globalize';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import globalize from '../../../scripts/globalize';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { appHost } from '../../../components/apphost';
|
||||
import appSettings from '../../../scripts/settings/appSettings';
|
||||
import dom from '../../../scripts/dom';
|
||||
import { ConnectionManager } from 'jellyfin-apiclient';
|
||||
import loading from '../../../components/loading/loading';
|
||||
import layoutManager from '../../../components/layoutManager';
|
||||
import libraryMenu from '../../../scripts/libraryMenu';
|
||||
|
@ -9,6 +8,7 @@ import browser from '../../../scripts/browser';
|
|||
import globalize from '../../../scripts/globalize';
|
||||
import '../../../components/cardbuilder/card.css';
|
||||
import '../../../elements/emby-checkbox/emby-checkbox';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import globalize from '../../../scripts/globalize';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import '../../../elements/emby-scroller/emby-scroller';
|
|||
import '../../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import '../../../components/cardbuilder/card.css';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import cardBuilder from '../../components/cardbuilder/cardBuilder';
|
|||
import * as userSettings from '../../scripts/settings/userSettings';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ import globalize from '../../scripts/globalize';
|
|||
import '../../assets/css/scrollstyles.css';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import '../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import { appHost } from '../../../components/apphost';
|
|||
import '../../../components/listview/listview.css';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import layoutManager from '../../../components/layoutManager';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
export default function (view, params) {
|
||||
view.querySelector('.btnLogout').addEventListener('click', function () {
|
||||
|
|
|
@ -4,6 +4,7 @@ import libraryMenu from '../../../scripts/libraryMenu';
|
|||
import { appHost } from '../../../components/apphost';
|
||||
import globalize from '../../../scripts/globalize';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
function reloadUser(page) {
|
||||
const userId = getParameterByName('userId');
|
||||
|
|
|
@ -2,6 +2,7 @@ import loading from '../../../components/loading/loading';
|
|||
import '../../../elements/emby-checkbox/emby-checkbox';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import '../../../elements/emby-select/emby-select';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
function save(page) {
|
||||
loading.show();
|
||||
|
|
|
@ -2,6 +2,7 @@ import loading from '../../../components/loading/loading';
|
|||
import '../../../elements/emby-checkbox/emby-checkbox';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import '../../../elements/emby-select/emby-select';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
function save(page) {
|
||||
loading.show();
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'jquery';
|
|||
import loading from '../../../components/loading/loading';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import '../../../elements/emby-select/emby-select';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
function loadPage(page, config, languageOptions) {
|
||||
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) {
|
||||
|
|
|
@ -3,6 +3,7 @@ import globalize from '../../../scripts/globalize';
|
|||
import '../../../assets/css/dashboard.css';
|
||||
import '../../../elements/emby-input/emby-input';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
function getApiClient() {
|
||||
return ApiClient;
|
||||
|
|
|
@ -182,9 +182,7 @@ export function confirm(message, title, callback) {
|
|||
});
|
||||
}
|
||||
|
||||
// This is used in plugins and templates, so keep it defined for now.
|
||||
// TODO: Remove once plugins don't need it
|
||||
window.Dashboard = {
|
||||
const Dashboard = {
|
||||
alert,
|
||||
capabilities,
|
||||
confirm,
|
||||
|
@ -203,21 +201,8 @@ window.Dashboard = {
|
|||
showLoadingMsg
|
||||
};
|
||||
|
||||
export default {
|
||||
alert,
|
||||
capabilities,
|
||||
confirm,
|
||||
getPluginUrl,
|
||||
getCurrentUser,
|
||||
getCurrentUserId,
|
||||
hideLoadingMsg,
|
||||
logout,
|
||||
navigate,
|
||||
onServerChanged,
|
||||
processErrorResponse,
|
||||
processPluginConfigurationUpdateResult,
|
||||
processServerConfigurationUpdateResult,
|
||||
selectServer,
|
||||
serverAddress,
|
||||
showLoadingMsg
|
||||
};
|
||||
// This is used in plugins and templates, so keep it defined for now.
|
||||
// TODO: Remove once plugins don't need it
|
||||
window.Dashboard = Dashboard;
|
||||
|
||||
export default Dashboard;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'jquery';
|
||||
import globalize from './globalize';
|
||||
import 'material-design-icons-iconfont';
|
||||
import Dashboard from './clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import '../elements/emby-button/paper-icon-button-light';
|
|||
import 'material-design-icons-iconfont';
|
||||
import '../assets/css/scrollstyles.css';
|
||||
import '../assets/css/flexstyles.css';
|
||||
import Dashboard from './clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import libraryBrowser from 'libraryBrowser';
|
|||
import imageLoader from 'imageLoader';
|
||||
import * as userSettings from '../scripts/settings/userSettings';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import Dashboard from './clientUtils';
|
||||
|
||||
export default function (view, params) {
|
||||
function getPageData(context) {
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'resize-observer-polyfill';
|
|||
import 'jellyfin-noto';
|
||||
import '../assets/css/site.css';
|
||||
import AppInfo from '../components/AppInfo';
|
||||
import Dashboard from './clientUtils';
|
||||
|
||||
// TODO: Move this elsewhere
|
||||
window.getWindowLocationSearch = function(win) {
|
||||
|
@ -115,10 +116,9 @@ function initClient() {
|
|||
console.debug('loading ApiClient singleton');
|
||||
|
||||
return Promise.all([
|
||||
import('jellyfin-apiclient'),
|
||||
import('./clientUtils')
|
||||
import('jellyfin-apiclient')
|
||||
])
|
||||
.then(([{ ApiClient }, clientUtils]) => {
|
||||
.then(([{ ApiClient }]) => {
|
||||
console.debug('creating ApiClient singleton');
|
||||
|
||||
var apiClient = new ApiClient(Dashboard.serverAddress(), appHost.appName(), appHost.appVersion(), appHost.deviceName(), appHost.deviceId());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue