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