Merge pull request #3554 from thornbill/move-util-files

This commit is contained in:
Bill Thornton 2022-04-12 08:12:29 -04:00 committed by GitHub
commit 92d249354c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
64 changed files with 68 additions and 68 deletions

View File

@ -1,6 +1,6 @@
import { ConnectionManager, Credentials, ApiClient, Events } from 'jellyfin-apiclient'; import { ConnectionManager, Credentials, ApiClient, Events } from 'jellyfin-apiclient';
import { appHost } from './apphost'; import { appHost } from './apphost';
import Dashboard from '../scripts/clientUtils'; import Dashboard from '../utils/dashboard';
import { setUserInfo } from '../scripts/settings/userSettings'; import { setUserInfo } from '../scripts/settings/userSettings';
class ServerConnections extends ConnectionManager { class ServerConnections extends ConnectionManager {

View File

@ -8,7 +8,7 @@ import itemHelper from './itemHelper';
import loading from './loading/loading'; import loading from './loading/loading';
import page from 'page'; import page from 'page';
import viewManager from './viewManager/viewManager'; import viewManager from './viewManager/viewManager';
import Dashboard from '../scripts/clientUtils'; import Dashboard from '../utils/dashboard';
import ServerConnections from './ServerConnections'; import ServerConnections from './ServerConnections';
import alert from './alert'; import alert from './alert';
import reactControllerFactory from './reactControllerFactory'; import reactControllerFactory from './reactControllerFactory';

View File

@ -1,6 +1,6 @@
import { UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client'; import { UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
import React, { FunctionComponent, useCallback, useEffect, useRef } from 'react'; import React, { FunctionComponent, useCallback, useEffect, useRef } from 'react';
import Dashboard from '../../../scripts/clientUtils'; import Dashboard from '../../../utils/dashboard';
import globalize from '../../../scripts/globalize'; import globalize from '../../../scripts/globalize';
import LibraryMenu from '../../../scripts/libraryMenu'; import LibraryMenu from '../../../scripts/libraryMenu';
import confirm from '../../confirm/confirm'; import confirm from '../../confirm/confirm';

View File

@ -2,7 +2,7 @@
import dom from '../scripts/dom'; import dom from '../scripts/dom';
import { appRouter } from './appRouter'; import { appRouter } from './appRouter';
import Dashboard from '../scripts/clientUtils'; import Dashboard from '../utils/dashboard';
import ServerConnections from './ServerConnections'; import ServerConnections from './ServerConnections';
function onGroupedCardClick(e, card) { function onGroupedCardClick(e, card) {

View File

@ -11,7 +11,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.scss'; import './homesections.scss';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
import ServerConnections from '../ServerConnections'; import ServerConnections from '../ServerConnections';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -1,6 +1,6 @@
import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react'; import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
import globalize from '../../scripts/globalize'; import globalize from '../../scripts/globalize';
import loading from '../loading/loading'; import loading from '../loading/loading';
import toast from '../toast/toast'; import toast from '../toast/toast';

View File

@ -1,6 +1,6 @@
import { SyncPlayUserAccessType, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client'; import { SyncPlayUserAccessType, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react'; import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
import globalize from '../../scripts/globalize'; import globalize from '../../scripts/globalize';
import LibraryMenu from '../../scripts/libraryMenu'; import LibraryMenu from '../../scripts/libraryMenu';
import ButtonElement from '../dashboard/users/ButtonElement'; import ButtonElement from '../dashboard/users/ButtonElement';

View File

@ -1,7 +1,7 @@
import { ImageType, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client'; import { ImageType, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
import React, { FunctionComponent, useEffect, useState, useRef, useCallback } from 'react'; import React, { FunctionComponent, useEffect, useState, useRef, useCallback } from 'react';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
import globalize from '../../scripts/globalize'; import globalize from '../../scripts/globalize';
import LibraryMenu from '../../scripts/libraryMenu'; import LibraryMenu from '../../scripts/libraryMenu';
import { appHost } from '../apphost'; import { appHost } from '../apphost';

View File

@ -1,6 +1,6 @@
import { UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client'; import { UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
import React, {FunctionComponent, useEffect, useState, useRef} from 'react'; import React, {FunctionComponent, useEffect, useState, useRef} from 'react';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
import globalize from '../../scripts/globalize'; import globalize from '../../scripts/globalize';
import loading from '../loading/loading'; import loading from '../loading/loading';
import dom from '../../scripts/dom'; import dom from '../../scripts/dom';

View File

@ -5,7 +5,7 @@
import { Events } from 'jellyfin-apiclient'; import { Events } from 'jellyfin-apiclient';
import browser from '../../../scripts/browser'; import browser from '../../../scripts/browser';
import { toBoolean, toFloat } from '../../../scripts/stringUtils'; import { toBoolean, toFloat } from '../../../utils/string.ts';
import * as Helper from './Helper'; import * as Helper from './Helper';
import { getSetting } from './Settings'; import { getSetting } from './Settings';

View File

@ -5,7 +5,7 @@
import { Events } from 'jellyfin-apiclient'; import { Events } from 'jellyfin-apiclient';
import appSettings from '../../../../scripts/settings/appSettings'; import appSettings from '../../../../scripts/settings/appSettings';
import { toFloat } from '../../../../scripts/stringUtils'; import { toFloat } from '../../../../utils/string.ts';
import { getSetting } from '../Settings'; import { getSetting } from '../Settings';
import TimeSyncServer from './TimeSyncServer'; import TimeSyncServer from './TimeSyncServer';

View File

@ -8,7 +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.scss'; import '../../assets/css/flexstyles.scss';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
import { Events } from 'jellyfin-apiclient'; import { Events } from 'jellyfin-apiclient';
export default function (page, providerId, options) { export default function (page, providerId, options) {

View File

@ -5,7 +5,7 @@ import '../../elements/emby-checkbox/emby-checkbox';
import '../../elements/emby-input/emby-input'; import '../../elements/emby-input/emby-input';
import '../listview/listview.scss'; import '../listview/listview.scss';
import '../../elements/emby-button/paper-icon-button-light'; import '../../elements/emby-button/paper-icon-button-light';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
import { Events } from 'jellyfin-apiclient'; import { Events } from 'jellyfin-apiclient';
export default function (page, providerId, options) { export default function (page, providerId, options) {

View File

@ -1,6 +1,6 @@
import { importModule } from '@uupaa/dynamic-import-polyfill'; import { importModule } from '@uupaa/dynamic-import-polyfill';
import './viewManager/viewContainer.scss'; import './viewManager/viewContainer.scss';
import Dashboard from '../scripts/clientUtils'; import Dashboard from '../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -4,7 +4,7 @@ import dom from '../../scripts/dom';
import globalize from '../../scripts/globalize'; import globalize from '../../scripts/globalize';
import '../../elements/emby-button/emby-button'; import '../../elements/emby-button/emby-button';
import confirm from '../../components/confirm/confirm'; import confirm from '../../components/confirm/confirm';
import { pageIdOn } from '../../scripts/clientUtils'; import { pageIdOn } from '../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -19,7 +19,7 @@ import '../../elements/emby-button/emby-button';
import '../../assets/css/flexstyles.scss'; import '../../assets/css/flexstyles.scss';
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'; import Dashboard from '../../utils/dashboard';
import ServerConnections from '../../components/ServerConnections'; import ServerConnections from '../../components/ServerConnections';
import alert from '../../components/alert'; import alert from '../../components/alert';
import confirm from '../../components/confirm/confirm'; import confirm from '../../components/confirm/confirm';

View File

@ -2,7 +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'; import Dashboard from '../../../utils/dashboard';
import { getParameterByName } from '../../../utils/url.ts'; import { getParameterByName } from '../../../utils/url.ts';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -9,7 +9,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.scss'; import '../../../components/cardbuilder/card.scss';
import Dashboard from '../../../scripts/clientUtils'; import Dashboard from '../../../utils/dashboard';
import confirm from '../../../components/confirm/confirm'; import confirm from '../../../components/confirm/confirm';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -7,7 +7,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.scss'; import '../../../components/listview/listview.scss';
import Dashboard from '../../../scripts/clientUtils'; import Dashboard from '../../../utils/dashboard';
import toast from '../../../components/toast/toast'; import toast from '../../../components/toast/toast';
import { getParameterByName } from '../../../utils/url.ts'; import { getParameterByName } from '../../../utils/url.ts';

View File

@ -3,7 +3,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'; import Dashboard from '../../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -3,7 +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'; import Dashboard from '../../utils/dashboard';
import alert from '../../components/alert'; import alert from '../../components/alert';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -6,7 +6,7 @@ import '../../elements/emby-textarea/emby-textarea';
import '../../elements/emby-input/emby-input'; 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 Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
import alert from '../../components/alert'; import alert from '../../components/alert';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -8,7 +8,7 @@ import dom from '../../scripts/dom';
import imageHelper from '../../scripts/imagehelper'; import imageHelper from '../../scripts/imagehelper';
import '../../components/cardbuilder/card.scss'; import '../../components/cardbuilder/card.scss';
import '../../elements/emby-itemrefreshindicator/emby-itemrefreshindicator'; import '../../elements/emby-itemrefreshindicator/emby-itemrefreshindicator';
import Dashboard, { pageClassOn, pageIdOn } from '../../scripts/clientUtils'; import Dashboard, { pageClassOn, pageIdOn } from '../../utils/dashboard';
import confirm from '../../components/confirm/confirm'; import confirm from '../../components/confirm/confirm';
import cardBuilder from '../../components/cardbuilder/cardBuilder'; import cardBuilder from '../../components/cardbuilder/cardBuilder';

View File

@ -3,7 +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'; import Dashboard from '../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -4,7 +4,7 @@ import globalize from '../../scripts/globalize';
import '../../elements/emby-button/emby-button'; import '../../elements/emby-button/emby-button';
import '../../components/listview/listview.scss'; import '../../components/listview/listview.scss';
import '../../assets/css/flexstyles.scss'; import '../../assets/css/flexstyles.scss';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
import alert from '../../components/alert'; import alert from '../../components/alert';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -3,7 +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.scss'; import '../../components/listview/listview.scss';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -3,7 +3,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'; import Dashboard from '../../utils/dashboard';
import alert from '../../components/alert'; import alert from '../../components/alert';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -2,7 +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'; import Dashboard from '../../utils/dashboard';
import alert from '../../components/alert'; import alert from '../../components/alert';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -1,7 +1,7 @@
import escapeHtml from 'escape-html'; import escapeHtml from 'escape-html';
import 'jquery'; import 'jquery';
import '../../../../elements/emby-checkbox/emby-checkbox'; import '../../../../elements/emby-checkbox/emby-checkbox';
import Dashboard from '../../../../scripts/clientUtils'; import Dashboard from '../../../../utils/dashboard';
import { getParameterByName } from '../../../../utils/url.ts'; import { getParameterByName } from '../../../../utils/url.ts';
function fillItems(elem, items, cssClass, idPrefix, currentList, isEnabledList) { function fillItems(elem, items, cssClass, idPrefix, currentList, isEnabledList) {

View File

@ -2,7 +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'; import Dashboard from '../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -4,7 +4,7 @@ import DOMPurify from 'dompurify';
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'; import Dashboard from '../../../../utils/dashboard';
import alert from '../../../../components/alert'; import alert from '../../../../components/alert';
import confirm from '../../../../components/confirm/confirm'; import confirm from '../../../../components/confirm/confirm';

View File

@ -5,7 +5,7 @@ import globalize from '../../../../scripts/globalize';
import * as cardBuilder from '../../../../components/cardbuilder/cardBuilder.js'; import * as cardBuilder from '../../../../components/cardbuilder/cardBuilder.js';
import '../../../../components/cardbuilder/card.scss'; import '../../../../components/cardbuilder/card.scss';
import '../../../../elements/emby-button/emby-button'; import '../../../../elements/emby-button/emby-button';
import Dashboard, { pageIdOn } from '../../../../scripts/clientUtils'; import Dashboard, { pageIdOn } from '../../../../utils/dashboard';
import confirm from '../../../../components/confirm/confirm'; import confirm from '../../../../components/confirm/confirm';
function deletePlugin(page, uniqueid, version, name) { function deletePlugin(page, uniqueid, version, name) {

View File

@ -2,7 +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'; import Dashboard from '../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -29,7 +29,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'; import Dashboard from '../../utils/dashboard';
import ServerConnections from '../../components/ServerConnections'; import ServerConnections from '../../components/ServerConnections';
import confirm from '../../components/confirm/confirm'; import confirm from '../../components/confirm/confirm';
import { download } from '../../scripts/fileDownloader'; import { download } from '../../scripts/fileDownloader';

View File

@ -4,7 +4,7 @@ import imageLoader from '../../components/images/imageLoader';
import '../../scripts/livetvcomponents'; import '../../scripts/livetvcomponents';
import '../../components/listview/listview.scss'; import '../../components/listview/listview.scss';
import '../../elements/emby-itemscontainer/emby-itemscontainer'; import '../../elements/emby-itemscontainer/emby-itemscontainer';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
function renderRecordings(elem, recordings, cardOptions, scrollX) { function renderRecordings(elem, recordings, cardOptions, scrollX) {
if (!elem) { if (!elem) {

View File

@ -5,7 +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'; import Dashboard from '../../utils/dashboard';
function enableScrollX() { function enableScrollX() {
return !layoutManager.desktop; return !layoutManager.desktop;

View File

@ -10,7 +10,7 @@ import '../../assets/css/scrollstyles.scss';
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'; import Dashboard from '../../utils/dashboard';
function enableScrollX() { function enableScrollX() {
return !layoutManager.desktop; return !layoutManager.desktop;

View File

@ -1,7 +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, { pageIdOn } from '../scripts/clientUtils'; import Dashboard, { pageIdOn } from '../utils/dashboard';
import { getParameterByName } from '../utils/url.ts'; import { getParameterByName } from '../utils/url.ts';
function onListingsSubmitted() { function onListingsSubmitted() {

View File

@ -2,7 +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'; import Dashboard from '../utils/dashboard';
import alert from '../components/alert'; import alert from '../components/alert';
function loadPage(page, config) { function loadPage(page, config) {

View File

@ -12,7 +12,7 @@ import '../elements/emby-itemscontainer/emby-itemscontainer';
import '../components/cardbuilder/card.scss'; import '../components/cardbuilder/card.scss';
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'; import Dashboard from '../utils/dashboard';
import confirm from '../components/confirm/confirm'; import confirm from '../components/confirm/confirm';
const enableFocusTransform = !browser.slow && !browser.edge; const enableFocusTransform = !browser.slow && !browser.edge;

View File

@ -5,7 +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'; import Dashboard from '../utils/dashboard';
import { getParameterByName } from '../utils/url.ts'; import { getParameterByName } from '../utils/url.ts';
function isM3uVariant(type) { function isM3uVariant(type) {

View File

@ -14,7 +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'; import Dashboard from '../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -14,7 +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.scss'; import '../../assets/css/flexstyles.scss';
import Dashboard from '../../scripts/clientUtils'; import Dashboard from '../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -7,7 +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'; import Dashboard from '../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -2,7 +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'; import Dashboard from '../../../utils/dashboard';
import ServerConnections from '../../../components/ServerConnections'; import ServerConnections from '../../../components/ServerConnections';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -1,5 +1,5 @@
import globalize from '../../../scripts/globalize'; import globalize from '../../../scripts/globalize';
import Dashboard from '../../../scripts/clientUtils'; import Dashboard from '../../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -10,7 +10,7 @@ import browser from '../../../scripts/browser';
import globalize from '../../../scripts/globalize'; import globalize from '../../../scripts/globalize';
import '../../../components/cardbuilder/card.scss'; import '../../../components/cardbuilder/card.scss';
import '../../../elements/emby-checkbox/emby-checkbox'; import '../../../elements/emby-checkbox/emby-checkbox';
import Dashboard from '../../../scripts/clientUtils'; import Dashboard from '../../../utils/dashboard';
import ServerConnections from '../../../components/ServerConnections'; import ServerConnections from '../../../components/ServerConnections';
import toast from '../../../components/toast/toast'; import toast from '../../../components/toast/toast';
import dialogHelper from '../../../components/dialogHelper/dialogHelper'; import dialogHelper from '../../../components/dialogHelper/dialogHelper';

View File

@ -1,5 +1,5 @@
import globalize from '../../../scripts/globalize'; import globalize from '../../../scripts/globalize';
import Dashboard from '../../../scripts/clientUtils'; import Dashboard from '../../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -15,7 +15,7 @@ import '../../../elements/emby-scroller/emby-scroller';
import '../../../elements/emby-itemscontainer/emby-itemscontainer'; import '../../../elements/emby-itemscontainer/emby-itemscontainer';
import '../../../components/cardbuilder/card.scss'; import '../../../components/cardbuilder/card.scss';
import '../../../elements/emby-button/emby-button'; import '../../../elements/emby-button/emby-button';
import Dashboard from '../../../scripts/clientUtils'; import Dashboard from '../../../utils/dashboard';
import ServerConnections from '../../../components/ServerConnections'; import ServerConnections from '../../../components/ServerConnections';
import alert from '../../../components/alert'; import alert from '../../../components/alert';
import cardBuilder from '../../../components/cardbuilder/cardBuilder'; import cardBuilder from '../../../components/cardbuilder/cardBuilder';

View File

@ -7,7 +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'; import Dashboard from '../../utils/dashboard';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -13,7 +13,7 @@ import globalize from '../../scripts/globalize';
import '../../assets/css/scrollstyles.scss'; import '../../assets/css/scrollstyles.scss';
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'; import Dashboard from '../../utils/dashboard';
import autoFocuser from '../../components/autoFocuser'; import autoFocuser from '../../components/autoFocuser';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -2,7 +2,7 @@ import { appHost } from '../../../components/apphost';
import '../../../components/listview/listview.scss'; import '../../../components/listview/listview.scss';
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'; import Dashboard from '../../../utils/dashboard';
export default function (view, params) { export default function (view, params) {
view.querySelector('.btnLogout').addEventListener('click', function () { view.querySelector('.btnLogout').addEventListener('click', function () {

View File

@ -2,7 +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'; import Dashboard from '../../../utils/dashboard';
function save(page) { function save(page) {
loading.show(); loading.show();

View File

@ -2,7 +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'; import Dashboard from '../../../utils/dashboard';
function save(page) { function save(page) {
loading.show(); loading.show();

View File

@ -2,7 +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'; import Dashboard from '../../../utils/dashboard';
function loadPage(page, config, languageOptions) { function loadPage(page, config, languageOptions) {
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) { $('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) {

View File

@ -3,7 +3,7 @@ import globalize from '../../../scripts/globalize';
import '../../../assets/css/dashboard.scss'; import '../../../assets/css/dashboard.scss';
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'; import Dashboard from '../../../utils/dashboard';
import toast from '../../../components/toast/toast'; import toast from '../../../components/toast/toast';
function getApiClient() { function getApiClient() {

View File

@ -1,7 +1,7 @@
import backdrop from '../components/backdrop/backdrop'; import backdrop from '../components/backdrop/backdrop';
import * as userSettings from './settings/userSettings'; import * as userSettings from './settings/userSettings';
import libraryMenu from './libraryMenu'; import libraryMenu from './libraryMenu';
import { pageClassOn } from './clientUtils'; import { pageClassOn } from '../utils/dashboard';
const cache = {}; const cache = {};

View File

@ -2,7 +2,7 @@ import * as userSettings from './settings/userSettings';
import skinManager from './themeManager'; import skinManager from './themeManager';
import { Events } from 'jellyfin-apiclient'; import { Events } from 'jellyfin-apiclient';
import ServerConnections from '../components/ServerConnections'; import ServerConnections from '../components/ServerConnections';
import { pageClassOn } from '../scripts/clientUtils'; import { pageClassOn } from '../utils/dashboard';
// Set the default theme when loading // Set the default theme when loading
skinManager.setTheme(userSettings.theme()) skinManager.setTheme(userSettings.theme())

View File

@ -2,7 +2,7 @@ import escapeHtml from 'escape-html';
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'; import Dashboard from '../utils/dashboard';
import { getParameterByName } from '../utils/url.ts'; import { getParameterByName } from '../utils/url.ts';
/* eslint-disable indent */ /* eslint-disable indent */

View File

@ -16,7 +16,7 @@ import '../elements/emby-button/paper-icon-button-light';
import 'material-design-icons-iconfont'; import 'material-design-icons-iconfont';
import '../assets/css/scrollstyles.scss'; import '../assets/css/scrollstyles.scss';
import '../assets/css/flexstyles.scss'; import '../assets/css/flexstyles.scss';
import Dashboard, { pageClassOn } from './clientUtils'; import Dashboard, { pageClassOn } from '../utils/dashboard';
import ServerConnections from '../components/ServerConnections'; import ServerConnections from '../components/ServerConnections';
import Headroom from 'headroom.js'; import Headroom from 'headroom.js';
import { getParameterByName } from '../utils/url.ts'; import { getParameterByName } from '../utils/url.ts';

View File

@ -6,7 +6,7 @@ import libraryBrowser from './libraryBrowser';
import imageLoader from '../components/images/imageLoader'; import imageLoader from '../components/images/imageLoader';
import * as userSettings from './settings/userSettings'; import * as userSettings from './settings/userSettings';
import '../elements/emby-itemscontainer/emby-itemscontainer'; import '../elements/emby-itemscontainer/emby-itemscontainer';
import Dashboard from './clientUtils'; import Dashboard from '../utils/dashboard';
export default function (view) { export default function (view) {
function getPageData(context) { function getPageData(context) {

View File

@ -25,7 +25,7 @@ import './libraryMenu';
import './routes'; import './routes';
import '../components/themeMediaPlayer'; import '../components/themeMediaPlayer';
import './autoBackdrops'; import './autoBackdrops';
import { pageClassOn, serverAddress } from './clientUtils'; import { pageClassOn, serverAddress } from '../utils/dashboard';
import './screensavermanager'; import './screensavermanager';
import './serverNotifications'; import './serverNotifications';
import '../components/playback/playerSelectionMenu'; import '../components/playback/playerSelectionMenu';

View File

@ -5,12 +5,12 @@ import { appRouter } from '../components/appRouter';
import baseAlert from '../components/alert'; import baseAlert from '../components/alert';
import baseConfirm from '../components/confirm/confirm'; import baseConfirm from '../components/confirm/confirm';
import globalize from '../scripts/globalize'; import globalize from '../scripts/globalize';
import * as webSettings from './settings/webSettings'; import * as webSettings from '../scripts/settings/webSettings';
import datetime from '../scripts/datetime'; import datetime from '../scripts/datetime';
import DirectoryBrowser from '../components/directorybrowser/directorybrowser'; import DirectoryBrowser from '../components/directorybrowser/directorybrowser';
import dialogHelper from '../components/dialogHelper/dialogHelper'; import dialogHelper from '../components/dialogHelper/dialogHelper';
import itemIdentifier from '../components/itemidentifier/itemidentifier'; import itemIdentifier from '../components/itemidentifier/itemidentifier';
import { getLocationSearch } from '../utils/url.ts'; import { getLocationSearch } from './url.ts';
export function getCurrentUser() { export function getCurrentUser() {
return window.ApiClient.getCurrentUser(false); return window.ApiClient.getCurrentUser(false);
@ -86,7 +86,7 @@ export function getCurrentUserId() {
return null; return null;
} }
export function onServerChanged(userId, accessToken, apiClient) { export function onServerChanged(_userId, _accessToken, apiClient) {
ServerConnections.setLocalApiClient(apiClient); ServerConnections.setLocalApiClient(apiClient);
} }

View File

@ -4,7 +4,7 @@
* @param {boolean} defaultValue The default value if the string is invalid. * @param {boolean} defaultValue The default value if the string is invalid.
* @returns {boolean} The value. * @returns {boolean} The value.
*/ */
export function toBoolean(value, defaultValue = false) { export function toBoolean(value: string | undefined | null, defaultValue = false) {
if (value !== 'true' && value !== 'false') { if (value !== 'true' && value !== 'false') {
return defaultValue; return defaultValue;
} else { } else {
@ -18,8 +18,8 @@ export function toBoolean(value, defaultValue = false) {
* @param {number} defaultValue The default value if the string is invalid. * @param {number} defaultValue The default value if the string is invalid.
* @returns {number} The value. * @returns {number} The value.
*/ */
export function toFloat(value, defaultValue = 0) { export function toFloat(value: string | null | undefined, defaultValue = 0) {
if (value === null || value === '' || isNaN(value)) { if (!value || isNaN(value as never)) {
return defaultValue; return defaultValue;
} else { } else {
return parseFloat(value); return parseFloat(value);