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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue