Make import paths ES6-compatible

This commit is contained in:
MrTimscampi 2020-08-14 08:46:34 +02:00 committed by vitorsemeano
parent 1a635e2f81
commit bfb8c7c1f6
245 changed files with 2073 additions and 1995 deletions

View file

@ -1,13 +1,13 @@
import datetime from 'datetime';
import loading from 'loading';
import dom from 'dom';
import globalize from 'globalize';
import 'emby-button';
import datetime from '../../scripts/datetime';
import loading from '../../components/loading/loading';
import dom from '../../scripts/dom';
import globalize from '../../scripts/globalize';
import '../../elements/emby-button/emby-button';
/* eslint-disable indent */
function revoke(page, key) {
import('confirm').then(({default: confirm}) => {
import('../../components/confirm/confirm').then(({default: confirm}) => {
confirm(globalize.translate('MessageConfirmRevokeApiKey'), globalize.translate('HeaderConfirmRevokeApiKey')).then(function () {
loading.show();
ApiClient.ajax({
@ -51,7 +51,7 @@ import 'emby-button';
}
function showNewKeyPrompt(page) {
import('prompt').then(({default: prompt}) => {
import('../../components/prompt/prompt').then(({default: prompt}) => {
prompt({
title: globalize.translate('HeaderNewApiKey'),
label: globalize.translate('LabelAppName'),

View file

@ -1,28 +1,28 @@
import datetime from 'datetime';
import events from 'events';
import itemHelper from 'itemHelper';
import serverNotifications from 'serverNotifications';
import dom from 'dom';
import taskButton from 'scripts/taskbutton';
import globalize from 'globalize';
import * as datefns from 'date-fns';
import dfnshelper from 'dfnshelper';
import loading from 'loading';
import playMethodHelper from 'playMethodHelper';
import cardBuilder from 'cardBuilder';
import imageLoader from 'imageLoader';
import ActivityLog from 'components/activitylog';
import imageHelper from 'scripts/imagehelper';
import indicators from 'indicators';
import 'listViewStyle';
import 'emby-button';
import 'flexStyles';
import 'emby-itemscontainer';
import datetime from '../../scripts/datetime';
import { connectionManager, events } from 'jellyfin-apiclient';
import itemHelper from '../../components/itemHelper';
import serverNotifications from '../../scripts/serverNotifications';
import dom from '../../scripts/dom';
import globalize from '../../scripts/globalize';
import { formatDistanceToNow } from 'date-fns';
import { localeWithSuffix } from '../../scripts/dfnshelper';
import loading from '../../components/loading/loading';
import playMethodHelper from '../../components/playback/playmethodhelper';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import imageLoader from '../../components/images/imageLoader';
import ActivityLog from '../../components/activitylog';
import imageHelper from '../../scripts/imagehelper';
import indicators from '../../components/indicators/indicators';
import '../../components/listview/listview.css';
import '../../elements/emby-button/emby-button';
import '../../assets/css/flexstyles.css';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
import taskButton from '../../scripts/taskbutton';
/* eslint-disable indent */
function showPlaybackInfo(btn, session) {
import('alert').then(({default: alert}) => {
import('../../components/alert').then(({default: alert}) => {
let title;
const text = [];
const displayPlayMethod = playMethodHelper.getDisplayPlayMethod(session);
@ -53,7 +53,7 @@ import 'emby-itemscontainer';
}
function showSendMessageForm(btn, session) {
import('prompt').then(({default: prompt}) => {
import('../../components/prompt/prompt').then(({default: prompt}) => {
prompt({
title: globalize.translate('HeaderSendMessage'),
label: globalize.translate('LabelMessageText'),
@ -70,7 +70,7 @@ import 'emby-itemscontainer';
}
function showOptionsMenu(btn, session) {
import('actionsheet').then(({default: actionsheet}) => {
import('../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
const menuItems = [];
if (session.ServerId && session.DeviceId !== window.connectionManager.deviceId()) {
@ -473,7 +473,7 @@ import 'emby-itemscontainer';
// how dates are returned by the server when the session is active and show something like 'Active now', instead of past/future sentences
if (!nowPlayingItem) {
return {
html: globalize.translate('LastSeen', datefns.formatDistanceToNow(Date.parse(session.LastActivityDate), dfnshelper.localeWithSuffix)),
html: globalize.translate('LastSeen', formatDistanceToNow(Date.parse(session.LastActivityDate), localeWithSuffix)),
image: imgUrl
};
}
@ -720,7 +720,7 @@ import 'emby-itemscontainer';
});
},
restart: function (btn) {
import('confirm').then(({default: confirm}) => {
import('../../components/confirm/confirm').then(({default: confirm}) => {
confirm({
title: globalize.translate('Restart'),
text: globalize.translate('MessageConfirmRestart'),
@ -735,7 +735,7 @@ import 'emby-itemscontainer';
});
},
shutdown: function (btn) {
import('confirm').then(({default: confirm}) => {
import('../../components/confirm/confirm').then(({default: confirm}) => {
confirm({
title: globalize.translate('ButtonShutdown'),
text: globalize.translate('MessageConfirmShutdown'),

View file

@ -1,7 +1,7 @@
import loading from 'loading';
import dom from 'dom';
import 'emby-input';
import 'emby-button';
import loading from '../../../components/loading/loading';
import dom from '../../../scripts/dom';
import '../../../elements/emby-input/emby-input';
import '../../../elements/emby-button/emby-button';
/* eslint-disable indent */

View file

@ -1,12 +1,12 @@
import loading from 'loading';
import dom from 'dom';
import globalize from 'globalize';
import imageHelper from 'scripts/imagehelper';
import * as datefns from 'date-fns';
import dfnshelper from 'dfnshelper';
import 'emby-button';
import 'emby-itemscontainer';
import 'cardStyle';
import loading from '../../../components/loading/loading';
import dom from '../../../scripts/dom';
import globalize from '../../../scripts/globalize';
import imageHelper from '../../../scripts/imagehelper';
import { formatDistanceToNow } from 'date-fns';
import { localeWithSuffix } from '../../../scripts/dfnshelper';
import '../../../elements/emby-button/emby-button';
import '../../../elements/emby-itemscontainer/emby-itemscontainer';
import '../../../components/cardbuilder/card.css';
/* eslint-disable indent */
@ -39,7 +39,7 @@ import 'cardStyle';
function deleteDevice(page, id) {
const msg = globalize.translate('DeleteDeviceConfirmation');
import('confirm').then(({default: confirm}) => {
import('../../../components/confirm/confirm').then(({default: confirm}) => {
confirm({
text: msg,
title: globalize.translate('HeaderDeleteDevice'),
@ -72,7 +72,7 @@ import 'cardStyle';
});
}
import('actionsheet').then(({default: actionsheet}) => {
import('../../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
actionsheet.show({
items: menuItems,
positionTo: btn,
@ -118,7 +118,8 @@ import 'cardStyle';
deviceHtml += '</div>';
}
deviceHtml += "<div class='cardText'>";
deviceHtml += "<div class='c" +
"ardText'>";
deviceHtml += device.Name;
deviceHtml += '</div>';
deviceHtml += "<div class='cardText cardText-secondary'>";
@ -128,7 +129,7 @@ import 'cardStyle';
if (device.LastUserName) {
deviceHtml += device.LastUserName;
deviceHtml += ', ' + datefns.formatDistanceToNow(Date.parse(device.DateLastActivity), dfnshelper.localeWithSuffix);
deviceHtml += ', ' + formatDistanceToNow(Date.parse(device.DateLastActivity), localeWithSuffix);
}
deviceHtml += '&nbsp;';

View file

@ -1,11 +1,11 @@
import $ from 'jQuery';
import loading from 'loading';
import globalize from 'globalize';
import 'emby-select';
import 'emby-button';
import 'emby-input';
import 'emby-checkbox';
import 'listViewStyle';
import 'jquery';
import loading from '../../../components/loading/loading';
import globalize from '../../../scripts/globalize';
import '../../../elements/emby-select/emby-select';
import '../../../elements/emby-button/emby-button';
import '../../../elements/emby-input/emby-input';
import '../../../elements/emby-checkbox/emby-checkbox';
import '../../../components/listview/listview.css';
/* eslint-disable indent */
@ -633,7 +633,7 @@ import 'listViewStyle';
data: JSON.stringify(profile),
contentType: 'application/json'
}).then(function () {
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast('Settings saved.');
});
}, Dashboard.processErrorResponse);

View file

@ -1,9 +1,9 @@
import $ from 'jQuery';
import globalize from 'globalize';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import 'listViewStyle';
import 'emby-button';
import 'jquery';
import globalize from '../../../scripts/globalize';
import loading from '../../../components/loading/loading';
import libraryMenu from '../../../scripts/libraryMenu';
import '../../../components/listview/listview.css';
import '../../../elements/emby-button/emby-button';
/* eslint-disable indent */
@ -64,7 +64,7 @@ import 'emby-button';
}
function deleteProfile(page, id) {
import('confirm').then(({default: confirm}) => {
import('../../../components/confirm/confirm').then(({default: confirm}) => {
confirm(globalize.translate('MessageConfirmProfileDeletion'), globalize.translate('HeaderConfirmProfileDeletion')).then(function () {
loading.show();
ApiClient.ajax({

View file

@ -1,7 +1,7 @@
import $ from 'jQuery';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import 'jquery';
import loading from '../../../components/loading/loading';
import libraryMenu from '../../../scripts/libraryMenu';
import globalize from '../../../scripts/globalize';
/* eslint-disable indent */

View file

@ -1,8 +1,8 @@
import $ from 'jQuery';
import loading from 'loading';
import globalize from 'globalize';
import dom from 'dom';
import libraryMenu from 'libraryMenu';
import 'jquery';
import loading from '../../components/loading/loading';
import globalize from '../../scripts/globalize';
import dom from '../../scripts/dom';
import libraryMenu from '../../scripts/libraryMenu';
/* eslint-disable indent */
@ -45,7 +45,7 @@ import libraryMenu from 'libraryMenu';
let msg = '';
msg = globalize.translate('FFmpegSavePathNotFound');
import('alert').then(({default: alert}) => {
import('../../components/alert').then(({default: alert}) => {
alert(msg);
});
}
@ -101,7 +101,7 @@ import libraryMenu from 'libraryMenu';
ApiClient.updateNamedConfiguration('encoding', config).then(function () {
updateEncoder(form);
}, function () {
import('alert').then(({default: alert}) => {
import('../../components/alert').then(({default: alert}) => {
alert(globalize.translate('ErrorDefault'));
});
@ -111,7 +111,7 @@ import libraryMenu from 'libraryMenu';
};
if ($('#selectVideoDecoder', form).val()) {
import('alert').then(({default: alert}) => {
import('../../components/alert').then(({default: alert}) => {
alert({
title: globalize.translate('TitleHardwareAcceleration'),
text: globalize.translate('HardwareAccelerationWarning')
@ -186,7 +186,7 @@ import libraryMenu from 'libraryMenu';
setDecodingCodecsVisible(page, this.value);
});
$('#btnSelectEncoderPath', page).on('click.selectDirectory', function () {
import('directorybrowser').then(({default: directoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
const picker = new directoryBrowser();
picker.show({
includeFiles: true,
@ -201,7 +201,7 @@ import libraryMenu from 'libraryMenu';
});
});
$('#btnSelectTranscodingTempPath', page).on('click.selectDirectory', function () {
import('directorybrowser').then(({default: directoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
const picker = new directoryBrowser();
picker.show({
callback: function (path) {

View file

@ -1,11 +1,11 @@
import $ from 'jQuery';
import loading from 'loading';
import globalize from 'globalize';
import 'emby-checkbox';
import 'emby-textarea';
import 'emby-input';
import 'emby-select';
import 'emby-button';
import 'jquery';
import loading from '../../components/loading/loading';
import globalize from '../../scripts/globalize';
import '../../elements/emby-checkbox/emby-checkbox';
import '../../elements/emby-textarea/emby-textarea';
import '../../elements/emby-input/emby-input';
import '../../elements/emby-select/emby-select';
import '../../elements/emby-button/emby-button';
/* eslint-disable indent */
@ -51,7 +51,7 @@ import 'emby-button';
});
});
}, function () {
import('alert').then(({default: alert}) => {
import('../../components/alert').then(({default: alert}) => {
alert(globalize.translate('ErrorDefault'));
});
@ -66,7 +66,7 @@ import 'emby-button';
const brandingConfigKey = 'branding';
export default function (view, params) {
$('#btnSelectCachePath', view).on('click.selectDirectory', function () {
import('directorybrowser').then(({default: directoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
const picker = new directoryBrowser();
picker.show({
callback: function (path) {
@ -83,7 +83,7 @@ import 'emby-button';
});
});
$('#btnSelectMetadataPath', view).on('click.selectDirectory', function () {
import('directorybrowser').then(({default: directoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
const picker = new directoryBrowser();
picker.show({
path: $('#txtMetadataPath', view).val(),

View file

@ -1,17 +1,17 @@
import $ from 'jQuery';
import taskButton from 'scripts/taskbutton';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import dom from 'dom';
import imageHelper from 'scripts/imagehelper';
import 'cardStyle';
import 'emby-itemrefreshindicator';
import 'jquery';
import taskButton from '../../scripts/taskbutton';
import loading from '../../components/loading/loading';
import libraryMenu from '../../scripts/libraryMenu';
import globalize from '../../scripts/globalize';
import dom from '../../scripts/dom';
import imageHelper from '../../scripts/imagehelper';
import '../../components/cardbuilder/card.css';
import '../../elements/emby-itemrefreshindicator/emby-itemrefreshindicator';
/* eslint-disable indent */
function addVirtualFolder(page) {
import('medialibrarycreator').then(({default: medialibrarycreator}) => {
import('../../components/mediaLibraryCreator/mediaLibraryCreator').then((medialibrarycreator) => {
new medialibrarycreator({
collectionTypeOptions: getCollectionTypeOptions().filter(function (f) {
return !f.hidden;
@ -26,7 +26,7 @@ import 'emby-itemrefreshindicator';
}
function editVirtualFolder(page, virtualFolder) {
import('medialibraryeditor').then(({default: medialibraryeditor}) => {
import('../../components/mediaLibraryEditor/mediaLibraryEditor').then((medialibraryeditor) => {
new medialibraryeditor({
refresh: shouldRefreshLibraryAfterChanges(page),
library: virtualFolder
@ -46,7 +46,7 @@ import 'emby-itemrefreshindicator';
msg += virtualFolder.Locations.join('<br/>');
}
import('confirm').then(({default: confirm}) => {
import('../../components/confirm/confirm').then((confirm) => {
confirm({
text: msg,
title: globalize.translate('HeaderRemoveMediaFolder'),
@ -62,7 +62,7 @@ import 'emby-itemrefreshindicator';
}
function refreshVirtualFolder(page, virtualFolder) {
import('refreshDialog').then(({default: refreshDialog}) => {
import('../../components/refreshdialog/refreshdialog').then((refreshDialog) => {
new refreshDialog({
itemIds: [virtualFolder.ItemId],
serverId: ApiClient.serverId(),
@ -72,7 +72,7 @@ import 'emby-itemrefreshindicator';
}
function renameVirtualFolder(page, virtualFolder) {
import('prompt').then(({default: prompt}) => {
import('../../components/prompt/prompt').then((prompt) => {
prompt({
label: globalize.translate('LabelNewName'),
confirmText: globalize.translate('ButtonRename')
@ -118,7 +118,7 @@ import 'emby-itemrefreshindicator';
icon: 'refresh'
});
import('actionsheet').then(({default: actionsheet}) => {
import('../../components/actionSheet/actionSheet').then((actionsheet) => {
actionsheet.show({
items: menuItems,
positionTo: elem,
@ -199,7 +199,7 @@ import 'emby-itemrefreshindicator';
}
function editImages(page, virtualFolder) {
import('imageEditor').then(({default: imageEditor}) => {
import('../../components/imageeditor/imageeditor').then((imageEditor) => {
imageEditor.show({
itemId: virtualFolder.ItemId,
serverId: ApiClient.serverId()

View file

@ -1,8 +1,8 @@
import globalize from 'globalize';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import 'emby-checkbox';
import 'emby-button';
import globalize from '../../scripts/globalize';
import loading from '../../components/loading/loading';
import libraryMenu from '../../scripts/libraryMenu';
import '../../elements/emby-checkbox/emby-checkbox';
import '../../elements/emby-button/emby-button';
/* eslint-disable indent */

View file

@ -1,8 +1,8 @@
import datetime from 'datetime';
import loading from 'loading';
import 'emby-button';
import 'listViewStyle';
import 'flexStyles';
import datetime from '../../scripts/datetime';
import loading from '../../components/loading/loading';
import '../../elements/emby-button/emby-button';
import '../../components/listview/listview.css';
import '../../assets/css/flexstyles.css';
/* eslint-disable indent */

View file

@ -1,8 +1,8 @@
import $ from 'jQuery';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import 'listViewStyle';
import 'jquery';
import loading from '../../components/loading/loading';
import libraryMenu from '../../scripts/libraryMenu';
import globalize from '../../scripts/globalize';
import '../../components/listview/listview.css';
/* eslint-disable indent */

View file

@ -1,7 +1,7 @@
import $ from 'jQuery';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import 'jquery';
import loading from '../../components/loading/loading';
import libraryMenu from '../../scripts/libraryMenu';
import globalize from '../../scripts/globalize';
/* eslint-disable indent */
@ -39,7 +39,7 @@ import globalize from 'globalize';
const msg = [];
msg.push(globalize.translate('MetadataSettingChangeHelp'));
import('alert').then(({default: alert}) => {
import('../../components/alert').then(({default: alert}) => {
alert({
text: msg.join('<br/><br/>')
});

View file

@ -1,7 +1,7 @@
import loading from 'loading';
import globalize from 'globalize';
import 'emby-checkbox';
import 'emby-select';
import loading from '../../components/loading/loading';
import globalize from '../../scripts/globalize';
import '../../elements/emby-checkbox/emby-checkbox';
import '../../elements/emby-select/emby-select';
/* eslint-disable indent */
@ -89,7 +89,7 @@ import 'emby-select';
function showAlertText(options) {
return new Promise(function (resolve, reject) {
import('alert').then(({default: alert}) => {
import('../../components/alert').then(({default: alert}) => {
alert(options).then(resolve, reject);
});
});
@ -145,7 +145,7 @@ import 'emby-select';
}
});
view.querySelector('#btnSelectCertPath').addEventListener('click', function () {
import('directorybrowser').then(({default: directoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
const picker = new directoryBrowser();
picker.show({
includeFiles: true,

View file

@ -1,5 +1,5 @@
import $ from 'jQuery';
import 'emby-checkbox';
import 'jquery';
import '../../../../elements/emby-checkbox/emby-checkbox';
function fillItems(elem, items, cssClass, idPrefix, currentList, isEnabledList) {
let html = '<div class="checkboxList paperList" style="padding: .5em 1em;">';

View file

@ -1,7 +1,7 @@
import loading from 'loading';
import globalize from 'globalize';
import 'listViewStyle';
import 'emby-button';
import loading from '../../../../components/loading/loading';
import globalize from '../../../../scripts/globalize';
import '../../../../components/listview/listview.css';
import '../../../../elements/emby-button/emby-button';
function reload(page) {
loading.show();

View file

@ -1,7 +1,7 @@
import $ from 'jQuery';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import 'jquery';
import loading from '../../components/loading/loading';
import libraryMenu from '../../scripts/libraryMenu';
import globalize from '../../scripts/globalize';
/* eslint-disable indent */

View file

@ -1,7 +1,7 @@
import $ from 'jQuery';
import loading from 'loading';
import globalize from 'globalize';
import 'emby-button';
import 'jquery';
import loading from '../../../../components/loading/loading';
import globalize from '../../../../scripts/globalize';
import '../../../../elements/emby-button/emby-button';
function populateHistory(packageInfo, page) {
let html = '';
@ -68,7 +68,7 @@ function renderPackage(pkg, installedPlugins, page) {
}
function alertText(options) {
import('alert').then(({default: alert}) => {
import('../../../../components/alert').then(({default: alert}) => {
alert(options);
});
}
@ -94,7 +94,7 @@ function performInstallation(page, name, guid, version) {
msg += '<br/>';
msg += globalize.translate('PleaseConfirmPluginInstallation');
import('confirm').then(({default: confirm}) => {
import('../../../../components/confirm/confirm').then(({default: confirm}) => {
confirm(msg, globalize.translate('HeaderConfirmPluginInstallation')).then(function () {
alertCallback();
}).catch(() => {

View file

@ -1,10 +1,10 @@
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import 'cardStyle';
import 'emby-button';
import 'emby-checkbox';
import 'emby-select';
import loading from '../../../../components/loading/loading';
import libraryMenu from '../../../../scripts/libraryMenu';
import globalize from '../../../../scripts/globalize';
import '../../../../components/cardbuilder/card.css';
import '../../../../elements/emby-button/emby-button';
import '../../../../elements/emby-checkbox/emby-checkbox';
import '../../../../elements/emby-select/emby-select';
function reloadList(page) {
loading.show();

View file

@ -1,14 +1,14 @@
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import dom from 'dom';
import globalize from 'globalize';
import 'cardStyle';
import 'emby-button';
import loading from '../../../../components/loading/loading';
import libraryMenu from '../../../../scripts/libraryMenu';
import dom from '../../../../scripts/dom';
import globalize from '../../../../scripts/globalize';
import '../../../../components/cardbuilder/card.css';
import '../../../../elements/emby-button/emby-button';
function deletePlugin(page, uniqueid, name) {
const msg = globalize.translate('UninstallPluginConfirmation', name);
import('confirm').then(({default: confirm}) => {
import('../../../../components/confirm/confirm').then((confirm) => {
confirm.default({
title: globalize.translate('HeaderUninstallPlugin'),
text: msg,
@ -132,7 +132,7 @@ function showPluginMenu(page, elem) {
});
}
import('actionsheet').then(({default: actionsheet}) => {
import('../../../../components/actionSheet/actionSheet').then((actionsheet) => {
actionsheet.show({
items: menuItems,
positionTo: elem,

View file

@ -1,12 +1,12 @@
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import dialogHelper from 'dialogHelper';
import 'emby-button';
import 'emby-checkbox';
import 'emby-select';
import 'formDialogStyle';
import 'listViewStyle';
import loading from '../../../../components/loading/loading';
import libraryMenu from '../../../../scripts/libraryMenu';
import globalize from '../../../../scripts/globalize';
import dialogHelper from '../../../../components/dialogHelper/dialogHelper';
import '../../../../elements/emby-button/emby-button';
import '../../../../elements/emby-checkbox/emby-checkbox';
import '../../../../elements/emby-select/emby-select';
import '../../../../components/formdialog.css';
import '../../../../components/listview/listview.css';
let repositories = [];

View file

@ -1,11 +1,11 @@
import $ from 'jQuery';
import loading from 'loading';
import datetime from 'datetime';
import dom from 'dom';
import globalize from 'globalize';
import 'emby-input';
import 'emby-button';
import 'emby-select';
import 'jquery';
import loading from '../../../components/loading/loading';
import datetime from '../../../scripts/datetime';
import dom from '../../../scripts/dom';
import globalize from '../../../scripts/globalize';
import '../../../elements/emby-input/emby-input';
import '../../../elements/emby-button/emby-button';
import '../../../elements/emby-select/emby-select';
/* eslint-disable indent */
@ -42,7 +42,7 @@ import 'emby-select';
$('.taskName', view).html(task.Name);
$('#pTaskDescription', view).html(task.Description);
import('listViewStyle').then(() => {
import('../../../components/listview/listview.css').then(() => {
ScheduledTaskPage.loadTaskTriggers(view, task);
});
@ -135,7 +135,7 @@ import 'emby-select';
$('#popupAddTrigger', view).removeClass('hide');
},
confirmDeleteTrigger: function (view, index) {
import('confirm').then(({default: confirm}) => {
import('../../../components/confirm/confirm').then(({default: confirm}) => {
confirm(globalize.translate('MessageDeleteTaskTrigger'), globalize.translate('HeaderDeleteTaskTrigger')).then(function () {
ScheduledTaskPage.deleteTrigger(view, index);
});

View file

@ -1,12 +1,12 @@
import $ from 'jQuery';
import loading from 'loading';
import events from 'events';
import globalize from 'globalize';
import serverNotifications from 'serverNotifications';
import * as datefns from 'date-fns';
import dfnshelper from 'dfnshelper';
import 'listViewStyle';
import 'emby-button';
import 'jquery';
import loading from '../../../components/loading/loading';
import events from 'jellyfin-apiclient';
import globalize from '../../../scripts/globalize';
import serverNotifications from '../../../scripts/serverNotifications';
import { formatDistance, formatDistanceToNow } from 'date-fns';
import { getLocale, localeWithSuffix } from '../../../scripts/dfnshelper';
import '../../../components/listview/listview.css';
import '../../../elements/emby-button/emby-button';
/* eslint-disable indent */
@ -77,8 +77,8 @@ import 'emby-button';
if (task.LastExecutionResult) {
const endtime = Date.parse(task.LastExecutionResult.EndTimeUtc);
const starttime = Date.parse(task.LastExecutionResult.StartTimeUtc);
html += globalize.translate('LabelScheduledTaskLastRan', datefns.formatDistanceToNow(endtime, dfnshelper.localeWithSuffix),
datefns.formatDistance(starttime, endtime, { locale: dfnshelper.getLocale() }));
html += globalize.translate('LabelScheduledTaskLastRan', formatDistanceToNow(endtime, localeWithSuffix),
formatDistance(starttime, endtime, { locale: getLocale() }));
if (task.LastExecutionResult.Status === 'Failed') {
html += " <span style='color:#FF0000;'>(" + globalize.translate('LabelFailed') + ')</span>';
} else if (task.LastExecutionResult.Status === 'Cancelled') {

View file

@ -1,5 +1,5 @@
import ActivityLog from 'components/activitylog';
import globalize from 'globalize';
import ActivityLog from '../../components/activitylog';
import globalize from '../../scripts/globalize';
/* eslint-disable indent */

View file

@ -1,7 +1,7 @@
import $ from 'jQuery';
import libraryMenu from 'libraryMenu';
import loading from 'loading';
import globalize from 'globalize';
import 'jquery';
import libraryMenu from '../../scripts/libraryMenu';
import loading from '../../components/loading/loading';
import globalize from '../../scripts/globalize';
/* eslint-disable indent */

View file

@ -1,7 +1,7 @@
import $ from 'jQuery';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import 'jquery';
import loading from '../../../components/loading/loading';
import libraryMenu from '../../../scripts/libraryMenu';
import globalize from '../../../scripts/globalize';
/* eslint-disable indent */
@ -110,7 +110,7 @@ import globalize from 'globalize';
Dashboard.navigate('userprofiles.html');
loading.hide();
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('SettingsSaved'));
});
}

View file

@ -1,7 +1,7 @@
import $ from 'jQuery';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import 'jquery';
import loading from '../../../components/loading/loading';
import libraryMenu from '../../../scripts/libraryMenu';
import globalize from '../../../scripts/globalize';
/* eslint-disable indent */
@ -92,7 +92,7 @@ import globalize from 'globalize';
function onSaveComplete(page) {
loading.hide();
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('SettingsSaved'));
});
}

View file

@ -1,7 +1,7 @@
import $ from 'jQuery';
import loading from 'loading';
import globalize from 'globalize';
import 'emby-checkbox';
import 'jquery';
import loading from '../../../components/loading/loading';
import globalize from '../../../scripts/globalize';
import '../../../elements/emby-checkbox/emby-checkbox';
/* eslint-disable indent */
@ -88,7 +88,7 @@ import 'emby-checkbox';
Dashboard.navigate('useredit.html?userId=' + user.Id);
});
}, function (response) {
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('ErrorDefault'));
});

View file

@ -1,10 +1,10 @@
import $ from 'jQuery';
import datetime from 'datetime';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import 'listViewStyle';
import 'paper-icon-button-light';
import 'jquery';
import datetime from '../../../scripts/datetime';
import loading from '../../../components/loading/loading';
import libraryMenu from '../../../scripts/libraryMenu';
import globalize from '../../../scripts/globalize';
import '../../../components/listview/listview.css';
import '../../../elements/emby-button/paper-icon-button-light';
/* eslint-disable indent */
@ -163,7 +163,7 @@ import 'paper-icon-button-light';
function onSaveComplete(page) {
loading.hide();
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('SettingsSaved'));
});
}
@ -195,7 +195,7 @@ import 'paper-icon-button-light';
function showSchedulePopup(page, schedule, index) {
schedule = schedule || {};
import('components/accessSchedule/accessSchedule').then(({default: accessschedule}) => {
import('../../../components/accessSchedule/accessSchedule').then(({default: accessschedule}) => {
accessschedule.show({
schedule: schedule
}).then(function (updatedSchedule) {
@ -228,7 +228,7 @@ import 'paper-icon-button-light';
}
function showBlockedTagPopup(page) {
import('prompt').then(({default: prompt}) => {
import('../../../components/prompt/prompt').then(({default: prompt}) => {
prompt({
label: globalize.translate('LabelTag')
}).then(function (value) {

View file

@ -1,7 +1,7 @@
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import 'emby-button';
import loading from '../../../components/loading/loading';
import libraryMenu from '../../../scripts/libraryMenu';
import globalize from '../../../scripts/globalize';
import '../../../elements/emby-button/emby-button';
/* eslint-disable indent */
@ -52,7 +52,7 @@ import 'emby-button';
page.querySelector('.chkEnableLocalEasyPassword').checked = user.Configuration.EnableLocalPassword;
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(page);
});
});
@ -82,7 +82,7 @@ import 'emby-button';
ApiClient.updateUserConfiguration(user.Id, user.Configuration).then(function () {
loading.hide();
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('SettingsSaved'));
});
@ -105,7 +105,7 @@ import 'emby-button';
ApiClient.updateUserPassword(userId, currentPassword, newPassword).then(function () {
loading.hide();
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('PasswordSaved'));
});
@ -123,7 +123,7 @@ import 'emby-button';
const form = this;
if (form.querySelector('#txtNewPassword').value != form.querySelector('#txtNewPasswordConfirm').value) {
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('PasswordMatchError'));
});
} else {
@ -144,7 +144,7 @@ import 'emby-button';
function resetPassword() {
const msg = globalize.translate('PasswordResetConfirmation');
import('confirm').then(({default: confirm}) => {
import('../../../components/confirm/confirm').then(({default: confirm}) => {
confirm(msg, globalize.translate('ResetPassword')).then(function () {
const userId = params.userId;
loading.show();
@ -163,7 +163,7 @@ import 'emby-button';
function resetEasyPassword() {
const msg = globalize.translate('PinCodeResetConfirmation');
import('confirm').then(({default: confirm}) => {
import('../../../components/confirm/confirm').then(({default: confirm}) => {
confirm(msg, globalize.translate('HeaderPinCodeReset')).then(function () {
const userId = params.userId;
loading.show();

View file

@ -1,20 +1,20 @@
import loading from 'loading';
import dom from 'dom';
import globalize from 'globalize';
import * as datefns from 'date-fns';
import dfnshelper from 'dfnshelper';
import 'paper-icon-button-light';
import 'cardStyle';
import 'emby-button';
import 'indicators';
import 'flexStyles';
import loading from '../../../components/loading/loading';
import dom from '../../../scripts/dom';
import globalize from '../../../scripts/globalize';
import { formatDistanceToNow } from 'date-fns';
import { localeWithSuffix } from '../../../scripts/dfnshelper';
import '../../../elements/emby-button/paper-icon-button-light';
import '../../../components/cardbuilder/card.css';
import '../../../elements/emby-button/emby-button';
import '../../../components/indicators/indicators.css';
import '../../../assets/css/flexstyles.css';
/* eslint-disable indent */
function deleteUser(page, id) {
const msg = globalize.translate('DeleteUserConfirmation');
import('confirm').then(({default: confirm}) => {
import('../../../components/confirm/confirm').then(({default: confirm}) => {
confirm({
title: globalize.translate('DeleteUser'),
text: msg,
@ -55,7 +55,7 @@ import 'flexStyles';
icon: 'delete'
});
import('actionsheet').then(({default: actionsheet}) => {
import('../../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
actionsheet.show({
items: menuItems,
positionTo: card,
@ -139,7 +139,7 @@ import 'flexStyles';
// how dates are returned by the server when the session is active and show something like 'Active now', instead of past/future sentences
function getLastSeenText(lastActivityDate) {
if (lastActivityDate) {
return globalize.translate('LastSeen', datefns.formatDistanceToNow(Date.parse(lastActivityDate), dfnshelper.localeWithSuffix));
return globalize.translate('LastSeen', formatDistanceToNow(Date.parse(lastActivityDate), localeWithSuffix));
}
return '';

View file

@ -1,11 +1,11 @@
import loading from 'loading';
import 'scripts/editorsidebar';
import loading from '../components/loading/loading';
import '../scripts/editorsidebar';
function reload(context, itemId) {
loading.show();
if (itemId) {
import('metadataEditor').then(({ default: metadataEditor }) => {
import('../components/metadataEditor/metadataEditor').then((metadataEditor) => {
metadataEditor.embed(context.querySelector('.editPageInnerContent'), itemId, ApiClient.serverInfo().Id);
});
} else {

View file

@ -1,12 +1,13 @@
import appRouter from 'appRouter';
import cardBuilder from 'cardBuilder';
import dom from 'dom';
import globalize from 'globalize';
import appHost from 'apphost';
import layoutManager from 'layoutManager';
import focusManager from 'focusManager';
import 'emby-itemscontainer';
import 'emby-scroller';
import appRouter from '../components/appRouter';
import cardBuilder from '../components/cardbuilder/cardBuilder';
import dom from '../scripts/dom';
import globalize from '../scripts/globalize';
import connectionManager from 'jellyfin-apiclient';
import appHost from '../components/apphost';
import layoutManager from '../components/layoutManager';
import focusManager from '../components/focusManager';
import '../elements/emby-itemscontainer/emby-itemscontainer';
import '../elements/emby-scroller/emby-scroller';
/* eslint-disable indent */

View file

@ -1,8 +1,8 @@
import TabbedView from 'tabbedView';
import globalize from 'globalize';
import 'emby-tabs';
import 'emby-button';
import 'emby-scroller';
import TabbedView from '../components/tabbedview/tabbedview';
import globalize from '../scripts/globalize';
import '../elements/emby-tabs/emby-tabs';
import '../elements/emby-button/emby-button';
import '../elements/emby-scroller/emby-scroller';
class HomeView extends TabbedView {
constructor(view, params) {

View file

@ -1,8 +1,9 @@
import * as userSettings from 'userSettings';
import loading from 'loading';
import focusManager from 'focusManager';
import homeSections from 'homeSections';
import 'emby-itemscontainer';
import * as userSettings from '../scripts/settings/userSettings';
import loading from '../components/loading/loading';
import connectionManager from 'jellyfin-apiclient';
import focusManager from '../components/focusManager';
import homeSections from '../components/homesections/homesections';
import '../elements/emby-itemscontainer/emby-itemscontainer';
class HomeTab {
constructor(view, params) {

View file

@ -1,32 +1,32 @@
import appHost from 'apphost';
import loading from 'loading';
import appRouter from 'appRouter';
import itemShortcuts from 'itemShortcuts';
import layoutManager from 'layoutManager';
import * as userSettings from 'userSettings';
import cardBuilder from 'cardBuilder';
import datetime from 'datetime';
import mediaInfo from 'mediaInfo';
import backdrop from 'backdrop';
import listView from 'listView';
import itemContextMenu from 'itemContextMenu';
import itemHelper from 'itemHelper';
import dom from 'dom';
import indicators from 'indicators';
import imageLoader from 'imageLoader';
import libraryMenu from 'libraryMenu';
import globalize from 'globalize';
import browser from 'browser';
import events from 'events';
import playbackManager from 'playbackManager';
import 'scrollStyles';
import 'emby-itemscontainer';
import 'emby-checkbox';
import 'emby-button';
import 'emby-playstatebutton';
import 'emby-ratingbutton';
import 'emby-scroller';
import 'emby-select';
import appHost from '../../components/apphost';
import loading from '../../components/loading/loading';
import appRouter from '../../components/appRouter';
import layoutManager from '../../components/layoutManager';
import { connectionManager, events } from 'jellyfin-apiclient';
import * as userSettings from '../../scripts/settings/userSettings';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import datetime from '../../scripts/datetime';
import mediaInfo from '../../components/mediainfo/mediainfo';
import backdrop from '../../components/backdrop/backdrop';
import listView from '../../components/listview/listview';
import itemContextMenu from '../../components/itemContextMenu';
import itemHelper from '../../components/itemHelper';
import dom from '../../scripts/dom';
import indicators from '../../components/indicators/indicators';
import imageLoader from '../../components/images/imageLoader';
import libraryMenu from '../../scripts/libraryMenu';
import globalize from '../../scripts/globalize';
import browser from '../../scripts/browser';
import playbackManager from '../../components/playback/playbackmanager';
import '../../assets/css/scrollstyles.css';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
import '../../elements/emby-checkbox/emby-checkbox';
import '../../elements/emby-button/emby-button';
import '../../elements/emby-playstatebutton/emby-playstatebutton';
import '../../elements/emby-ratingbutton/emby-ratingbutton';
import '../../elements/emby-scroller/emby-scroller';
import '../../elements/emby-select/emby-select';
import itemShortcuts from '../../components/shortcuts';
function getPromise(apiClient, params) {
const id = params.id;
@ -140,7 +140,7 @@ function renderSeriesTimerEditor(page, item, apiClient, user) {
}
if (user.Policy.EnableLiveTvManagement) {
import('seriesRecordingEditor').then(({ default: seriesRecordingEditor }) => {
import('../../components/recordingcreator/seriesrecordingeditor').then(({ default: seriesRecordingEditor }) => {
seriesRecordingEditor.embed(item, apiClient.serverId(), {
context: page.querySelector('.seriesRecordingEditor')
});
@ -666,7 +666,7 @@ function reloadFromItem(instance, page, params, item, user) {
hideAll(page, 'btnDownload', true);
}
import('autoFocuser').then(({ default: autoFocuser }) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(page);
});
}
@ -708,7 +708,7 @@ function showRecordingFields(instance, page, item, user) {
const recordingFieldsElement = page.querySelector('.recordingFields');
if (item.Type == 'Program' && user.Policy.EnableLiveTvManagement) {
import('recordingFields').then(({ default: recordingFields }) => {
import('../../components/recordingcreator/recordingfields').then(({ default: recordingFields }) => {
instance.currentRecordingFields = new recordingFields({
parent: recordingFieldsElement,
programId: item.Id,
@ -1485,13 +1485,13 @@ function renderChildren(page, item) {
}
function renderItemsByName(page, item) {
import('scripts/itembynamedetailpage').then(() => {
import('../../scripts/itembynamedetailpage').then(() => {
window.ItemsByName.renderItems(page, item);
});
}
function renderPlaylistItems(page, item) {
import('scripts/playlistedit').then(() => {
import('../../scripts/playlistedit').then(() => {
PlaylistViewer.render(page, item);
});
}
@ -1695,7 +1695,7 @@ function renderCollectionItems(page, parentItem, types, items) {
// HACK: Call autoFocuser again because btnPlay may be hidden, but focused by reloadFromItem
// FIXME: Sometimes focus does not move until all (?) sections are loaded
import('autoFocuser').then(({ default: autoFocuser }) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(page);
});
}
@ -1770,7 +1770,7 @@ function renderScenes(page, item) {
page.querySelector('#scenesCollapsible').classList.remove('hide');
const scenesContent = page.querySelector('#scenesContent');
import('chaptercardbuilder').then(({ default: chaptercardbuilder }) => {
import('../../components/cardbuilder/chaptercardbuilder').then(({ default: chaptercardbuilder }) => {
chaptercardbuilder.buildChapterCards(item, chapters, {
itemsContainer: scenesContent,
backdropShape: 'overflowBackdrop',
@ -1815,7 +1815,7 @@ function renderCast(page, item) {
page.querySelector('#castCollapsible').classList.remove('hide');
const castContent = page.querySelector('#castContent');
import('peoplecardbuilder').then(({ default: peoplecardbuilder }) => {
import('../../components/cardbuilder/peoplecardbuilder').then(({ default: peoplecardbuilder }) => {
peoplecardbuilder.buildPeopleCards(people, {
itemsContainer: castContent,
coverImage: true,
@ -1863,7 +1863,7 @@ export default function (view, params) {
}
function splitVersions(instance, page, apiClient, params) {
import('confirm').then(({ default: confirm }) => {
import('../../components/confirm/confirm').then(({ default: confirm }) => {
confirm('Are you sure you wish to split the media sources into separate items?', 'Split Media Apart').then(function () {
loading.show();
apiClient.ajax({
@ -1929,7 +1929,7 @@ export default function (view, params) {
}
function onCancelSeriesTimerClick() {
import('recordingHelper').then(({ default: recordingHelper }) => {
import('../../components/recordingcreator/recordinghelper').then(({ default: recordingHelper }) => {
recordingHelper.cancelSeriesTimerWithConfirmation(currentItem.Id, currentItem.ServerId).then(function () {
Dashboard.navigate('livetv.html');
});
@ -1937,7 +1937,7 @@ export default function (view, params) {
}
function onCancelTimerClick() {
import('recordingHelper').then(({ default: recordingHelper }) => {
import('../../components/recordingcreator/recordinghelper').then(({ default: recordingHelper }) => {
recordingHelper.cancelTimer(window.connectionManager.getApiClient(currentItem.ServerId), currentItem.TimerId).then(function () {
reload(self, view, params);
});
@ -1949,7 +1949,7 @@ export default function (view, params) {
}
function onDownloadClick() {
import('fileDownloader').then(({ default: fileDownloader }) => {
import('../../scripts/fileDownloader').then(({ default: fileDownloader }) => {
const downloadHref = apiClient.getItemDownloadUrl(currentItem.Id);
fileDownloader.download([{
url: downloadHref,

View file

@ -1,15 +1,16 @@
import globalize from 'globalize';
import listView from 'listView';
import layoutManager from 'layoutManager';
import * as userSettings from 'userSettings';
import focusManager from 'focusManager';
import cardBuilder from 'cardBuilder';
import loading from 'loading';
import AlphaNumericShortcuts from 'alphaNumericShortcuts';
import playbackManager from 'playbackManager';
import AlphaPicker from 'alphaPicker';
import 'emby-itemscontainer';
import 'emby-scroller';
import globalize from '../scripts/globalize';
import listView from '../components/listview/listview';
import layoutManager from '../components/layoutManager';
import * as userSettings from '../scripts/settings/userSettings';
import focusManager from '../components/focusManager';
import cardBuilder from '../components/cardbuilder/cardBuilder';
import loading from '../components/loading/loading';
import connectionManager from 'jellyfin-apiclient';
import AlphaNumericShortcuts from '../scripts/alphanumericshortcuts';
import playbackManager from '../components/playback/playbackmanager';
import AlphaPicker from '../components/alphaPicker/alphaPicker';
import '../elements/emby-itemscontainer/emby-itemscontainer';
import '../elements/emby-scroller/emby-scroller';
/* eslint-disable indent */
@ -345,7 +346,7 @@ import 'emby-scroller';
function showViewSettingsMenu() {
const instance = this;
import('viewSettings').then(({default: ViewSettings}) => {
import('../components/viewSettings/viewSettings').then((ViewSettings) => {
new ViewSettings().show({
settingsKey: instance.getSettingsKey(),
settings: instance.getViewSettings(),
@ -360,7 +361,7 @@ import 'emby-scroller';
function showFilterMenu() {
const instance = this;
import('filterMenu').then(({default: FilterMenu}) => {
import('../components/filtermenu/filtermenu').then(({default: FilterMenu}) => {
new FilterMenu().show({
settingsKey: instance.getSettingsKey(),
settings: instance.getFilters(),
@ -379,7 +380,7 @@ import 'emby-scroller';
function showSortMenu() {
const instance = this;
import('sortMenu').then(({default: SortMenu}) => {
import('../components/sortmenu/sortmenu').then((SortMenu) => {
new SortMenu().show({
settingsKey: instance.getSettingsKey(),
settings: instance.getSortValues(),
@ -397,7 +398,7 @@ import 'emby-scroller';
function onNewItemClick() {
const instance = this;
import('playlistEditor').then(({default: playlistEditor}) => {
import('../components/playlisteditor/playlisteditor').then((playlistEditor) => {
new playlistEditor({
items: [],
serverId: instance.params.serverId

View file

@ -1,10 +1,10 @@
import cardBuilder from 'cardBuilder';
import imageLoader from 'imageLoader';
import libraryBrowser from 'libraryBrowser';
import loading from 'loading';
import events from 'events';
import * as userSettings from 'userSettings';
import 'emby-itemscontainer';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import imageLoader from '../../components/images/imageLoader';
import libraryBrowser from '../../scripts/libraryBrowser';
import loading from '../../components/loading/loading';
import events from 'jellyfin-apiclient';
import * as userSettings from '../../scripts/settings/userSettings';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
export default function (view, params, tabContent) {
function getPageData() {
@ -115,7 +115,7 @@ export default function (view, params, tabContent) {
loading.hide();
isLoading = false;
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(view);
});
});

View file

@ -1,4 +1,4 @@
import tvguide from 'tvguide';
import tvguide from '../../components/guide/guide';
export default function (view, params, tabContent) {
let guideInstance;

View file

@ -1,9 +1,9 @@
import loading from 'loading';
import cardBuilder from 'cardBuilder';
import imageLoader from 'imageLoader';
import 'scripts/livetvcomponents';
import 'listViewStyle';
import 'emby-itemscontainer';
import loading from '../../components/loading/loading';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import imageLoader from '../../components/images/imageLoader';
import '../../scripts/livetvcomponents';
import '../../components/listview/listview.css';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
function renderRecordings(elem, recordings, cardOptions, scrollX) {
if (!elem) {

View file

@ -1,10 +1,10 @@
import layoutManager from 'layoutManager';
import cardBuilder from 'cardBuilder';
import imageLoader from 'imageLoader';
import loading from 'loading';
import 'scripts/livetvcomponents';
import 'emby-button';
import 'emby-itemscontainer';
import layoutManager from '../../components/layoutManager';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import imageLoader from '../../components/images/imageLoader';
import loading from '../../components/loading/loading';
import '../../scripts/livetvcomponents';
import '../../elements/emby-button/emby-button';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
function enableScrollX() {
return !layoutManager.desktop;

View file

@ -1,8 +1,8 @@
import cardBuilder from 'cardBuilder';
import imageLoader from 'imageLoader';
import loading from 'loading';
import 'paper-icon-button-light';
import 'emby-button';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import imageLoader from '../../components/images/imageLoader';
import loading from '../../components/loading/loading';
import '../../elements/emby-button/paper-icon-button-light';
import '../../elements/emby-button/emby-button';
function renderTimers(context, timers) {
const html = cardBuilder.getCardsHtml({

View file

@ -1,15 +1,15 @@
import layoutManager from 'layoutManager';
import * as userSettings from 'userSettings';
import inputManager from 'inputManager';
import loading from 'loading';
import globalize from 'globalize';
import * as mainTabsManager from 'mainTabsManager';
import cardBuilder from 'cardBuilder';
import imageLoader from 'imageLoader';
import 'scrollStyles';
import 'emby-itemscontainer';
import 'emby-tabs';
import 'emby-button';
import layoutManager from '../../components/layoutManager';
import * as userSettings from '../../scripts/settings/userSettings';
import inputManager from '../../scripts/inputManager';
import loading from '../../components/loading/loading';
import globalize from '../../scripts/globalize';
import * as mainTabsManager from '../../components/maintabsmanager';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import imageLoader from '../../components/images/imageLoader';
import '../../assets/css/scrollstyles.css';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
import '../../elements/emby-tabs/emby-tabs';
import '../../elements/emby-button/emby-button';
function enableScrollX() {
return !layoutManager.desktop;
@ -60,7 +60,7 @@ function loadRecommendedPrograms(page) {
});
loading.hide();
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(page);
});
});

View file

@ -1,6 +1,6 @@
import events from 'events';
import loading from 'loading';
import globalize from 'globalize';
import events from 'jellyfin-apiclient';
import loading from '../components/loading/loading';
import globalize from '../scripts/globalize';
function onListingsSubmitted() {
Dashboard.navigate('livetvstatus.html');
@ -17,7 +17,7 @@ function init(page, type, providerId) {
}
function loadTemplate(page, type, providerId) {
import('text!./../components/tvproviders/' + type + '.template.html').then(({default: html}) => {
import('./../components/tvproviders/' + type + '.template.html').then(({default: html}) => {
page.querySelector('.providerTemplate').innerHTML = globalize.translateHtml(html);
init(page, type, providerId);
});

View file

@ -1,7 +1,7 @@
import $ from 'jQuery';
import loading from 'loading';
import globalize from 'globalize';
import 'emby-button';
import 'jquery';
import loading from '../components/loading/loading';
import globalize from '../scripts/globalize';
import '../elements/emby-button/emby-button';
function loadPage(page, config) {
$('.liveTvSettingsForm', page).show();
@ -50,7 +50,7 @@ function showSaveMessage(recordingPathChanged) {
}
if (msg) {
import('alert').then(({default: alert}) => {
import('../components/alert').then(({default: alert}) => {
alert(msg);
});
}
@ -61,7 +61,7 @@ export default function () {
const page = this;
$('.liveTvSettingsForm').off('submit', onSubmit).on('submit', onSubmit);
$('#btnSelectRecordingPath', page).on('click.selectDirectory', function () {
import('directorybrowser').then(({default: directoryBrowser}) => {
import('../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
const picker = new directoryBrowser();
picker.show({
callback: function (path) {
@ -76,7 +76,7 @@ export default function () {
});
});
$('#btnSelectMovieRecordingPath', page).on('click.selectDirectory', function () {
import('directorybrowser').then(({default: directoryBrowser}) => {
import('../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
const picker = new directoryBrowser();
picker.show({
callback: function (path) {
@ -91,7 +91,7 @@ export default function () {
});
});
$('#btnSelectSeriesRecordingPath', page).on('click.selectDirectory', function () {
import('directorybrowser').then(({default: directoryBrowser}) => {
import('../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
const picker = new directoryBrowser();
picker.show({
callback: function (path) {
@ -106,7 +106,7 @@ export default function () {
});
});
$('#btnSelectPostProcessorPath', page).on('click.selectDirectory', function () {
import('directorybrowser').then(({default: directoryBrowser}) => {
import('../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
const picker = new directoryBrowser();
picker.show({
includeFiles: true,

View file

@ -1,16 +1,16 @@
import $ from 'jQuery';
import globalize from 'globalize';
import taskButton from 'scripts/taskbutton';
import dom from 'dom';
import layoutManager from 'layoutManager';
import loading from 'loading';
import browser from 'browser';
import 'listViewStyle';
import 'flexStyles';
import 'emby-itemscontainer';
import 'cardStyle';
import 'material-icons';
import 'emby-button';
import 'jquery';
import globalize from '../scripts/globalize';
import taskButton from '../scripts/taskbutton';
import dom from '../scripts/dom';
import layoutManager from '../components/layoutManager';
import loading from '../components/loading/loading';
import browser from '../scripts/browser';
import '../components/listview/listview.css';
import '../assets/css/flexstyles.css';
import '../elements/emby-itemscontainer/emby-itemscontainer';
import '../components/cardbuilder/card.css';
import 'material-design-icons-iconfont';
import '../elements/emby-button/emby-button';
const enableFocusTransform = !browser.slow && !browser.edge;
@ -56,7 +56,7 @@ function renderDevices(page, devices) {
function deleteDevice(page, id) {
const message = globalize.translate('MessageConfirmDeleteTunerDevice');
import('confirm').then(({default: confirm}) => {
import('../components/confirm/confirm').then(({default: confirm}) => {
confirm(message, globalize.translate('HeaderDeleteDevice')).then(function () {
loading.show();
ApiClient.ajax({
@ -145,7 +145,7 @@ function showProviderOptions(page, providerId, button) {
id: 'map'
});
import('actionsheet').then(({default: actionsheet}) => {
import('../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
actionsheet.show({
items: items,
positionTo: button
@ -163,7 +163,7 @@ function showProviderOptions(page, providerId, button) {
}
function mapChannels(page, providerId) {
import('components/channelMapper/channelMapper').then(({default: channelMapper}) => {
import('../components/channelMapper/channelMapper').then(({default: channelMapper}) => {
new channelMapper({
serverId: ApiClient.serverInfo().Id,
providerId: providerId
@ -174,7 +174,7 @@ function mapChannels(page, providerId) {
function deleteProvider(page, id) {
const message = globalize.translate('MessageConfirmDeleteGuideProvider');
import('confirm').then(({default: confirm}) => {
import('../components/confirm/confirm').then(({default: confirm}) => {
confirm(message, globalize.translate('HeaderDeleteProvider')).then(function () {
loading.show();
ApiClient.ajax({
@ -237,7 +237,7 @@ function addProvider(button) {
id: 'xmltv'
});
import('actionsheet').then(({default: actionsheet}) => {
import('../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
actionsheet.show({
items: menuItems,
positionTo: button,
@ -263,7 +263,7 @@ function showDeviceMenu(button, tunerDeviceId) {
id: 'edit'
});
import('actionsheet').then(({default: actionsheet}) => {
import('../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
actionsheet.show({
items: items,
positionTo: button

View file

@ -1,10 +1,10 @@
import globalize from 'globalize';
import loading from 'loading';
import dom from 'dom';
import 'emby-input';
import 'emby-button';
import 'emby-checkbox';
import 'emby-select';
import globalize from '../scripts/globalize';
import loading from '../components/loading/loading';
import dom from '../scripts/dom';
import '../elements/emby-input/emby-input';
import '../elements/emby-button/emby-button';
import '../elements/emby-checkbox/emby-checkbox';
import '../elements/emby-select/emby-select';
function isM3uVariant(type) {
return ['nextpvr'].indexOf(type || '') !== -1;
@ -102,7 +102,7 @@ function submitForm(page) {
}
function getDetectedDevice() {
return import('tunerPicker').then(({default: tunerPicker}) => {
return import('../components/tunerPicker').then((tunerPicker) => {
return new tunerPicker().show({
serverId: ApiClient.serverId()
});
@ -211,7 +211,7 @@ export default function (view, params) {
});
});
view.querySelector('.btnSelectPath').addEventListener('click', function () {
import('directorybrowser').then(({default: directorybrowser}) => {
import('../components/directorybrowser/directorybrowser').then(({default: directorybrowser}) => {
const picker = new directorybrowser();
picker.show({
includeFiles: true,

View file

@ -1,11 +1,11 @@
import loading from 'loading';
import libraryBrowser from 'libraryBrowser';
import imageLoader from 'imageLoader';
import listView from 'listView';
import cardBuilder from 'cardBuilder';
import * as userSettings from 'userSettings';
import globalize from 'globalize';
import 'emby-itemscontainer';
import loading from '../../components/loading/loading';
import libraryBrowser from '../../scripts/libraryBrowser';
import imageLoader from '../../components/images/imageLoader';
import listView from '../../components/listview/listview';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import * as userSettings from '../../scripts/settings/userSettings';
import globalize from '../../scripts/globalize';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
/* eslint-disable indent */
@ -193,7 +193,7 @@ import 'emby-itemscontainer';
loading.hide();
isLoading = false;
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(page);
});
});
@ -246,7 +246,7 @@ import 'emby-itemscontainer';
reloadItems(tabContent);
});
tabContent.querySelector('.btnNewCollection').addEventListener('click', () => {
import('collectionEditor').then(({default: collectionEditor}) => {
import('../../components/collectionEditor/collectionEditor').then(({default: collectionEditor}) => {
const serverId = ApiClient.serverInfo().Id;
new collectionEditor({
items: [],

View file

@ -1,11 +1,11 @@
import layoutManager from 'layoutManager';
import loading from 'loading';
import libraryBrowser from 'libraryBrowser';
import cardBuilder from 'cardBuilder';
import lazyLoader from 'lazyLoader';
import globalize from 'globalize';
import appRouter from 'appRouter';
import 'emby-button';
import layoutManager from '../../components/layoutManager';
import loading from '../../components/loading/loading';
import libraryBrowser from '../../scripts/libraryBrowser';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import lazyLoader from '../../components/lazyLoader/lazyLoaderIntersectionObserver';
import globalize from '../../scripts/globalize';
import appRouter from '../../components/appRouter';
import '../../elements/emby-button/emby-button';
/* eslint-disable indent */

View file

@ -1,12 +1,12 @@
import loading from 'loading';
import * as userSettings from 'userSettings';
import events from 'events';
import libraryBrowser from 'libraryBrowser';
import AlphaPicker from 'alphaPicker';
import listView from 'listView';
import cardBuilder from 'cardBuilder';
import globalize from 'globalize';
import 'emby-itemscontainer';
import loading from '../../components/loading/loading';
import * as userSettings from '../../scripts/settings/userSettings';
import events from 'jellyfin-apiclient';
import libraryBrowser from '../../scripts/libraryBrowser';
import { AlphaPicker } from '../../components/alphaPicker/alphaPicker';
import listView from '../../components/listview/listview';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import globalize from '../../scripts/globalize';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
/* eslint-disable indent */
@ -91,7 +91,7 @@ import 'emby-itemscontainer';
isLoading = false;
loading.hide();
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(tabContent);
});
}
@ -278,7 +278,7 @@ import 'emby-itemscontainer';
query = userSettings.loadQuerySettings(savedQueryKey, query);
this.showFilterMenu = function () {
import('components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
const filterDialog = new filterDialogFactory({
query: query,
mode: 'movies',

View file

@ -1,18 +1,19 @@
import events from 'events';
import layoutManager from 'layoutManager';
import inputManager from 'inputManager';
import * as userSettings from 'userSettings';
import libraryMenu from 'libraryMenu';
import * as mainTabsManager from 'mainTabsManager';
import cardBuilder from 'cardBuilder';
import dom from 'dom';
import imageLoader from 'imageLoader';
import playbackManager from 'playbackManager';
import globalize from 'globalize';
import 'emby-scroller';
import 'emby-itemscontainer';
import 'emby-tabs';
import 'emby-button';
import events from 'jellyfin-apiclient';
import layoutManager from '../../components/layoutManager';
import inputManager from '../../scripts/inputManager';
import * as userSettings from '../../scripts/settings/userSettings';
import libraryMenu from '../../scripts/libraryMenu';
import * as mainTabsManager from '../../components/maintabsmanager';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import dom from '../../scripts/dom';
import imageLoader from '../../components/images/imageLoader';
import playbackManager from '../../components/playback/playbackmanager';
import globalize from '../../scripts/globalize';
import '../../elements/emby-scroller/emby-scroller';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
import '../../elements/emby-tabs/emby-tabs';
import '../../elements/emby-button/emby-button';
/* eslint-disable indent */
@ -182,7 +183,7 @@ import 'emby-button';
}
function autoFocus(page) {
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(page);
});
}

View file

@ -1,13 +1,13 @@
import loading from 'loading';
import events from 'events';
import libraryBrowser from 'libraryBrowser';
import imageLoader from 'imageLoader';
import AlphaPicker from 'alphaPicker';
import listView from 'listView';
import cardBuilder from 'cardBuilder';
import * as userSettings from 'userSettings';
import globalize from 'globalize';
import 'emby-itemscontainer';
import loading from '../../components/loading/loading';
import events from 'jellyfin-apiclient';
import libraryBrowser from '../../scripts/libraryBrowser';
import imageLoader from '../../components/images/imageLoader';
import { AlphaPicker } from '../../components/alphaPicker/alphaPicker';
import listView from '../../components/listview/listview';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import * as userSettings from '../../scripts/settings/userSettings';
import globalize from '../../scripts/globalize';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
/* eslint-disable indent */
@ -192,7 +192,7 @@ import 'emby-itemscontainer';
let isLoading = false;
this.showFilterMenu = function () {
import('components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
const filterDialog = new filterDialogFactory({
query: getQuery(tabContent),
mode: 'movies',

View file

@ -1,14 +1,14 @@
import playbackManager from 'playbackManager';
import loading from 'loading';
import events from 'events';
import libraryBrowser from 'libraryBrowser';
import imageLoader from 'imageLoader';
import AlphaPicker from 'alphaPicker';
import listView from 'listView';
import cardBuilder from 'cardBuilder';
import * as userSettings from 'userSettings';
import globalize from 'globalize';
import 'emby-itemscontainer';
import playbackManager from '../../components/playback/playbackmanager';
import loading from '../../components/loading/loading';
import events from 'jellyfin-apiclient';
import libraryBrowser from '../../scripts/libraryBrowser';
import imageLoader from '../../components/images/imageLoader';
import AlphaPicker from '../../components/alphaPicker/alphaPicker';
import listView from '../../components/listview/listview';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import * as userSettings from '../../scripts/settings/userSettings';
import globalize from '../../scripts/globalize';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
/* eslint-disable indent */
@ -179,7 +179,7 @@ import 'emby-itemscontainer';
loading.hide();
isLoading = false;
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(tabContent);
});
});
@ -204,7 +204,7 @@ import 'emby-itemscontainer';
let isLoading = false;
this.showFilterMenu = function () {
import('components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
const filterDialog = new filterDialogFactory({
query: getQuery(),
mode: 'albums',

View file

@ -1,12 +1,12 @@
import loading from 'loading';
import events from 'events';
import libraryBrowser from 'libraryBrowser';
import imageLoader from 'imageLoader';
import AlphaPicker from 'alphaPicker';
import listView from 'listView';
import cardBuilder from 'cardBuilder';
import * as userSettings from 'userSettings';
import 'emby-itemscontainer';
import loading from '../../components/loading/loading';
import events from 'jellyfin-apiclient';
import libraryBrowser from '../../scripts/libraryBrowser';
import imageLoader from '../../components/images/imageLoader';
import { AlphaPicker } from '../../components/alphaPicker/alphaPicker';
import listView from '../../components/listview/listview';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import * as userSettings from '../../scripts/settings/userSettings';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
/* eslint-disable indent */
@ -161,7 +161,7 @@ import 'emby-itemscontainer';
loading.hide();
isLoading = false;
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(tabContent);
});
});
@ -176,7 +176,7 @@ import 'emby-itemscontainer';
let isLoading = false;
this.showFilterMenu = function () {
import('components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
const filterDialog = new filterDialogFactory({
query: getQuery(tabContent),
mode: this.mode,

View file

@ -1,7 +1,7 @@
import libraryBrowser from 'libraryBrowser';
import cardBuilder from 'cardBuilder';
import imageLoader from 'imageLoader';
import loading from 'loading';
import libraryBrowser from '../../scripts/libraryBrowser';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import imageLoader from '../../components/images/imageLoader';
import loading from '../../components/loading/loading';
/* eslint-disable indent */
@ -92,7 +92,7 @@ import loading from 'loading';
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);
loading.hide();
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(context);
});
});

View file

@ -1,7 +1,7 @@
import libraryBrowser from 'libraryBrowser';
import cardBuilder from 'cardBuilder';
import imageLoader from 'imageLoader';
import loading from 'loading';
import libraryBrowser from '../../scripts/libraryBrowser';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import imageLoader from '../../components/images/imageLoader';
import loading from '../../components/loading/loading';
/* eslint-disable indent */
@ -63,7 +63,7 @@ import loading from 'loading';
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);
loading.hide();
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(context);
});
});

View file

@ -1,19 +1,19 @@
import browser from 'browser';
import layoutManager from 'layoutManager';
import * as userSettings from 'userSettings';
import inputManager from 'inputManager';
import loading from 'loading';
import cardBuilder from 'cardBuilder';
import dom from 'dom';
import imageLoader from 'imageLoader';
import libraryMenu from 'libraryMenu';
import * as mainTabsManager from 'mainTabsManager';
import globalize from 'globalize';
import 'scrollStyles';
import 'emby-itemscontainer';
import 'emby-tabs';
import 'emby-button';
import 'flexStyles';
import browser from '../../scripts/browser';
import layoutManager from '../../components/layoutManager';
import * as userSettings from '../../scripts/settings/userSettings';
import inputManager from '../../scripts/inputManager';
import loading from '../../components/loading/loading';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import dom from '../../scripts/dom';
import imageLoader from '../../components/images/imageLoader';
import libraryMenu from '../../scripts/libraryMenu';
import * as mainTabsManager from '../../components/maintabsmanager';
import globalize from '../../scripts/globalize';
import '../../assets/css/scrollstyles.css';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
import '../../elements/emby-tabs/emby-tabs';
import '../../elements/emby-button/emby-button';
import '../../assets/css/flexstyles.css';
/* eslint-disable indent */
@ -74,7 +74,7 @@ import 'flexStyles';
imageLoader.lazyChildren(elem);
loading.hide();
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(page);
});
});
@ -170,7 +170,7 @@ import 'flexStyles';
loadRecentlyPlayed(tabContent, parentId);
loadFrequentlyPlayed(tabContent, parentId);
import('components/favoriteitems').then(({default: favoriteItems}) => {
import('../../components/favoriteitems').then(({default: favoriteItems}) => {
favoriteItems.render(tabContent, ApiClient.getCurrentUserId(), parentId, ['favoriteArtists', 'favoriteAlbums', 'favoriteSongs']);
});
}

View file

@ -1,11 +1,12 @@
import events from 'events';
import libraryBrowser from 'libraryBrowser';
import imageLoader from 'imageLoader';
import listView from 'listView';
import loading from 'loading';
import * as userSettings from 'userSettings';
import globalize from 'globalize';
import 'emby-itemscontainer';
import events from 'jellyfin-apiclient';
import libraryBrowser from '../../scripts/libraryBrowser';
import imageLoader from '../../components/images/imageLoader';
import listView from '../../components/listview/listview';
import loading from '../../components/loading/loading';
import * as userSettings from '../../scripts/settings/userSettings';
import globalize from '../../scripts/globalize';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
/* eslint-disable indent */
@ -119,7 +120,7 @@ import 'emby-itemscontainer';
loading.hide();
isLoading = false;
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(page);
});
});
@ -130,7 +131,7 @@ import 'emby-itemscontainer';
let isLoading = false;
self.showFilterMenu = function () {
import('components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
const filterDialog = new filterDialogFactory({
query: getQuery(tabContent),
mode: 'songs',

View file

@ -1,6 +1,6 @@
import remotecontrolFactory from 'components/remotecontrol/remotecontrol';
import libraryMenu from 'libraryMenu';
import 'emby-button';
import remotecontrolFactory from '../../../components/remotecontrol/remotecontrol';
import libraryMenu from '../../../scripts/libraryMenu';
import '../../../elements/emby-button/emby-button';
export default function (view, params) {
const remoteControl = new remotecontrolFactory();

View file

@ -1,22 +1,22 @@
import playbackManager from 'playbackManager';
import dom from 'dom';
import inputManager from 'inputManager';
import mouseManager from 'mouseManager';
import datetime from 'datetime';
import itemHelper from 'itemHelper';
import mediaInfo from 'mediaInfo';
import focusManager from 'focusManager';
import events from 'events';
import browser from 'browser';
import globalize from 'globalize';
import appHost from 'apphost';
import layoutManager from 'layoutManager';
import * as userSettings from 'userSettings';
import keyboardnavigation from 'keyboardnavigation';
import 'scrollStyles';
import 'emby-slider';
import 'paper-icon-button-light';
import 'css!assets/css/videoosd';
import playbackManager from '../../../components/playback/playbackmanager';
import dom from '../../../scripts/dom';
import inputManager from '../../../scripts/inputManager';
import mouseManager from '../../../scripts/mouseManager';
import datetime from '../../../scripts/datetime';
import itemHelper from '../../../components/itemHelper';
import mediaInfo from '../../../components/mediainfo/mediainfo';
import focusManager from '../../../components/focusManager';
import { connectionManager, events } from 'jellyfin-apiclient';;
import browser from '../../../scripts/browser';
import globalize from '../../../scripts/globalize';
import appHost from '../../../components/apphost';
import layoutManager from '../../../components/layoutManager';
import * as userSettings from '../../../scripts/settings/userSettings';
import keyboardnavigation from '../../../scripts/keyboardNavigation';
import '../../../assets/css/scrollstyles.css';
import '../../../elements/emby-slider/emby-slider';
import '../../../elements/emby-button/paper-icon-button-light';
import '../../../assets/css/videoosd.css';
/* eslint-disable indent */
@ -99,7 +99,7 @@ import 'css!assets/css/videoosd';
window.connectionManager.getApiClient(item.ServerId).getCurrentUser().then(function (user) {
if (user.Policy.EnableLiveTvManagement) {
import('recordingButton').then(({default: RecordingButton}) => {
import('../../../components/recordingcreator/recordingbutton').then((RecordingButton) => {
if (recordingButtonManager) {
return void recordingButtonManager.refreshItem(item);
}
@ -613,7 +613,7 @@ import 'css!assets/css/videoosd';
}
function showComingUpNext(player) {
import('upNextDialog').then(({default: UpNextDialog}) => {
import('../../../components/upnextdialog/upnextdialog').then((UpNextDialog) => {
if (!(currentVisibleMenu || currentUpNextDialog)) {
currentVisibleMenu = 'upnext';
comingUpNextDisplayed = true;
@ -852,7 +852,7 @@ import 'css!assets/css/videoosd';
function onSettingsButtonClick(e) {
const btn = this;
import('playerSettingsMenu').then(({default: playerSettingsMenu}) => {
import('../../../components/playback/playersettingsmenu').then((playerSettingsMenu) => {
const player = currentPlayer;
if (player) {
@ -889,7 +889,7 @@ import 'css!assets/css/videoosd';
}
function toggleStats() {
import('playerStats').then(({default: PlayerStats}) => {
import('../../../components/playerstats/playerstats').then((PlayerStats) => {
const player = currentPlayer;
if (player) {
@ -929,7 +929,7 @@ import 'css!assets/css/videoosd';
});
const positionTo = this;
import('actionsheet').then(({default: actionsheet}) => {
import('../../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
actionsheet.show({
items: menuItems,
title: globalize.translate('Audio'),
@ -975,7 +975,7 @@ import 'css!assets/css/videoosd';
});
const positionTo = this;
import('actionsheet').then(({default: actionsheet}) => {
import('../../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
actionsheet.show({
title: globalize.translate('Subtitles'),
items: menuItems,
@ -997,7 +997,7 @@ import 'css!assets/css/videoosd';
}
function toggleSubtitleSync(action) {
import('subtitleSync').then(({default: SubtitleSync}) => {
import('../../../components/subtitlesync/subtitlesync').then((SubtitleSync) => {
const player = currentPlayer;
if (subtitleSyncOverlay) {
subtitleSyncOverlay.toggle(action);
@ -1228,7 +1228,7 @@ import 'css!assets/css/videoosd';
let playPauseClickTimeout;
function onViewHideStopPlayback() {
if (playbackManager.isPlayingVideo()) {
import('shell').then(({default: shell}) => {
import('../../../scripts/shell').then((shell) => {
shell.disableFullscreen();
});
@ -1248,7 +1248,7 @@ import 'css!assets/css/videoosd';
}
}
import('shell').then(({default: shell}) => {
import('../../../scripts/shell').then(({default: shell}) => {
shell.enableFullscreen();
});
@ -1337,7 +1337,7 @@ import 'css!assets/css/videoosd';
passive: true
});
} catch (e) {
import('appRouter').then(({default: appRouter}) => {
import('../../../components/appRouter').then(({default: appRouter}) => {
appRouter.goHome();
});
}
@ -1548,7 +1548,7 @@ import 'css!assets/css/videoosd';
if (browser.touch) {
(function () {
import('touchHelper').then(({default: TouchHelper}) => {
import('../../../scripts/touchHelper').then((TouchHelper) => {
self.touchHelper = new TouchHelper(view, {
swipeYThreshold: 30,
triggerOnMove: true,

View file

@ -1,6 +1,6 @@
import SearchFields from 'searchFields';
import SearchResults from 'searchResults';
import events from 'events';
import SearchFields from '../components/search/searchfields';
import SearchResults from '../components/search/searchresults';
import events from 'jellyfin-apiclient';
export default function (view, params) {
function onSearch(e, value) {

View file

@ -1,7 +1,7 @@
import appSettings from 'appSettings';
import loading from 'loading';
import globalize from 'globalize';
import 'emby-button';
import appSettings from '../../../scripts/settings/appSettings';
import loading from '../../../components/loading/loading';
import globalize from '../../../scripts/globalize';
import '../../../elements/emby-button/emby-button';
/* eslint-disable indent */
@ -51,7 +51,7 @@ import 'emby-button';
view.querySelector('.addServerForm').addEventListener('submit', onServerSubmit);
view.querySelector('.btnCancel').addEventListener('click', goBack);
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(view);
});
@ -62,7 +62,7 @@ import 'emby-button';
}
function goBack() {
import('appRouter').then(({default: appRouter}) => {
import('../../../components/appRouter').then(({default: appRouter}) => {
appRouter.back();
});
}

View file

@ -1,4 +1,4 @@
import globalize from 'globalize';
import globalize from '../../../scripts/globalize';
/* eslint-disable indent */

View file

@ -1,13 +1,14 @@
import appHost from 'apphost';
import appSettings from 'appSettings';
import dom from 'dom';
import loading from 'loading';
import layoutManager from 'layoutManager';
import libraryMenu from 'libraryMenu';
import browser from 'browser';
import globalize from 'globalize';
import 'cardStyle';
import 'emby-checkbox';
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';
import browser from '../../../scripts/browser';
import globalize from '../../../scripts/globalize';
import '../../../components/cardbuilder/card.css';
import '../../../elements/emby-checkbox/emby-checkbox';
/* eslint-disable indent */
@ -27,7 +28,7 @@ import 'emby-checkbox';
const UnauthorizedOrForbidden = [401, 403];
if (UnauthorizedOrForbidden.includes(response.status)) {
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
const messageKey = response.status === 401 ? 'MessageInvalidUser' : 'MessageUnauthorizedUser';
toast(globalize.translate(messageKey));
});
@ -202,7 +203,7 @@ import 'emby-checkbox';
view.querySelector('.manualLoginForm').classList.add('hide');
view.querySelector('.btnManual').classList.remove('hide');
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(view);
});
}

View file

@ -1,4 +1,4 @@
import globalize from 'globalize';
import globalize from '../../../scripts/globalize';
/* eslint-disable indent */

View file

@ -1,19 +1,20 @@
import loading from 'loading';
import appRouter from 'appRouter';
import layoutManager from 'layoutManager';
import libraryMenu from 'libraryMenu';
import appSettings from 'appSettings';
import focusManager from 'focusManager';
import globalize from 'globalize';
import actionSheet from 'actionsheet';
import dom from 'dom';
import browser from 'browser';
import 'material-icons';
import 'flexStyles';
import 'emby-scroller';
import 'emby-itemscontainer';
import 'cardStyle';
import 'emby-button';
import loading from '../../../components/loading/loading';
import appRouter from '../../../components/appRouter';
import layoutManager from '../../../components/layoutManager';
import libraryMenu from '../../../scripts/libraryMenu';
import appSettings from '../../../scripts/settings/appSettings';
import focusManager from '../../../components/focusManager';
import connectionManager from 'jellyfin-apiclient';
import globalize from '../../../scripts/globalize';
import actionSheet from '../../../components/actionSheet/actionSheet';
import dom from '../../../scripts/dom';
import browser from '../../../scripts/browser';
import 'material-design-icons-iconfont';
import '../../../assets/css/flexstyles.css';
import '../../../elements/emby-scroller/emby-scroller';
import '../../../elements/emby-itemscontainer/emby-itemscontainer';
import '../../../components/cardbuilder/card.css';
import '../../../elements/emby-button/emby-button';
/* eslint-disable indent */
@ -100,7 +101,7 @@ import 'emby-button';
}
function alertTextWithOptions(options) {
import('alert').then(({default: alert}) => {
import('../../../components/alert').then(({default: alert}) => {
alert(options);
});
}

View file

@ -1,12 +1,12 @@
import loading from 'loading';
import events from 'events';
import libraryBrowser from 'libraryBrowser';
import imageLoader from 'imageLoader';
import listView from 'listView';
import cardBuilder from 'cardBuilder';
import * as userSettings from 'userSettings';
import globalize from 'globalize';
import 'emby-itemscontainer';
import loading from '../../components/loading/loading';
import events from 'jellyfin-apiclient';
import libraryBrowser from '../../scripts/libraryBrowser';
import imageLoader from '../../components/images/imageLoader';
import listView from '../../components/listview/listview';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import * as userSettings from '../../scripts/settings/userSettings';
import globalize from '../../scripts/globalize';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
/* eslint-disable indent */
@ -160,7 +160,7 @@ import 'emby-itemscontainer';
loading.hide();
isLoading = false;
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(page);
});
});
@ -171,7 +171,7 @@ import 'emby-itemscontainer';
let isLoading = false;
self.showFilterMenu = function () {
import('components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
const filterDialog = new filterDialogFactory({
query: getQuery(tabContent),
mode: 'episodes',

View file

@ -1,11 +1,11 @@
import layoutManager from 'layoutManager';
import loading from 'loading';
import libraryBrowser from 'libraryBrowser';
import cardBuilder from 'cardBuilder';
import lazyLoader from 'lazyLoader';
import globalize from 'globalize';
import appRouter from 'appRouter';
import 'emby-button';
import layoutManager from '../../components/layoutManager';
import loading from '../../components/loading/loading';
import libraryBrowser from '../../scripts/libraryBrowser';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import lazyLoader from '../../components/lazyLoader/lazyLoaderIntersectionObserver';
import globalize from '../../scripts/globalize';
import appRouter from '../../components/appRouter';
import '../../elements/emby-button/emby-button';
/* eslint-disable indent */

View file

@ -1,17 +1,18 @@
import events from 'events';
import inputManager from 'inputManager';
import libraryMenu from 'libraryMenu';
import layoutManager from 'layoutManager';
import loading from 'loading';
import dom from 'dom';
import * as userSettings from 'userSettings';
import cardBuilder from 'cardBuilder';
import playbackManager from 'playbackManager';
import * as mainTabsManager from 'mainTabsManager';
import globalize from 'globalize';
import 'scrollStyles';
import 'emby-itemscontainer';
import 'emby-button';
import events from 'jellyfin-apiclient';
import inputManager from '../../scripts/inputManager';
import libraryMenu from '../../scripts/libraryMenu';
import layoutManager from '../../components/layoutManager';
import loading from '../../components/loading/loading';
import dom from '../../scripts/dom';
import * as userSettings from '../../scripts/settings/userSettings';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import playbackManager from '../../components/playback/playbackmanager';
import * as mainTabsManager from '../../components/maintabsmanager';
import globalize from '../../scripts/globalize';
import '../../assets/css/scrollstyles.css';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
import '../../elements/emby-button/emby-button';
/* eslint-disable indent */
@ -127,7 +128,7 @@ import 'emby-button';
});
loading.hide();
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(view);
});
});

View file

@ -1,13 +1,13 @@
import loading from 'loading';
import events from 'events';
import libraryBrowser from 'libraryBrowser';
import imageLoader from 'imageLoader';
import listView from 'listView';
import cardBuilder from 'cardBuilder';
import AlphaPicker from 'alphaPicker';
import * as userSettings from 'userSettings';
import globalize from 'globalize';
import 'emby-itemscontainer';
import loading from '../../components/loading/loading';
import events from 'jellyfin-apiclient';
import libraryBrowser from '../../scripts/libraryBrowser';
import imageLoader from '../../components/images/imageLoader';
import listView from '../../components/listview/listview';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import AlphaPicker from '../../components/alphaPicker/alphaPicker';
import * as userSettings from '../../scripts/settings/userSettings';
import globalize from '../../scripts/globalize';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
/* eslint-disable indent */
@ -190,7 +190,7 @@ import 'emby-itemscontainer';
loading.hide();
isLoading = false;
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(page);
});
});
@ -214,7 +214,7 @@ import 'emby-itemscontainer';
let isLoading = false;
this.showFilterMenu = function () {
import('components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
const filterDialog = new filterDialogFactory({
query: getQuery(tabContent),
mode: 'series',

View file

@ -1,6 +1,6 @@
import loading from 'loading';
import libraryBrowser from 'libraryBrowser';
import cardBuilder from 'cardBuilder';
import loading from '../../components/loading/loading';
import libraryBrowser from '../../scripts/libraryBrowser';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
/* eslint-disable indent */
@ -50,7 +50,7 @@ import cardBuilder from 'cardBuilder';
});
loading.hide();
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(context);
});
});

View file

@ -1,11 +1,11 @@
import layoutManager from 'layoutManager';
import loading from 'loading';
import datetime from 'datetime';
import cardBuilder from 'cardBuilder';
import imageLoader from 'imageLoader';
import globalize from 'globalize';
import 'scrollStyles';
import 'emby-itemscontainer';
import layoutManager from '../../components/layoutManager';
import loading from '../../components/loading/loading';
import datetime from '../../scripts/datetime';
import cardBuilder from '../../components/cardbuilder/cardBuilder';
import imageLoader from '../../components/images/imageLoader';
import globalize from '../../scripts/globalize';
import '../../assets/css/scrollstyles.css';
import '../../elements/emby-itemscontainer/emby-itemscontainer';
/* eslint-disable indent */

View file

@ -1,6 +1,6 @@
import DisplaySettings from 'displaySettings';
import * as userSettings from 'userSettings';
import autoFocuser from 'autoFocuser';
import DisplaySettings from '../../../components/displaySettings/displaySettings';
import * as userSettings from '../../../scripts/settings/userSettings';
import autoFocuser from '../../../components/autoFocuser';
/* eslint-disable indent */

View file

@ -1,7 +1,7 @@
import HomescreenSettings from 'homescreenSettings';
import * as userSettings from 'userSettings';
import autoFocuser from 'autoFocuser';
import 'listViewStyle';
import HomescreenSettings from '../../../components/homeScreenSettings/homeScreenSettings';
import * as userSettings from '../../../scripts/settings/userSettings';
import autoFocuser from '../../../components/autoFocuser';
import '../../../components/listview/listview.css';
/* eslint-disable indent */

View file

@ -1,7 +1,7 @@
import appHost from 'apphost';
import layoutManager from 'layoutManager';
import 'listViewStyle';
import 'emby-button';
import appHost from '../../../components/apphost';
import '../../../components/listview/listview.css';
import '../../../elements/emby-button/emby-button';
import layoutManager from '../../../components/layoutManager';
export default function (view, params) {
view.querySelector('.btnLogout').addEventListener('click', function () {
@ -53,7 +53,7 @@ export default function (view, params) {
page.querySelector('.adminSection').classList.add('hide');
}
import('autoFocuser').then(({default: autoFocuser}) => {
import('../../../components/autoFocuser').then(({default: autoFocuser}) => {
autoFocuser.autoFocus(view);
});
});

View file

@ -1,7 +1,8 @@
import PlaybackSettings from 'playbackSettings';
import * as userSettings from 'userSettings';
import autoFocuser from 'autoFocuser';
import 'listViewStyle';
import PlaybackSettings from '../../../components/playbackSettings/playbackSettings';
import * as userSettings from '../../../scripts/settings/userSettings';
import autoFocuser from '../../../components/autoFocuser';
import '../../../components/listview/listview.css';
/* eslint-disable indent */

View file

@ -1,9 +1,9 @@
import UserPasswordPage from 'controllers/dashboard/users/userpasswordpage';
import loading from 'loading';
import libraryMenu from 'libraryMenu';
import appHost from 'apphost';
import globalize from 'globalize';
import 'emby-button';
import UserPasswordPage from '../../dashboard/users/userpasswordpage';
import loading from '../../../components/loading/loading';
import libraryMenu from '../../../scripts/libraryMenu';
import appHost from '../../../components/apphost';
import globalize from '../../../scripts/globalize';
import '../../../elements/emby-button/emby-button';
function reloadUser(page) {
const userId = getParameterByName('userId');
@ -40,7 +40,7 @@ function onFileReaderError(evt) {
loading.hide();
switch (evt.target.error.code) {
case evt.target.error.NOT_FOUND_ERR:
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('FileNotFound'));
});
break;
@ -49,7 +49,7 @@ function onFileReaderError(evt) {
break;
case evt.target.error.NOT_READABLE_ERR:
default:
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('FileReadError'));
});
}
@ -57,7 +57,7 @@ function onFileReaderError(evt) {
function onFileReaderAbort(evt) {
loading.hide();
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('FileReadCancelled'));
});
}
@ -89,7 +89,7 @@ export default function (view, params) {
reloadUser(view);
new UserPasswordPage(view, params);
view.querySelector('#btnDeleteImage').addEventListener('click', function () {
import('confirm').then(({default: confirm}) => {
import('../../../components/confirm/confirm').then(({default: confirm}) => {
confirm(globalize.translate('DeleteImageConfirmation'), globalize.translate('DeleteImage')).then(function () {
loading.show();
const userId = getParameterByName('userId');

View file

@ -1,6 +1,6 @@
import SubtitleSettings from 'subtitleSettings';
import * as userSettings from 'userSettings';
import autoFocuser from 'autoFocuser';
import SubtitleSettings from '../../../components/subtitlesettings/subtitlesettings';
import * as userSettings from '../../../scripts/settings/userSettings';
import autoFocuser from '../../../components/autoFocuser';
/* eslint-disable indent */

View file

@ -1,4 +1,4 @@
import loading from 'loading';
import loading from '../../../components/loading/loading';
function onFinish() {
loading.show();

View file

@ -1,7 +1,7 @@
import loading from 'loading';
import 'emby-checkbox';
import 'emby-button';
import 'emby-select';
import loading from '../../../components/loading/loading';
import '../../../elements/emby-checkbox/emby-checkbox';
import '../../../elements/emby-button/emby-button';
import '../../../elements/emby-select/emby-select';
function save(page) {
loading.show();

View file

@ -1,7 +1,7 @@
import loading from 'loading';
import 'emby-checkbox';
import 'emby-button';
import 'emby-select';
import loading from '../../../components/loading/loading';
import '../../../elements/emby-checkbox/emby-checkbox';
import '../../../elements/emby-button/emby-button';
import '../../../elements/emby-select/emby-select';
function save(page) {
loading.show();

View file

@ -1,7 +1,7 @@
import $ from 'jQuery';
import loading from 'loading';
import 'emby-button';
import 'emby-select';
import 'jquery';
import loading from '../../../components/loading/loading';
import '../../../elements/emby-button/emby-button';
import '../../../elements/emby-select/emby-select';
function loadPage(page, config, languageOptions) {
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) {

View file

@ -1,8 +1,8 @@
import loading from 'loading';
import globalize from 'globalize';
import 'dashboardcss';
import 'emby-input';
import 'emby-button';
import loading from '../../../components/loading/loading';
import globalize from '../../../scripts/globalize';
import '../../../assets/css/dashboard.css';
import '../../../elements/emby-input/emby-input';
import '../../../elements/emby-button/emby-button';
function getApiClient() {
return ApiClient;
@ -36,7 +36,7 @@ function onSubmit(e) {
const form = this;
if (form.querySelector('#txtManualPassword').value != form.querySelector('#txtPasswordConfirm').value) {
import('toast').then(({default: toast}) => {
import('../../../components/toast/toast').then((toast) => {
toast(globalize.translate('PasswordMatchError'));
});
} else {