From 2d2b99d3b9b16487e5dbc1d05da9479c0312a8eb Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Sun, 10 Apr 2022 02:22:13 -0400 Subject: [PATCH] Move clientUtils and rename --- src/components/ServerConnections.js | 2 +- src/components/appRouter.js | 2 +- src/components/dashboard/users/UserPasswordForm.tsx | 2 +- src/components/groupedcards.js | 2 +- src/components/homesections/homesections.js | 2 +- src/components/pages/NewUserPage.tsx | 2 +- src/components/pages/UserEditPage.tsx | 2 +- src/components/pages/UserProfilePage.tsx | 2 +- src/components/pages/UserProfilesPage.tsx | 2 +- src/components/tvproviders/schedulesdirect.js | 2 +- src/components/tvproviders/xmltv.js | 2 +- src/components/viewContainer.js | 2 +- src/controllers/dashboard/apikeys.js | 2 +- src/controllers/dashboard/dashboard.js | 2 +- src/controllers/dashboard/devices/device.js | 2 +- src/controllers/dashboard/devices/devices.js | 2 +- src/controllers/dashboard/dlna/profile.js | 2 +- src/controllers/dashboard/dlna/settings.js | 2 +- src/controllers/dashboard/encodingsettings.js | 2 +- src/controllers/dashboard/general.js | 2 +- src/controllers/dashboard/library.js | 2 +- src/controllers/dashboard/librarydisplay.js | 2 +- src/controllers/dashboard/logs.js | 2 +- src/controllers/dashboard/metadataImages.js | 2 +- src/controllers/dashboard/metadatanfo.js | 2 +- src/controllers/dashboard/networking.js | 2 +- src/controllers/dashboard/notifications/notification/index.js | 2 +- src/controllers/dashboard/playback.js | 2 +- src/controllers/dashboard/plugins/add/index.js | 2 +- src/controllers/dashboard/plugins/installed/index.js | 2 +- src/controllers/dashboard/streaming.js | 2 +- src/controllers/itemDetails/index.js | 2 +- src/controllers/livetv/livetvrecordings.js | 2 +- src/controllers/livetv/livetvschedule.js | 2 +- src/controllers/livetv/livetvsuggested.js | 2 +- src/controllers/livetvguideprovider.js | 2 +- src/controllers/livetvsettings.js | 2 +- src/controllers/livetvstatus.js | 2 +- src/controllers/livetvtuner.js | 2 +- src/controllers/movies/moviesrecommended.js | 2 +- src/controllers/music/musicrecommended.js | 2 +- src/controllers/music/songs.js | 2 +- src/controllers/session/addServer/index.js | 2 +- src/controllers/session/forgotPassword/index.js | 2 +- src/controllers/session/login/index.js | 2 +- src/controllers/session/resetPassword/index.js | 2 +- src/controllers/session/selectServer/index.js | 2 +- src/controllers/shows/episodes.js | 2 +- src/controllers/shows/tvrecommended.js | 2 +- src/controllers/user/menu/index.js | 2 +- src/controllers/wizard/remote/index.js | 2 +- src/controllers/wizard/settings/index.js | 2 +- src/controllers/wizard/start/index.js | 2 +- src/controllers/wizard/user/index.js | 2 +- src/scripts/autoBackdrops.js | 2 +- src/scripts/autoThemes.js | 2 +- src/scripts/editorsidebar.js | 2 +- src/scripts/libraryMenu.js | 2 +- src/scripts/playlists.js | 2 +- src/scripts/site.js | 2 +- src/{scripts/clientUtils.js => utils/dashboard.js} | 4 ++-- 61 files changed, 62 insertions(+), 62 deletions(-) rename src/{scripts/clientUtils.js => utils/dashboard.js} (98%) diff --git a/src/components/ServerConnections.js b/src/components/ServerConnections.js index e30bdce0c2..7e42432b56 100644 --- a/src/components/ServerConnections.js +++ b/src/components/ServerConnections.js @@ -1,6 +1,6 @@ import { ConnectionManager, Credentials, ApiClient, Events } from 'jellyfin-apiclient'; import { appHost } from './apphost'; -import Dashboard from '../scripts/clientUtils'; +import Dashboard from '../utils/dashboard'; import { setUserInfo } from '../scripts/settings/userSettings'; class ServerConnections extends ConnectionManager { diff --git a/src/components/appRouter.js b/src/components/appRouter.js index 16248c4d80..30ba7ebc7b 100644 --- a/src/components/appRouter.js +++ b/src/components/appRouter.js @@ -8,7 +8,7 @@ import itemHelper from './itemHelper'; import loading from './loading/loading'; import page from 'page'; import viewManager from './viewManager/viewManager'; -import Dashboard from '../scripts/clientUtils'; +import Dashboard from '../utils/dashboard'; import ServerConnections from './ServerConnections'; import alert from './alert'; import reactControllerFactory from './reactControllerFactory'; diff --git a/src/components/dashboard/users/UserPasswordForm.tsx b/src/components/dashboard/users/UserPasswordForm.tsx index 6f14142207..e387090949 100644 --- a/src/components/dashboard/users/UserPasswordForm.tsx +++ b/src/components/dashboard/users/UserPasswordForm.tsx @@ -1,6 +1,6 @@ import { UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client'; import React, { FunctionComponent, useCallback, useEffect, useRef } from 'react'; -import Dashboard from '../../../scripts/clientUtils'; +import Dashboard from '../../../utils/dashboard'; import globalize from '../../../scripts/globalize'; import LibraryMenu from '../../../scripts/libraryMenu'; import confirm from '../../confirm/confirm'; diff --git a/src/components/groupedcards.js b/src/components/groupedcards.js index 13158016ac..63cc39f99a 100644 --- a/src/components/groupedcards.js +++ b/src/components/groupedcards.js @@ -2,7 +2,7 @@ import dom from '../scripts/dom'; import { appRouter } from './appRouter'; -import Dashboard from '../scripts/clientUtils'; +import Dashboard from '../utils/dashboard'; import ServerConnections from './ServerConnections'; function onGroupedCardClick(e, card) { diff --git a/src/components/homesections/homesections.js b/src/components/homesections/homesections.js index 320dc94471..9fa440b1a2 100644 --- a/src/components/homesections/homesections.js +++ b/src/components/homesections/homesections.js @@ -11,7 +11,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer'; import '../../elements/emby-scroller/emby-scroller'; import '../../elements/emby-button/emby-button'; import './homesections.scss'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; import ServerConnections from '../ServerConnections'; /* eslint-disable indent */ diff --git a/src/components/pages/NewUserPage.tsx b/src/components/pages/NewUserPage.tsx index bf1e5327c5..9c8110310c 100644 --- a/src/components/pages/NewUserPage.tsx +++ b/src/components/pages/NewUserPage.tsx @@ -1,6 +1,6 @@ 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 loading from '../loading/loading'; import toast from '../toast/toast'; diff --git a/src/components/pages/UserEditPage.tsx b/src/components/pages/UserEditPage.tsx index 757a203c00..df39225dd9 100644 --- a/src/components/pages/UserEditPage.tsx +++ b/src/components/pages/UserEditPage.tsx @@ -1,6 +1,6 @@ import { SyncPlayUserAccessType, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client'; 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 LibraryMenu from '../../scripts/libraryMenu'; import { appRouter } from '../appRouter'; diff --git a/src/components/pages/UserProfilePage.tsx b/src/components/pages/UserProfilePage.tsx index 615e293c47..c7d4d0b4db 100644 --- a/src/components/pages/UserProfilePage.tsx +++ b/src/components/pages/UserProfilePage.tsx @@ -1,7 +1,7 @@ import { ImageType, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client'; 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 LibraryMenu from '../../scripts/libraryMenu'; import { appHost } from '../apphost'; diff --git a/src/components/pages/UserProfilesPage.tsx b/src/components/pages/UserProfilesPage.tsx index 0444fd720a..8ed6c0cc4c 100644 --- a/src/components/pages/UserProfilesPage.tsx +++ b/src/components/pages/UserProfilesPage.tsx @@ -1,6 +1,6 @@ import { UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client'; import React, {FunctionComponent, useEffect, useState, useRef} from 'react'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; import globalize from '../../scripts/globalize'; import loading from '../loading/loading'; import dom from '../../scripts/dom'; diff --git a/src/components/tvproviders/schedulesdirect.js b/src/components/tvproviders/schedulesdirect.js index 1d0e8a49f2..a9135ad76c 100644 --- a/src/components/tvproviders/schedulesdirect.js +++ b/src/components/tvproviders/schedulesdirect.js @@ -8,7 +8,7 @@ import '../../elements/emby-button/paper-icon-button-light'; import '../../elements/emby-select/emby-select'; import '../../elements/emby-button/emby-button'; import '../../assets/css/flexstyles.scss'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; import { Events } from 'jellyfin-apiclient'; export default function (page, providerId, options) { diff --git a/src/components/tvproviders/xmltv.js b/src/components/tvproviders/xmltv.js index 1f782b3607..9d5312e4dc 100644 --- a/src/components/tvproviders/xmltv.js +++ b/src/components/tvproviders/xmltv.js @@ -5,7 +5,7 @@ import '../../elements/emby-checkbox/emby-checkbox'; import '../../elements/emby-input/emby-input'; import '../listview/listview.scss'; import '../../elements/emby-button/paper-icon-button-light'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; import { Events } from 'jellyfin-apiclient'; export default function (page, providerId, options) { diff --git a/src/components/viewContainer.js b/src/components/viewContainer.js index 9a1f9eee03..48660290c5 100644 --- a/src/components/viewContainer.js +++ b/src/components/viewContainer.js @@ -1,6 +1,6 @@ import { importModule } from '@uupaa/dynamic-import-polyfill'; import './viewManager/viewContainer.scss'; -import Dashboard from '../scripts/clientUtils'; +import Dashboard from '../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/apikeys.js b/src/controllers/dashboard/apikeys.js index fcee86f827..300bdeb09f 100644 --- a/src/controllers/dashboard/apikeys.js +++ b/src/controllers/dashboard/apikeys.js @@ -4,7 +4,7 @@ import dom from '../../scripts/dom'; import globalize from '../../scripts/globalize'; import '../../elements/emby-button/emby-button'; import confirm from '../../components/confirm/confirm'; -import { pageIdOn } from '../../scripts/clientUtils'; +import { pageIdOn } from '../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/dashboard.js b/src/controllers/dashboard/dashboard.js index 799bef35e4..b3cf1c0cde 100644 --- a/src/controllers/dashboard/dashboard.js +++ b/src/controllers/dashboard/dashboard.js @@ -19,7 +19,7 @@ import '../../elements/emby-button/emby-button'; import '../../assets/css/flexstyles.scss'; import '../../elements/emby-itemscontainer/emby-itemscontainer'; import taskButton from '../../scripts/taskbutton'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; import ServerConnections from '../../components/ServerConnections'; import alert from '../../components/alert'; import confirm from '../../components/confirm/confirm'; diff --git a/src/controllers/dashboard/devices/device.js b/src/controllers/dashboard/devices/device.js index e2f000fef5..4a4da4bd7e 100644 --- a/src/controllers/dashboard/devices/device.js +++ b/src/controllers/dashboard/devices/device.js @@ -2,7 +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'; +import Dashboard from '../../../utils/dashboard'; import { getParameterByName } from '../../../utils/url.ts'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/devices/devices.js b/src/controllers/dashboard/devices/devices.js index 9fa75489fa..bb2665f066 100644 --- a/src/controllers/dashboard/devices/devices.js +++ b/src/controllers/dashboard/devices/devices.js @@ -9,7 +9,7 @@ import { localeWithSuffix } from '../../../scripts/dfnshelper'; import '../../../elements/emby-button/emby-button'; import '../../../elements/emby-itemscontainer/emby-itemscontainer'; import '../../../components/cardbuilder/card.scss'; -import Dashboard from '../../../scripts/clientUtils'; +import Dashboard from '../../../utils/dashboard'; import confirm from '../../../components/confirm/confirm'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/dlna/profile.js b/src/controllers/dashboard/dlna/profile.js index 4fd2f6415b..133faa2c8a 100644 --- a/src/controllers/dashboard/dlna/profile.js +++ b/src/controllers/dashboard/dlna/profile.js @@ -7,7 +7,7 @@ import '../../../elements/emby-button/emby-button'; import '../../../elements/emby-input/emby-input'; import '../../../elements/emby-checkbox/emby-checkbox'; import '../../../components/listview/listview.scss'; -import Dashboard from '../../../scripts/clientUtils'; +import Dashboard from '../../../utils/dashboard'; import toast from '../../../components/toast/toast'; import { getParameterByName } from '../../../utils/url.ts'; diff --git a/src/controllers/dashboard/dlna/settings.js b/src/controllers/dashboard/dlna/settings.js index 7da0746cfe..c5f0f545ea 100644 --- a/src/controllers/dashboard/dlna/settings.js +++ b/src/controllers/dashboard/dlna/settings.js @@ -3,7 +3,7 @@ import 'jquery'; import loading from '../../../components/loading/loading'; import libraryMenu from '../../../scripts/libraryMenu'; import globalize from '../../../scripts/globalize'; -import Dashboard from '../../../scripts/clientUtils'; +import Dashboard from '../../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/encodingsettings.js b/src/controllers/dashboard/encodingsettings.js index aeaf28a6be..c819cbb62f 100644 --- a/src/controllers/dashboard/encodingsettings.js +++ b/src/controllers/dashboard/encodingsettings.js @@ -3,7 +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'; +import Dashboard from '../../utils/dashboard'; import alert from '../../components/alert'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/general.js b/src/controllers/dashboard/general.js index e14cceefa3..80114b0657 100644 --- a/src/controllers/dashboard/general.js +++ b/src/controllers/dashboard/general.js @@ -6,7 +6,7 @@ import '../../elements/emby-textarea/emby-textarea'; import '../../elements/emby-input/emby-input'; import '../../elements/emby-select/emby-select'; import '../../elements/emby-button/emby-button'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; import alert from '../../components/alert'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/library.js b/src/controllers/dashboard/library.js index 38202ccb62..bfc3373788 100644 --- a/src/controllers/dashboard/library.js +++ b/src/controllers/dashboard/library.js @@ -8,7 +8,7 @@ import dom from '../../scripts/dom'; import imageHelper from '../../scripts/imagehelper'; import '../../components/cardbuilder/card.scss'; 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 cardBuilder from '../../components/cardbuilder/cardBuilder'; diff --git a/src/controllers/dashboard/librarydisplay.js b/src/controllers/dashboard/librarydisplay.js index 3eb56004e0..b9d37b5938 100644 --- a/src/controllers/dashboard/librarydisplay.js +++ b/src/controllers/dashboard/librarydisplay.js @@ -3,7 +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'; +import Dashboard from '../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/logs.js b/src/controllers/dashboard/logs.js index 8d2602fa99..a5e7d72e56 100644 --- a/src/controllers/dashboard/logs.js +++ b/src/controllers/dashboard/logs.js @@ -4,7 +4,7 @@ import globalize from '../../scripts/globalize'; import '../../elements/emby-button/emby-button'; import '../../components/listview/listview.scss'; import '../../assets/css/flexstyles.scss'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; import alert from '../../components/alert'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/metadataImages.js b/src/controllers/dashboard/metadataImages.js index 9711fa4820..f4307ee6be 100644 --- a/src/controllers/dashboard/metadataImages.js +++ b/src/controllers/dashboard/metadataImages.js @@ -3,7 +3,7 @@ import loading from '../../components/loading/loading'; import libraryMenu from '../../scripts/libraryMenu'; import globalize from '../../scripts/globalize'; import '../../components/listview/listview.scss'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/metadatanfo.js b/src/controllers/dashboard/metadatanfo.js index e0da30b5ef..02d74bf30e 100644 --- a/src/controllers/dashboard/metadatanfo.js +++ b/src/controllers/dashboard/metadatanfo.js @@ -3,7 +3,7 @@ import 'jquery'; import loading from '../../components/loading/loading'; import libraryMenu from '../../scripts/libraryMenu'; import globalize from '../../scripts/globalize'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; import alert from '../../components/alert'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/networking.js b/src/controllers/dashboard/networking.js index 0436cd3722..2989eb9bd5 100644 --- a/src/controllers/dashboard/networking.js +++ b/src/controllers/dashboard/networking.js @@ -2,7 +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'; +import Dashboard from '../../utils/dashboard'; import alert from '../../components/alert'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/notifications/notification/index.js b/src/controllers/dashboard/notifications/notification/index.js index 9b1d47669e..20ac2ea974 100644 --- a/src/controllers/dashboard/notifications/notification/index.js +++ b/src/controllers/dashboard/notifications/notification/index.js @@ -1,7 +1,7 @@ import escapeHtml from 'escape-html'; import 'jquery'; import '../../../../elements/emby-checkbox/emby-checkbox'; -import Dashboard from '../../../../scripts/clientUtils'; +import Dashboard from '../../../../utils/dashboard'; import { getParameterByName } from '../../../../utils/url.ts'; function fillItems(elem, items, cssClass, idPrefix, currentList, isEnabledList) { diff --git a/src/controllers/dashboard/playback.js b/src/controllers/dashboard/playback.js index fa9f75ebb7..392d643cfd 100644 --- a/src/controllers/dashboard/playback.js +++ b/src/controllers/dashboard/playback.js @@ -2,7 +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'; +import Dashboard from '../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/dashboard/plugins/add/index.js b/src/controllers/dashboard/plugins/add/index.js index 1039771a0d..214aff850f 100644 --- a/src/controllers/dashboard/plugins/add/index.js +++ b/src/controllers/dashboard/plugins/add/index.js @@ -4,7 +4,7 @@ import DOMPurify from 'dompurify'; import loading from '../../../../components/loading/loading'; import globalize from '../../../../scripts/globalize'; import '../../../../elements/emby-button/emby-button'; -import Dashboard from '../../../../scripts/clientUtils'; +import Dashboard from '../../../../utils/dashboard'; import alert from '../../../../components/alert'; import confirm from '../../../../components/confirm/confirm'; diff --git a/src/controllers/dashboard/plugins/installed/index.js b/src/controllers/dashboard/plugins/installed/index.js index 7c5ac0ccb9..d8fe9881ea 100644 --- a/src/controllers/dashboard/plugins/installed/index.js +++ b/src/controllers/dashboard/plugins/installed/index.js @@ -5,7 +5,7 @@ import globalize from '../../../../scripts/globalize'; import * as cardBuilder from '../../../../components/cardbuilder/cardBuilder.js'; import '../../../../components/cardbuilder/card.scss'; import '../../../../elements/emby-button/emby-button'; -import Dashboard, { pageIdOn } from '../../../../scripts/clientUtils'; +import Dashboard, { pageIdOn } from '../../../../utils/dashboard'; import confirm from '../../../../components/confirm/confirm'; function deletePlugin(page, uniqueid, version, name) { diff --git a/src/controllers/dashboard/streaming.js b/src/controllers/dashboard/streaming.js index 2ce668ef37..0439fb787e 100644 --- a/src/controllers/dashboard/streaming.js +++ b/src/controllers/dashboard/streaming.js @@ -2,7 +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'; +import Dashboard from '../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index a15dee615c..3f9448d5ad 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -29,7 +29,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'; +import Dashboard from '../../utils/dashboard'; import ServerConnections from '../../components/ServerConnections'; import confirm from '../../components/confirm/confirm'; import { download } from '../../scripts/fileDownloader'; diff --git a/src/controllers/livetv/livetvrecordings.js b/src/controllers/livetv/livetvrecordings.js index 508e8b44a7..2ce939907d 100644 --- a/src/controllers/livetv/livetvrecordings.js +++ b/src/controllers/livetv/livetvrecordings.js @@ -4,7 +4,7 @@ import imageLoader from '../../components/images/imageLoader'; import '../../scripts/livetvcomponents'; import '../../components/listview/listview.scss'; import '../../elements/emby-itemscontainer/emby-itemscontainer'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; function renderRecordings(elem, recordings, cardOptions, scrollX) { if (!elem) { diff --git a/src/controllers/livetv/livetvschedule.js b/src/controllers/livetv/livetvschedule.js index 1272a20198..605930e9fd 100644 --- a/src/controllers/livetv/livetvschedule.js +++ b/src/controllers/livetv/livetvschedule.js @@ -5,7 +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'; +import Dashboard from '../../utils/dashboard'; function enableScrollX() { return !layoutManager.desktop; diff --git a/src/controllers/livetv/livetvsuggested.js b/src/controllers/livetv/livetvsuggested.js index 81df2c2836..f2a63f3ecd 100644 --- a/src/controllers/livetv/livetvsuggested.js +++ b/src/controllers/livetv/livetvsuggested.js @@ -10,7 +10,7 @@ import '../../assets/css/scrollstyles.scss'; import '../../elements/emby-itemscontainer/emby-itemscontainer'; import '../../elements/emby-tabs/emby-tabs'; import '../../elements/emby-button/emby-button'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; function enableScrollX() { return !layoutManager.desktop; diff --git a/src/controllers/livetvguideprovider.js b/src/controllers/livetvguideprovider.js index ea7c35d332..1b8d9124ac 100644 --- a/src/controllers/livetvguideprovider.js +++ b/src/controllers/livetvguideprovider.js @@ -1,7 +1,7 @@ import { Events } from 'jellyfin-apiclient'; import loading from '../components/loading/loading'; import globalize from '../scripts/globalize'; -import Dashboard, { pageIdOn } from '../scripts/clientUtils'; +import Dashboard, { pageIdOn } from '../utils/dashboard'; import { getParameterByName } from '../utils/url.ts'; function onListingsSubmitted() { diff --git a/src/controllers/livetvsettings.js b/src/controllers/livetvsettings.js index abaa1c0a37..b9d032178c 100644 --- a/src/controllers/livetvsettings.js +++ b/src/controllers/livetvsettings.js @@ -2,7 +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'; +import Dashboard from '../utils/dashboard'; import alert from '../components/alert'; function loadPage(page, config) { diff --git a/src/controllers/livetvstatus.js b/src/controllers/livetvstatus.js index 6e3a686c2f..0d73ebc080 100644 --- a/src/controllers/livetvstatus.js +++ b/src/controllers/livetvstatus.js @@ -12,7 +12,7 @@ import '../elements/emby-itemscontainer/emby-itemscontainer'; import '../components/cardbuilder/card.scss'; import 'material-design-icons-iconfont'; import '../elements/emby-button/emby-button'; -import Dashboard from '../scripts/clientUtils'; +import Dashboard from '../utils/dashboard'; import confirm from '../components/confirm/confirm'; const enableFocusTransform = !browser.slow && !browser.edge; diff --git a/src/controllers/livetvtuner.js b/src/controllers/livetvtuner.js index 18e4d83721..dde8a10331 100644 --- a/src/controllers/livetvtuner.js +++ b/src/controllers/livetvtuner.js @@ -5,7 +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'; +import Dashboard from '../utils/dashboard'; import { getParameterByName } from '../utils/url.ts'; function isM3uVariant(type) { diff --git a/src/controllers/movies/moviesrecommended.js b/src/controllers/movies/moviesrecommended.js index b9532e3d8c..6c88ea5c8e 100644 --- a/src/controllers/movies/moviesrecommended.js +++ b/src/controllers/movies/moviesrecommended.js @@ -14,7 +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'; +import Dashboard from '../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/music/musicrecommended.js b/src/controllers/music/musicrecommended.js index e08bece779..d04d4bde52 100644 --- a/src/controllers/music/musicrecommended.js +++ b/src/controllers/music/musicrecommended.js @@ -14,7 +14,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer'; import '../../elements/emby-tabs/emby-tabs'; import '../../elements/emby-button/emby-button'; import '../../assets/css/flexstyles.scss'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/music/songs.js b/src/controllers/music/songs.js index 061d67ae4b..2053901b25 100644 --- a/src/controllers/music/songs.js +++ b/src/controllers/music/songs.js @@ -7,7 +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'; +import Dashboard from '../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/session/addServer/index.js b/src/controllers/session/addServer/index.js index e7878e2499..b7cc647e9d 100644 --- a/src/controllers/session/addServer/index.js +++ b/src/controllers/session/addServer/index.js @@ -2,7 +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'; +import Dashboard from '../../../utils/dashboard'; import ServerConnections from '../../../components/ServerConnections'; /* eslint-disable indent */ diff --git a/src/controllers/session/forgotPassword/index.js b/src/controllers/session/forgotPassword/index.js index 0b165b65f5..344f5c9e1b 100644 --- a/src/controllers/session/forgotPassword/index.js +++ b/src/controllers/session/forgotPassword/index.js @@ -1,5 +1,5 @@ import globalize from '../../../scripts/globalize'; -import Dashboard from '../../../scripts/clientUtils'; +import Dashboard from '../../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/session/login/index.js b/src/controllers/session/login/index.js index b863a5f550..20a7c0a5b2 100644 --- a/src/controllers/session/login/index.js +++ b/src/controllers/session/login/index.js @@ -10,7 +10,7 @@ import browser from '../../../scripts/browser'; import globalize from '../../../scripts/globalize'; import '../../../components/cardbuilder/card.scss'; import '../../../elements/emby-checkbox/emby-checkbox'; -import Dashboard from '../../../scripts/clientUtils'; +import Dashboard from '../../../utils/dashboard'; import ServerConnections from '../../../components/ServerConnections'; import toast from '../../../components/toast/toast'; import dialogHelper from '../../../components/dialogHelper/dialogHelper'; diff --git a/src/controllers/session/resetPassword/index.js b/src/controllers/session/resetPassword/index.js index 9697e386a7..c954bb4510 100644 --- a/src/controllers/session/resetPassword/index.js +++ b/src/controllers/session/resetPassword/index.js @@ -1,5 +1,5 @@ import globalize from '../../../scripts/globalize'; -import Dashboard from '../../../scripts/clientUtils'; +import Dashboard from '../../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/session/selectServer/index.js b/src/controllers/session/selectServer/index.js index ca96068913..75a0b0789d 100644 --- a/src/controllers/session/selectServer/index.js +++ b/src/controllers/session/selectServer/index.js @@ -15,7 +15,7 @@ import '../../../elements/emby-scroller/emby-scroller'; import '../../../elements/emby-itemscontainer/emby-itemscontainer'; import '../../../components/cardbuilder/card.scss'; import '../../../elements/emby-button/emby-button'; -import Dashboard from '../../../scripts/clientUtils'; +import Dashboard from '../../../utils/dashboard'; import ServerConnections from '../../../components/ServerConnections'; import alert from '../../../components/alert'; import cardBuilder from '../../../components/cardbuilder/cardBuilder'; diff --git a/src/controllers/shows/episodes.js b/src/controllers/shows/episodes.js index 98f85d38dd..e8943470bb 100644 --- a/src/controllers/shows/episodes.js +++ b/src/controllers/shows/episodes.js @@ -7,7 +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'; +import Dashboard from '../../utils/dashboard'; /* eslint-disable indent */ diff --git a/src/controllers/shows/tvrecommended.js b/src/controllers/shows/tvrecommended.js index 949c631cac..0a20e96d96 100644 --- a/src/controllers/shows/tvrecommended.js +++ b/src/controllers/shows/tvrecommended.js @@ -13,7 +13,7 @@ import globalize from '../../scripts/globalize'; import '../../assets/css/scrollstyles.scss'; import '../../elements/emby-itemscontainer/emby-itemscontainer'; import '../../elements/emby-button/emby-button'; -import Dashboard from '../../scripts/clientUtils'; +import Dashboard from '../../utils/dashboard'; import autoFocuser from '../../components/autoFocuser'; /* eslint-disable indent */ diff --git a/src/controllers/user/menu/index.js b/src/controllers/user/menu/index.js index 07d907d2e2..5449bc91d5 100644 --- a/src/controllers/user/menu/index.js +++ b/src/controllers/user/menu/index.js @@ -2,7 +2,7 @@ import { appHost } from '../../../components/apphost'; import '../../../components/listview/listview.scss'; import '../../../elements/emby-button/emby-button'; import layoutManager from '../../../components/layoutManager'; -import Dashboard from '../../../scripts/clientUtils'; +import Dashboard from '../../../utils/dashboard'; export default function (view, params) { view.querySelector('.btnLogout').addEventListener('click', function () { diff --git a/src/controllers/wizard/remote/index.js b/src/controllers/wizard/remote/index.js index 2b07bf89d1..e8a761666c 100644 --- a/src/controllers/wizard/remote/index.js +++ b/src/controllers/wizard/remote/index.js @@ -2,7 +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'; +import Dashboard from '../../../utils/dashboard'; function save(page) { loading.show(); diff --git a/src/controllers/wizard/settings/index.js b/src/controllers/wizard/settings/index.js index ac84c9ab1d..2881bc6d78 100644 --- a/src/controllers/wizard/settings/index.js +++ b/src/controllers/wizard/settings/index.js @@ -2,7 +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'; +import Dashboard from '../../../utils/dashboard'; function save(page) { loading.show(); diff --git a/src/controllers/wizard/start/index.js b/src/controllers/wizard/start/index.js index 807804cb7a..222e017952 100644 --- a/src/controllers/wizard/start/index.js +++ b/src/controllers/wizard/start/index.js @@ -2,7 +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'; +import Dashboard from '../../../utils/dashboard'; function loadPage(page, config, languageOptions) { $('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) { diff --git a/src/controllers/wizard/user/index.js b/src/controllers/wizard/user/index.js index b6b7618042..9d1f13ae31 100644 --- a/src/controllers/wizard/user/index.js +++ b/src/controllers/wizard/user/index.js @@ -3,7 +3,7 @@ import globalize from '../../../scripts/globalize'; import '../../../assets/css/dashboard.scss'; import '../../../elements/emby-input/emby-input'; import '../../../elements/emby-button/emby-button'; -import Dashboard from '../../../scripts/clientUtils'; +import Dashboard from '../../../utils/dashboard'; import toast from '../../../components/toast/toast'; function getApiClient() { diff --git a/src/scripts/autoBackdrops.js b/src/scripts/autoBackdrops.js index 7f4486e30c..02e73ff3d7 100644 --- a/src/scripts/autoBackdrops.js +++ b/src/scripts/autoBackdrops.js @@ -1,7 +1,7 @@ import backdrop from '../components/backdrop/backdrop'; import * as userSettings from './settings/userSettings'; import libraryMenu from './libraryMenu'; -import { pageClassOn } from './clientUtils'; +import { pageClassOn } from '../utils/dashboard'; const cache = {}; diff --git a/src/scripts/autoThemes.js b/src/scripts/autoThemes.js index 9d29d735d6..aab1ccef75 100644 --- a/src/scripts/autoThemes.js +++ b/src/scripts/autoThemes.js @@ -2,7 +2,7 @@ import * as userSettings from './settings/userSettings'; import skinManager from './themeManager'; import { Events } from 'jellyfin-apiclient'; import ServerConnections from '../components/ServerConnections'; -import { pageClassOn } from '../scripts/clientUtils'; +import { pageClassOn } from '../utils/dashboard'; // Set the default theme when loading skinManager.setTheme(userSettings.theme()) diff --git a/src/scripts/editorsidebar.js b/src/scripts/editorsidebar.js index 220597d64e..ca0db05034 100644 --- a/src/scripts/editorsidebar.js +++ b/src/scripts/editorsidebar.js @@ -2,7 +2,7 @@ import escapeHtml from 'escape-html'; import 'jquery'; import globalize from './globalize'; import 'material-design-icons-iconfont'; -import Dashboard from './clientUtils'; +import Dashboard from '../utils/dashboard'; import { getParameterByName } from '../utils/url.ts'; /* eslint-disable indent */ diff --git a/src/scripts/libraryMenu.js b/src/scripts/libraryMenu.js index 7bf5cad478..e33f9f5d1f 100644 --- a/src/scripts/libraryMenu.js +++ b/src/scripts/libraryMenu.js @@ -16,7 +16,7 @@ import '../elements/emby-button/paper-icon-button-light'; import 'material-design-icons-iconfont'; import '../assets/css/scrollstyles.scss'; import '../assets/css/flexstyles.scss'; -import Dashboard, { pageClassOn } from './clientUtils'; +import Dashboard, { pageClassOn } from '../utils/dashboard'; import ServerConnections from '../components/ServerConnections'; import Headroom from 'headroom.js'; import { getParameterByName } from '../utils/url.ts'; diff --git a/src/scripts/playlists.js b/src/scripts/playlists.js index fe8475183d..8965676e46 100644 --- a/src/scripts/playlists.js +++ b/src/scripts/playlists.js @@ -6,7 +6,7 @@ import libraryBrowser from './libraryBrowser'; import imageLoader from '../components/images/imageLoader'; import * as userSettings from './settings/userSettings'; import '../elements/emby-itemscontainer/emby-itemscontainer'; -import Dashboard from './clientUtils'; +import Dashboard from '../utils/dashboard'; export default function (view) { function getPageData(context) { diff --git a/src/scripts/site.js b/src/scripts/site.js index b346e7dcc7..e9a257f87d 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -25,7 +25,7 @@ import './libraryMenu'; import './routes'; import '../components/themeMediaPlayer'; import './autoBackdrops'; -import { pageClassOn, serverAddress } from './clientUtils'; +import { pageClassOn, serverAddress } from '../utils/dashboard'; import './screensavermanager'; import './serverNotifications'; import '../components/playback/playerSelectionMenu'; diff --git a/src/scripts/clientUtils.js b/src/utils/dashboard.js similarity index 98% rename from src/scripts/clientUtils.js rename to src/utils/dashboard.js index f36408d9af..e0668c6c78 100644 --- a/src/scripts/clientUtils.js +++ b/src/utils/dashboard.js @@ -5,12 +5,12 @@ import { appRouter } from '../components/appRouter'; import baseAlert from '../components/alert'; import baseConfirm from '../components/confirm/confirm'; import globalize from '../scripts/globalize'; -import * as webSettings from './settings/webSettings'; +import * as webSettings from '../scripts/settings/webSettings'; import datetime from '../scripts/datetime'; import DirectoryBrowser from '../components/directorybrowser/directorybrowser'; import dialogHelper from '../components/dialogHelper/dialogHelper'; import itemIdentifier from '../components/itemidentifier/itemidentifier'; -import { getLocationSearch } from '../utils/url.ts'; +import { getLocationSearch } from './url.ts'; export function getCurrentUser() { return window.ApiClient.getCurrentUser(false);