mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Make import paths ES6-compatible
This commit is contained in:
parent
1a635e2f81
commit
bfb8c7c1f6
245 changed files with 2073 additions and 1995 deletions
|
@ -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'),
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 += ' ';
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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/>')
|
||||
});
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;">';
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 = [];
|
||||
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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') {
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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'));
|
||||
});
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue