mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge remote-tracking branch 'upstream/master' into remux-translation
This commit is contained in:
commit
c87df522b3
286 changed files with 6560 additions and 6111 deletions
|
@ -1,21 +1,21 @@
|
|||
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';
|
||||
import confirm from '../../components/confirm/confirm';
|
||||
import { pageIdOn } from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
function revoke(page, key) {
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm(globalize.translate('MessageConfirmRevokeApiKey'), globalize.translate('HeaderConfirmRevokeApiKey')).then(function () {
|
||||
loading.show();
|
||||
ApiClient.ajax({
|
||||
type: 'DELETE',
|
||||
url: ApiClient.getUrl('Auth/Keys/' + key)
|
||||
}).then(function () {
|
||||
loadData(page);
|
||||
});
|
||||
confirm(globalize.translate('MessageConfirmRevokeApiKey'), globalize.translate('HeaderConfirmRevokeApiKey')).then(function () {
|
||||
loading.show();
|
||||
ApiClient.ajax({
|
||||
type: 'DELETE',
|
||||
url: ApiClient.getUrl('Auth/Keys/' + key)
|
||||
}).then(function () {
|
||||
loadData(page);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -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,71 +1,73 @@
|
|||
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 { 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.scss';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import taskButton from '../../scripts/taskbutton';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
import ServerConnections from '../../components/ServerConnections';
|
||||
import alert from '../../components/alert';
|
||||
import confirm from '../../components/confirm/confirm';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
function showPlaybackInfo(btn, session) {
|
||||
import('alert').then(({default: alert}) => {
|
||||
let title;
|
||||
const text = [];
|
||||
const displayPlayMethod = playMethodHelper.getDisplayPlayMethod(session);
|
||||
let title;
|
||||
const text = [];
|
||||
const displayPlayMethod = playMethodHelper.getDisplayPlayMethod(session);
|
||||
|
||||
if (displayPlayMethod === 'Remux') {
|
||||
title = globalize.translate('Remuxing');
|
||||
text.push(globalize.translate('RemuxHelp1'));
|
||||
text.push('<br/>');
|
||||
text.push(globalize.translate('RemuxHelp2'));
|
||||
} else if (displayPlayMethod === 'DirectStream') {
|
||||
title = globalize.translate('DirectStreaming');
|
||||
text.push(globalize.translate('DirectStreamHelp1'));
|
||||
text.push('<br/>');
|
||||
text.push(globalize.translate('DirectStreamHelp2'));
|
||||
} else if (displayPlayMethod === 'Transcode') {
|
||||
title = globalize.translate('Transcoding');
|
||||
text.push(globalize.translate('MediaIsBeingConverted'));
|
||||
if (displayPlayMethod === 'Remux') {
|
||||
title = globalize.translate('Remuxing');
|
||||
text.push(globalize.translate('RemuxHelp1'));
|
||||
text.push('<br/>');
|
||||
text.push(globalize.translate('RemuxHelp2'));
|
||||
} else if (displayPlayMethod === 'DirectStream') {
|
||||
title = globalize.translate('DirectStreaming');
|
||||
text.push(globalize.translate('DirectStreamHelp1'));
|
||||
text.push('<br/>');
|
||||
text.push(globalize.translate('DirectStreamHelp2'));
|
||||
} else if (displayPlayMethod === 'Transcode') {
|
||||
title = globalize.translate('Transcoding');
|
||||
text.push(globalize.translate('MediaIsBeingConverted'));
|
||||
|
||||
if (session.TranscodingInfo && session.TranscodingInfo.TranscodeReasons && session.TranscodingInfo.TranscodeReasons.length) {
|
||||
text.push('<br/>');
|
||||
text.push(globalize.translate('LabelReasonForTranscoding'));
|
||||
session.TranscodingInfo.TranscodeReasons.forEach(function (transcodeReason) {
|
||||
text.push(globalize.translate(transcodeReason));
|
||||
});
|
||||
}
|
||||
if (session.TranscodingInfo && session.TranscodingInfo.TranscodeReasons && session.TranscodingInfo.TranscodeReasons.length) {
|
||||
text.push('<br/>');
|
||||
text.push(globalize.translate('LabelReasonForTranscoding'));
|
||||
session.TranscodingInfo.TranscodeReasons.forEach(function (transcodeReason) {
|
||||
text.push(globalize.translate(transcodeReason));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
alert({
|
||||
text: text.join('<br/>'),
|
||||
title: title
|
||||
});
|
||||
alert({
|
||||
text: text.join('<br/>'),
|
||||
title: title
|
||||
});
|
||||
}
|
||||
|
||||
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'),
|
||||
confirmText: globalize.translate('ButtonSend')
|
||||
}).then(function (text) {
|
||||
if (text) {
|
||||
window.connectionManager.getApiClient(session.ServerId).sendMessageCommand(session.Id, {
|
||||
ServerConnections.getApiClient(session.ServerId).sendMessageCommand(session.Id, {
|
||||
Text: text,
|
||||
TimeoutMs: 5e3
|
||||
});
|
||||
|
@ -75,10 +77,10 @@ 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()) {
|
||||
if (session.ServerId && session.DeviceId !== ServerConnections.deviceId()) {
|
||||
menuItems.push({
|
||||
name: globalize.translate('SendMessage'),
|
||||
id: 'sendmessage'
|
||||
|
@ -128,9 +130,9 @@ import 'emby-itemscontainer';
|
|||
} else if (btn.classList.contains('btnSessionSendMessage')) {
|
||||
showSendMessageForm(btn, session);
|
||||
} else if (btn.classList.contains('btnSessionStop')) {
|
||||
window.connectionManager.getApiClient(session.ServerId).sendPlayStateCommand(session.Id, 'Stop');
|
||||
ServerConnections.getApiClient(session.ServerId).sendPlayStateCommand(session.Id, 'Stop');
|
||||
} else if (btn.classList.contains('btnSessionPlayPause') && session.PlayState) {
|
||||
window.connectionManager.getApiClient(session.ServerId).sendPlayStateCommand(session.Id, 'PlayPause');
|
||||
ServerConnections.getApiClient(session.ServerId).sendPlayStateCommand(session.Id, 'PlayPause');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -318,7 +320,7 @@ import 'emby-itemscontainer';
|
|||
btnCssClass = session.TranscodingInfo && session.TranscodingInfo.TranscodeReasons && session.TranscodingInfo.TranscodeReasons.length ? '' : ' hide';
|
||||
html += '<button is="paper-icon-button-light" class="sessionCardButton btnSessionInfo paper-icon-button-light ' + btnCssClass + '" title="' + globalize.translate('ViewPlaybackInfo') + '"><span class="material-icons info"></span></button>';
|
||||
|
||||
btnCssClass = session.ServerId && session.SupportedCommands.indexOf('DisplayMessage') !== -1 && session.DeviceId !== window.connectionManager.deviceId() ? '' : ' hide';
|
||||
btnCssClass = session.ServerId && session.SupportedCommands.indexOf('DisplayMessage') !== -1 && session.DeviceId !== ServerConnections.deviceId() ? '' : ' hide';
|
||||
html += '<button is="paper-icon-button-light" class="sessionCardButton btnSessionSendMessage paper-icon-button-light ' + btnCssClass + '" title="' + globalize.translate('SendMessage') + '"><span class="material-icons message"></span></button>';
|
||||
html += '</div>';
|
||||
|
||||
|
@ -480,7 +482,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
|
||||
};
|
||||
}
|
||||
|
@ -727,33 +729,29 @@ import 'emby-itemscontainer';
|
|||
});
|
||||
},
|
||||
restart: function (btn) {
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm({
|
||||
title: globalize.translate('Restart'),
|
||||
text: globalize.translate('MessageConfirmRestart'),
|
||||
confirmText: globalize.translate('Restart'),
|
||||
primary: 'delete'
|
||||
}).then(function () {
|
||||
const page = dom.parentWithClass(btn, 'page');
|
||||
page.querySelector('#btnRestartServer').disabled = true;
|
||||
page.querySelector('#btnShutdown').disabled = true;
|
||||
ApiClient.restartServer();
|
||||
});
|
||||
confirm({
|
||||
title: globalize.translate('Restart'),
|
||||
text: globalize.translate('MessageConfirmRestart'),
|
||||
confirmText: globalize.translate('Restart'),
|
||||
primary: 'delete'
|
||||
}).then(function () {
|
||||
const page = dom.parentWithClass(btn, 'page');
|
||||
page.querySelector('#btnRestartServer').disabled = true;
|
||||
page.querySelector('#btnShutdown').disabled = true;
|
||||
ApiClient.restartServer();
|
||||
});
|
||||
},
|
||||
shutdown: function (btn) {
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm({
|
||||
title: globalize.translate('ButtonShutdown'),
|
||||
text: globalize.translate('MessageConfirmShutdown'),
|
||||
confirmText: globalize.translate('ButtonShutdown'),
|
||||
primary: 'delete'
|
||||
}).then(function () {
|
||||
const page = dom.parentWithClass(btn, 'page');
|
||||
page.querySelector('#btnRestartServer').disabled = true;
|
||||
page.querySelector('#btnShutdown').disabled = true;
|
||||
ApiClient.shutdownServer();
|
||||
});
|
||||
confirm({
|
||||
title: globalize.translate('ButtonShutdown'),
|
||||
text: globalize.translate('MessageConfirmShutdown'),
|
||||
confirmText: globalize.translate('ButtonShutdown'),
|
||||
primary: 'delete'
|
||||
}).then(function () {
|
||||
const page = dom.parentWithClass(btn, 'page');
|
||||
page.querySelector('#btnRestartServer').disabled = true;
|
||||
page.querySelector('#btnShutdown').disabled = true;
|
||||
ApiClient.shutdownServer();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -806,13 +804,13 @@ import 'emby-itemscontainer';
|
|||
loading.show();
|
||||
pollForInfo(page, apiClient);
|
||||
DashboardPage.startInterval(apiClient);
|
||||
events.on(serverNotifications, 'RestartRequired', onRestartRequired);
|
||||
events.on(serverNotifications, 'ServerShuttingDown', onServerShuttingDown);
|
||||
events.on(serverNotifications, 'ServerRestarting', onServerRestarting);
|
||||
events.on(serverNotifications, 'PackageInstalling', onPackageInstalling);
|
||||
events.on(serverNotifications, 'PackageInstallationCompleted', onPackageInstallationCompleted);
|
||||
events.on(serverNotifications, 'Sessions', onSessionsUpdate);
|
||||
events.on(serverNotifications, 'ScheduledTasksInfo', onScheduledTasksUpdate);
|
||||
Events.on(serverNotifications, 'RestartRequired', onRestartRequired);
|
||||
Events.on(serverNotifications, 'ServerShuttingDown', onServerShuttingDown);
|
||||
Events.on(serverNotifications, 'ServerRestarting', onServerRestarting);
|
||||
Events.on(serverNotifications, 'PackageInstalling', onPackageInstalling);
|
||||
Events.on(serverNotifications, 'PackageInstallationCompleted', onPackageInstallationCompleted);
|
||||
Events.on(serverNotifications, 'Sessions', onSessionsUpdate);
|
||||
Events.on(serverNotifications, 'ScheduledTasksInfo', onScheduledTasksUpdate);
|
||||
DashboardPage.lastAppUpdateCheck = null;
|
||||
reloadSystemInfo(page, ApiClient);
|
||||
|
||||
|
@ -846,13 +844,13 @@ import 'emby-itemscontainer';
|
|||
const apiClient = ApiClient;
|
||||
const page = this;
|
||||
|
||||
events.off(serverNotifications, 'RestartRequired', onRestartRequired);
|
||||
events.off(serverNotifications, 'ServerShuttingDown', onServerShuttingDown);
|
||||
events.off(serverNotifications, 'ServerRestarting', onServerRestarting);
|
||||
events.off(serverNotifications, 'PackageInstalling', onPackageInstalling);
|
||||
events.off(serverNotifications, 'PackageInstallationCompleted', onPackageInstallationCompleted);
|
||||
events.off(serverNotifications, 'Sessions', onSessionsUpdate);
|
||||
events.off(serverNotifications, 'ScheduledTasksInfo', onScheduledTasksUpdate);
|
||||
Events.off(serverNotifications, 'RestartRequired', onRestartRequired);
|
||||
Events.off(serverNotifications, 'ServerShuttingDown', onServerShuttingDown);
|
||||
Events.off(serverNotifications, 'ServerRestarting', onServerRestarting);
|
||||
Events.off(serverNotifications, 'PackageInstalling', onPackageInstalling);
|
||||
Events.off(serverNotifications, 'PackageInstallationCompleted', onPackageInstallationCompleted);
|
||||
Events.off(serverNotifications, 'Sessions', onSessionsUpdate);
|
||||
Events.off(serverNotifications, 'ScheduledTasksInfo', onScheduledTasksUpdate);
|
||||
|
||||
if (apiClient) {
|
||||
DashboardPage.stopInterval(apiClient);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import confirm from '../../../components/confirm/confirm';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -20,14 +22,12 @@ import 'cardStyle';
|
|||
function deleteAllDevices(page) {
|
||||
const msg = globalize.translate('DeleteDevicesConfirmation');
|
||||
|
||||
require(['confirm'], async function (confirm) {
|
||||
await confirm({
|
||||
text: msg,
|
||||
title: globalize.translate('HeaderDeleteDevices'),
|
||||
confirmText: globalize.translate('ButtonDelete'),
|
||||
primary: 'delete'
|
||||
});
|
||||
|
||||
confirm({
|
||||
text: msg,
|
||||
title: globalize.translate('HeaderDeleteDevices'),
|
||||
confirmText: globalize.translate('ButtonDelete'),
|
||||
primary: 'delete'
|
||||
}).then(async () => {
|
||||
loading.show();
|
||||
await Promise.all(
|
||||
deviceIds.filter(canDelete).map((id) => ApiClient.deleteDevice(id))
|
||||
|
@ -39,17 +39,15 @@ import 'cardStyle';
|
|||
function deleteDevice(page, id) {
|
||||
const msg = globalize.translate('DeleteDeviceConfirmation');
|
||||
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm({
|
||||
text: msg,
|
||||
title: globalize.translate('HeaderDeleteDevice'),
|
||||
confirmText: globalize.translate('Delete'),
|
||||
primary: 'delete'
|
||||
}).then(async () => {
|
||||
loading.show();
|
||||
await ApiClient.deleteDevice(id);
|
||||
loadData(page);
|
||||
});
|
||||
confirm({
|
||||
text: msg,
|
||||
title: globalize.translate('HeaderDeleteDevice'),
|
||||
confirmText: globalize.translate('Delete'),
|
||||
primary: 'delete'
|
||||
}).then(async () => {
|
||||
loading.show();
|
||||
await ApiClient.deleteDevice(id);
|
||||
loadData(page);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -72,7 +70,7 @@ import 'cardStyle';
|
|||
});
|
||||
}
|
||||
|
||||
import('actionsheet').then(({default: actionsheet}) => {
|
||||
import('../../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
|
||||
actionsheet.show({
|
||||
items: menuItems,
|
||||
positionTo: btn,
|
||||
|
@ -128,7 +126,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,13 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import toast from '../../../components/toast/toast';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -633,9 +635,7 @@ import 'listViewStyle';
|
|||
data: JSON.stringify(profile),
|
||||
contentType: 'application/json'
|
||||
}).then(function () {
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast('Settings saved.');
|
||||
});
|
||||
toast('Settings saved.');
|
||||
}, Dashboard.processErrorResponse);
|
||||
} else {
|
||||
ApiClient.ajax({
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
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';
|
||||
import confirm from '../../../components/confirm/confirm';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -64,16 +65,14 @@ import 'emby-button';
|
|||
}
|
||||
|
||||
function deleteProfile(page, id) {
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm(globalize.translate('MessageConfirmProfileDeletion'), globalize.translate('HeaderConfirmProfileDeletion')).then(function () {
|
||||
loading.show();
|
||||
ApiClient.ajax({
|
||||
type: 'DELETE',
|
||||
url: ApiClient.getUrl('Dlna/Profiles/' + id)
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
loadProfiles(page);
|
||||
});
|
||||
confirm(globalize.translate('MessageConfirmProfileDeletion'), globalize.translate('HeaderConfirmProfileDeletion')).then(function () {
|
||||
loading.show();
|
||||
ApiClient.ajax({
|
||||
type: 'DELETE',
|
||||
url: ApiClient.getUrl('Dlna/Profiles/' + id)
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
loadProfiles(page);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
import alert from '../../components/alert';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -44,12 +46,7 @@ import libraryMenu from 'libraryMenu';
|
|||
|
||||
function onSaveEncodingPathFailure(response) {
|
||||
loading.hide();
|
||||
let msg = '';
|
||||
msg = globalize.translate('FFmpegSavePathNotFound');
|
||||
|
||||
import('alert').then(({default: alert}) => {
|
||||
alert(msg);
|
||||
});
|
||||
alert(globalize.translate('FFmpegSavePathNotFound'));
|
||||
}
|
||||
|
||||
function updateEncoder(form) {
|
||||
|
@ -105,22 +102,17 @@ import libraryMenu from 'libraryMenu';
|
|||
ApiClient.updateNamedConfiguration('encoding', config).then(function () {
|
||||
updateEncoder(form);
|
||||
}, function () {
|
||||
import('alert').then(({default: alert}) => {
|
||||
alert(globalize.translate('ErrorDefault'));
|
||||
});
|
||||
|
||||
alert(globalize.translate('ErrorDefault'));
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
if ($('#selectVideoDecoder', form).val()) {
|
||||
import('alert').then(({default: alert}) => {
|
||||
alert({
|
||||
title: globalize.translate('TitleHardwareAcceleration'),
|
||||
text: globalize.translate('HardwareAccelerationWarning')
|
||||
}).then(onDecoderConfirmed);
|
||||
});
|
||||
alert({
|
||||
title: globalize.translate('TitleHardwareAcceleration'),
|
||||
text: globalize.translate('HardwareAccelerationWarning')
|
||||
}).then(onDecoderConfirmed);
|
||||
} else {
|
||||
onDecoderConfirmed();
|
||||
}
|
||||
|
@ -190,7 +182,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,
|
||||
|
@ -205,7 +197,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) {
|
||||
|
@ -222,7 +214,7 @@ import libraryMenu from 'libraryMenu';
|
|||
});
|
||||
});
|
||||
$('#btnSelectFallbackFontPath', page).on('click.selectDirectory', function () {
|
||||
import('directorybrowser').then(({default: directoryBrowser}) => {
|
||||
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
|
||||
const picker = new directoryBrowser();
|
||||
picker.show({
|
||||
includeDirectories: true,
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
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';
|
||||
import AppInfo from '../../components/AppInfo';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
import alert from '../../components/alert';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -51,10 +54,7 @@ import 'emby-button';
|
|||
});
|
||||
});
|
||||
}, function () {
|
||||
import('alert').then(({default: alert}) => {
|
||||
alert(globalize.translate('ErrorDefault'));
|
||||
});
|
||||
|
||||
alert(globalize.translate('ErrorDefault'));
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
});
|
||||
});
|
||||
|
@ -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,19 @@
|
|||
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';
|
||||
import Dashboard, { pageClassOn, pageIdOn } from '../../scripts/clientUtils';
|
||||
import confirm from '../../components/confirm/confirm';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
function addVirtualFolder(page) {
|
||||
import('medialibrarycreator').then(({default: medialibrarycreator}) => {
|
||||
import('../../components/mediaLibraryCreator/mediaLibraryCreator').then(({default: medialibrarycreator}) => {
|
||||
new medialibrarycreator({
|
||||
collectionTypeOptions: getCollectionTypeOptions().filter(function (f) {
|
||||
return !f.hidden;
|
||||
|
@ -26,7 +28,7 @@ import 'emby-itemrefreshindicator';
|
|||
}
|
||||
|
||||
function editVirtualFolder(page, virtualFolder) {
|
||||
import('medialibraryeditor').then(({default: medialibraryeditor}) => {
|
||||
import('../../components/mediaLibraryEditor/mediaLibraryEditor').then(({default: medialibraryeditor}) => {
|
||||
new medialibraryeditor({
|
||||
refresh: shouldRefreshLibraryAfterChanges(page),
|
||||
library: virtualFolder
|
||||
|
@ -46,23 +48,21 @@ import 'emby-itemrefreshindicator';
|
|||
msg += virtualFolder.Locations.join('<br/>');
|
||||
}
|
||||
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm({
|
||||
text: msg,
|
||||
title: globalize.translate('HeaderRemoveMediaFolder'),
|
||||
confirmText: globalize.translate('Delete'),
|
||||
primary: 'delete'
|
||||
}).then(function () {
|
||||
const refreshAfterChange = shouldRefreshLibraryAfterChanges(page);
|
||||
ApiClient.removeVirtualFolder(virtualFolder.Name, refreshAfterChange).then(function () {
|
||||
reloadLibrary(page);
|
||||
});
|
||||
confirm({
|
||||
text: msg,
|
||||
title: globalize.translate('HeaderRemoveMediaFolder'),
|
||||
confirmText: globalize.translate('Delete'),
|
||||
primary: 'delete'
|
||||
}).then(function () {
|
||||
const refreshAfterChange = shouldRefreshLibraryAfterChanges(page);
|
||||
ApiClient.removeVirtualFolder(virtualFolder.Name, refreshAfterChange).then(function () {
|
||||
reloadLibrary(page);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function refreshVirtualFolder(page, virtualFolder) {
|
||||
import('refreshDialog').then(({default: refreshDialog}) => {
|
||||
import('../../components/refreshdialog/refreshdialog').then(({default: 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(({default: 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,9 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* 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.scss';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
import alert from '../../components/alert';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -38,11 +40,8 @@ import globalize from 'globalize';
|
|||
function showConfirmMessage(config) {
|
||||
const msg = [];
|
||||
msg.push(globalize.translate('MetadataSettingChangeHelp'));
|
||||
|
||||
import('alert').then(({default: alert}) => {
|
||||
alert({
|
||||
text: msg.join('<br/><br/>')
|
||||
});
|
||||
alert({
|
||||
text: msg.join('<br/><br/>')
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
import alert from '../../components/alert';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -89,9 +91,7 @@ import 'emby-select';
|
|||
|
||||
function showAlertText(options) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
import('alert').then(({default: alert}) => {
|
||||
alert(options).then(resolve, reject);
|
||||
});
|
||||
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,6 @@
|
|||
import $ from 'jQuery';
|
||||
import 'emby-checkbox';
|
||||
import 'jquery';
|
||||
import '../../../../elements/emby-checkbox/emby-checkbox';
|
||||
import Dashboard from '../../../../scripts/clientUtils';
|
||||
|
||||
function fillItems(elem, items, cssClass, idPrefix, currentList, isEnabledList) {
|
||||
let html = '<div class="checkboxList paperList" style="padding: .5em 1em;">';
|
||||
|
|
|
@ -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,8 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
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';
|
||||
import Dashboard from '../../../../scripts/clientUtils';
|
||||
import alert from '../../../../components/alert';
|
||||
import confirm from '../../../../components/confirm/confirm';
|
||||
|
||||
function populateHistory(packageInfo, page) {
|
||||
let html = '';
|
||||
|
@ -68,9 +71,7 @@ function renderPackage(pkg, installedPlugins, page) {
|
|||
}
|
||||
|
||||
function alertText(options) {
|
||||
import('alert').then(({default: alert}) => {
|
||||
alert(options);
|
||||
});
|
||||
alert(options);
|
||||
}
|
||||
|
||||
function performInstallation(page, name, guid, version) {
|
||||
|
@ -94,12 +95,10 @@ function performInstallation(page, name, guid, version) {
|
|||
msg += '<br/>';
|
||||
msg += globalize.translate('PleaseConfirmPluginInstallation');
|
||||
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm(msg, globalize.translate('HeaderConfirmPluginInstallation')).then(function () {
|
||||
alertCallback();
|
||||
}).catch(() => {
|
||||
console.debug('plugin not installed');
|
||||
});
|
||||
confirm(msg, globalize.translate('HeaderConfirmPluginInstallation')).then(function () {
|
||||
alertCallback();
|
||||
}).catch(() => {
|
||||
console.debug('plugin not installed');
|
||||
});
|
||||
} else {
|
||||
alertCallback();
|
||||
|
|
|
@ -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,24 +1,24 @@
|
|||
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';
|
||||
import Dashboard, { pageIdOn } from '../../../../scripts/clientUtils';
|
||||
import confirm from '../../../../components/confirm/confirm';
|
||||
|
||||
function deletePlugin(page, uniqueid, name) {
|
||||
const msg = globalize.translate('UninstallPluginConfirmation', name);
|
||||
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm.default({
|
||||
title: globalize.translate('HeaderUninstallPlugin'),
|
||||
text: msg,
|
||||
primary: 'delete',
|
||||
confirmText: globalize.translate('HeaderUninstallPlugin')
|
||||
}).then(function () {
|
||||
loading.show();
|
||||
ApiClient.uninstallPlugin(uniqueid).then(function () {
|
||||
reloadList(page);
|
||||
});
|
||||
confirm({
|
||||
title: globalize.translate('HeaderUninstallPlugin'),
|
||||
text: msg,
|
||||
primary: 'delete',
|
||||
confirmText: globalize.translate('HeaderUninstallPlugin')
|
||||
}).then(function () {
|
||||
loading.show();
|
||||
ApiClient.uninstallPlugin(uniqueid).then(function () {
|
||||
reloadList(page);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -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,6 +1,6 @@
|
|||
import loading from 'loading';
|
||||
import toast from 'toast';
|
||||
import globalize from 'globalize';
|
||||
import loading from '../../components/loading/loading';
|
||||
import toast from '../../components/toast/toast';
|
||||
import globalize from '../../scripts/globalize';
|
||||
|
||||
const unavailable = 'Unavailable';
|
||||
const available = 'Available';
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
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';
|
||||
import confirm from '../../../components/confirm/confirm';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -42,7 +43,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,10 +136,8 @@ import 'emby-select';
|
|||
$('#popupAddTrigger', view).removeClass('hide');
|
||||
},
|
||||
confirmDeleteTrigger: function (view, index) {
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm(globalize.translate('MessageDeleteTaskTrigger'), globalize.translate('HeaderDeleteTaskTrigger')).then(function () {
|
||||
ScheduledTaskPage.deleteTrigger(view, index);
|
||||
});
|
||||
confirm(globalize.translate('MessageDeleteTaskTrigger'), globalize.translate('HeaderDeleteTaskTrigger')).then(function () {
|
||||
ScheduledTaskPage.deleteTrigger(view, index);
|
||||
});
|
||||
},
|
||||
deleteTrigger: function (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') {
|
||||
|
@ -177,7 +177,7 @@ import 'emby-button';
|
|||
});
|
||||
|
||||
view.addEventListener('viewbeforehide', function() {
|
||||
events.off(serverNotifications, 'ScheduledTasksInfo', onScheduledTasksUpdate);
|
||||
Events.off(serverNotifications, 'ScheduledTasksInfo', onScheduledTasksUpdate);
|
||||
stopInterval();
|
||||
});
|
||||
|
||||
|
@ -185,7 +185,7 @@ import 'emby-button';
|
|||
loading.show();
|
||||
startInterval();
|
||||
reloadList(view);
|
||||
events.on(serverNotifications, 'ScheduledTasksInfo', onScheduledTasksUpdate);
|
||||
Events.on(serverNotifications, 'ScheduledTasksInfo', onScheduledTasksUpdate);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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,8 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import toast from '../../../components/toast/toast';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -109,10 +111,7 @@ import globalize from 'globalize';
|
|||
function onSaveComplete(page, user) {
|
||||
Dashboard.navigate('userprofiles.html');
|
||||
loading.hide();
|
||||
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
});
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
||||
function saveUser(user, page) {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import toast from '../../../components/toast/toast';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -91,10 +93,7 @@ import globalize from 'globalize';
|
|||
|
||||
function onSaveComplete(page) {
|
||||
loading.hide();
|
||||
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
});
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
||||
function saveUser(user, page) {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import toast from '../../../components/toast/toast';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -88,10 +90,7 @@ import 'emby-checkbox';
|
|||
Dashboard.navigate('useredit.html?userId=' + user.Id);
|
||||
});
|
||||
}, function (response) {
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('ErrorDefault'));
|
||||
});
|
||||
|
||||
toast(globalize.translate('ErrorDefault'));
|
||||
loading.hide();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
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';
|
||||
import toast from '../../../components/toast/toast';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -162,10 +163,7 @@ import 'paper-icon-button-light';
|
|||
|
||||
function onSaveComplete(page) {
|
||||
loading.hide();
|
||||
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
});
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
||||
function saveUser(user, page) {
|
||||
|
@ -195,7 +193,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 +226,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,10 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import toast from '../../../components/toast/toast';
|
||||
import confirm from '../../../components/confirm/confirm';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -52,7 +55,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);
|
||||
});
|
||||
});
|
||||
|
@ -81,10 +84,7 @@ import 'emby-button';
|
|||
user.Configuration.EnableLocalPassword = view.querySelector('.chkEnableLocalEasyPassword').checked;
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).then(function () {
|
||||
loading.hide();
|
||||
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
});
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
|
||||
loadUser(view, params);
|
||||
});
|
||||
|
@ -104,10 +104,7 @@ import 'emby-button';
|
|||
|
||||
ApiClient.updateUserPassword(userId, currentPassword, newPassword).then(function () {
|
||||
loading.hide();
|
||||
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('PasswordSaved'));
|
||||
});
|
||||
toast(globalize.translate('PasswordSaved'));
|
||||
|
||||
loadUser(view, params);
|
||||
}, function () {
|
||||
|
@ -123,9 +120,7 @@ import 'emby-button';
|
|||
const form = this;
|
||||
|
||||
if (form.querySelector('#txtNewPassword').value != form.querySelector('#txtNewPasswordConfirm').value) {
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('PasswordMatchError'));
|
||||
});
|
||||
toast(globalize.translate('PasswordMatchError'));
|
||||
} else {
|
||||
loading.show();
|
||||
savePassword();
|
||||
|
@ -144,18 +139,16 @@ import 'emby-button';
|
|||
|
||||
function resetPassword() {
|
||||
const msg = globalize.translate('PasswordResetConfirmation');
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm(msg, globalize.translate('ResetPassword')).then(function () {
|
||||
const userId = params.userId;
|
||||
loading.show();
|
||||
ApiClient.resetUserPassword(userId).then(function () {
|
||||
loading.hide();
|
||||
Dashboard.alert({
|
||||
message: globalize.translate('PasswordResetComplete'),
|
||||
title: globalize.translate('ResetPassword')
|
||||
});
|
||||
loadUser(view, params);
|
||||
confirm(msg, globalize.translate('ResetPassword')).then(function () {
|
||||
const userId = params.userId;
|
||||
loading.show();
|
||||
ApiClient.resetUserPassword(userId).then(function () {
|
||||
loading.hide();
|
||||
Dashboard.alert({
|
||||
message: globalize.translate('PasswordResetComplete'),
|
||||
title: globalize.translate('ResetPassword')
|
||||
});
|
||||
loadUser(view, params);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -163,18 +156,16 @@ import 'emby-button';
|
|||
function resetEasyPassword() {
|
||||
const msg = globalize.translate('PinCodeResetConfirmation');
|
||||
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm(msg, globalize.translate('HeaderPinCodeReset')).then(function () {
|
||||
const userId = params.userId;
|
||||
loading.show();
|
||||
ApiClient.resetEasyPassword(userId).then(function () {
|
||||
loading.hide();
|
||||
Dashboard.alert({
|
||||
message: globalize.translate('PinCodeResetComplete'),
|
||||
title: globalize.translate('HeaderPinCodeReset')
|
||||
});
|
||||
loadUser(view, params);
|
||||
confirm(msg, globalize.translate('HeaderPinCodeReset')).then(function () {
|
||||
const userId = params.userId;
|
||||
loading.show();
|
||||
ApiClient.resetEasyPassword(userId).then(function () {
|
||||
loading.hide();
|
||||
Dashboard.alert({
|
||||
message: globalize.translate('PinCodeResetComplete'),
|
||||
title: globalize.translate('HeaderPinCodeReset')
|
||||
});
|
||||
loadUser(view, params);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
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.scss';
|
||||
import Dashboard, { pageIdOn } from '../../../scripts/clientUtils';
|
||||
import confirm from '../../../components/confirm/confirm';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
function deleteUser(page, id) {
|
||||
const msg = globalize.translate('DeleteUserConfirmation');
|
||||
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm({
|
||||
title: globalize.translate('DeleteUser'),
|
||||
text: msg,
|
||||
confirmText: globalize.translate('Delete'),
|
||||
primary: 'delete'
|
||||
}).then(function () {
|
||||
loading.show();
|
||||
ApiClient.deleteUser(id).then(function () {
|
||||
loadData(page);
|
||||
});
|
||||
confirm({
|
||||
title: globalize.translate('DeleteUser'),
|
||||
text: msg,
|
||||
confirmText: globalize.translate('Delete'),
|
||||
primary: 'delete'
|
||||
}).then(function () {
|
||||
loading.show();
|
||||
ApiClient.deleteUser(id).then(function () {
|
||||
loadData(page);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -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 '';
|
||||
|
|
|
@ -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(({ default: metadataEditor }) => {
|
||||
metadataEditor.embed(context.querySelector('.editPageInnerContent'), itemId, ApiClient.serverInfo().Id);
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -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 { 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';
|
||||
import ServerConnections from '../components/ServerConnections';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -269,7 +270,7 @@ class FavoritesTab {
|
|||
constructor(view, params) {
|
||||
this.view = view;
|
||||
this.params = params;
|
||||
this.apiClient = window.connectionManager.currentApiClient();
|
||||
this.apiClient = ServerConnections.currentApiClient();
|
||||
this.sectionsContainer = view.querySelector('.sections');
|
||||
createSections(this, this.sectionsContainer, this.apiClient);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
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';
|
||||
import { appRouter } from '../components/appRouter';
|
||||
|
||||
class HomeView extends TabbedView {
|
||||
constructor(view, params) {
|
||||
|
@ -10,7 +11,7 @@ class HomeView extends TabbedView {
|
|||
}
|
||||
|
||||
setTitle() {
|
||||
Emby.Page.setTitle(null);
|
||||
appRouter.setTitle(null);
|
||||
}
|
||||
|
||||
onPause() {
|
||||
|
@ -44,15 +45,15 @@ class HomeView extends TabbedView {
|
|||
|
||||
switch (index) {
|
||||
case 0:
|
||||
depends = 'controllers/hometab';
|
||||
depends = 'hometab';
|
||||
break;
|
||||
|
||||
case 1:
|
||||
depends = 'controllers/favorites';
|
||||
depends = 'favorites';
|
||||
}
|
||||
|
||||
const instance = this;
|
||||
return import(depends).then(({ default: controllerFactory }) => {
|
||||
return import(/* webpackChunkName: "[request]" */ `../controllers/${depends}`).then(({ default: controllerFactory }) => {
|
||||
let controller = instance.tabControllers[index];
|
||||
|
||||
if (!controller) {
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
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 focusManager from '../components/focusManager';
|
||||
import homeSections from '../components/homesections/homesections';
|
||||
import '../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import ServerConnections from '../components/ServerConnections';
|
||||
|
||||
class HomeTab {
|
||||
constructor(view, params) {
|
||||
this.view = view;
|
||||
this.params = params;
|
||||
this.apiClient = window.connectionManager.currentApiClient();
|
||||
this.apiClient = ServerConnections.currentApiClient();
|
||||
this.sectionsContainer = view.querySelector('.sections');
|
||||
view.querySelector('.sections').addEventListener('settingschange', onHomeScreenSettingsChanged.bind(this));
|
||||
}
|
||||
|
|
|
@ -1,32 +1,36 @@
|
|||
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 { 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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
import ServerConnections from '../../components/ServerConnections';
|
||||
import confirm from '../../components/confirm/confirm';
|
||||
import { download } from '../../scripts/fileDownloader';
|
||||
|
||||
function getPromise(apiClient, params) {
|
||||
const id = params.id;
|
||||
|
@ -140,7 +144,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')
|
||||
});
|
||||
|
@ -563,9 +567,9 @@ function renderDetailPageBackdrop(page, item, apiClient) {
|
|||
}
|
||||
|
||||
function reloadFromItem(instance, page, params, item, user) {
|
||||
const apiClient = window.connectionManager.getApiClient(item.ServerId);
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
|
||||
Emby.Page.setTitle('');
|
||||
appRouter.setTitle('');
|
||||
|
||||
// Start rendering the artwork first
|
||||
renderImage(page, item);
|
||||
|
@ -666,7 +670,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 +712,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,
|
||||
|
@ -783,7 +787,11 @@ function renderImage(page, item) {
|
|||
}
|
||||
|
||||
function refreshDetailImageUserData(elem, item) {
|
||||
elem.querySelector('.detailImageProgressContainer').innerHTML = indicators.getProgressBarHtml(item);
|
||||
const container = elem.querySelector('.detailImageProgressContainer');
|
||||
|
||||
if (container) {
|
||||
container.innerHTML = indicators.getProgressBarHtml(item);
|
||||
}
|
||||
}
|
||||
|
||||
function refreshImage(page, item) {
|
||||
|
@ -805,7 +813,7 @@ function renderNextUp(page, item, user) {
|
|||
return void section.classList.add('hide');
|
||||
}
|
||||
|
||||
window.connectionManager.getApiClient(item.ServerId).getNextUpEpisodes({
|
||||
ServerConnections.getApiClient(item.ServerId).getNextUpEpisodes({
|
||||
SeriesId: item.Id,
|
||||
UserId: user.Id
|
||||
}).then(function (result) {
|
||||
|
@ -1209,7 +1217,7 @@ function renderSimilarItems(page, item, context) {
|
|||
}
|
||||
|
||||
similarCollapsible.classList.remove('hide');
|
||||
const apiClient = window.connectionManager.getApiClient(item.ServerId);
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
const options = {
|
||||
userId: apiClient.getCurrentUserId(),
|
||||
limit: 12,
|
||||
|
@ -1323,7 +1331,7 @@ function renderChildren(page, item) {
|
|||
}
|
||||
|
||||
let promise;
|
||||
const apiClient = window.connectionManager.getApiClient(item.ServerId);
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
const userId = apiClient.getCurrentUserId();
|
||||
|
||||
if (item.Type == 'Series') {
|
||||
|
@ -1485,13 +1493,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);
|
||||
});
|
||||
}
|
||||
|
@ -1571,7 +1579,7 @@ function renderChannelGuide(page, apiClient, item) {
|
|||
}
|
||||
|
||||
function renderSeriesSchedule(page, item) {
|
||||
const apiClient = window.connectionManager.getApiClient(item.ServerId);
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
apiClient.getLiveTvPrograms({
|
||||
UserId: apiClient.getCurrentUserId(),
|
||||
HasAired: false,
|
||||
|
@ -1695,7 +1703,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);
|
||||
});
|
||||
}
|
||||
|
@ -1731,7 +1739,7 @@ function renderCollectionItemType(page, parentItem, type, items) {
|
|||
}
|
||||
|
||||
function renderMusicVideos(page, item, user) {
|
||||
window.connectionManager.getApiClient(item.ServerId).getItems(user.Id, {
|
||||
ServerConnections.getApiClient(item.ServerId).getItems(user.Id, {
|
||||
SortBy: 'SortName',
|
||||
SortOrder: 'Ascending',
|
||||
IncludeItemTypes: 'MusicVideo',
|
||||
|
@ -1751,7 +1759,7 @@ function renderMusicVideos(page, item, user) {
|
|||
}
|
||||
|
||||
function renderAdditionalParts(page, item, user) {
|
||||
window.connectionManager.getApiClient(item.ServerId).getAdditionalVideoParts(user.Id, item.Id).then(function (result) {
|
||||
ServerConnections.getApiClient(item.ServerId).getAdditionalVideoParts(user.Id, item.Id).then(function (result) {
|
||||
if (result.Items.length) {
|
||||
page.querySelector('#additionalPartsCollapsible').classList.remove('hide');
|
||||
const additionalPartsContent = page.querySelector('#additionalPartsContent');
|
||||
|
@ -1770,7 +1778,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',
|
||||
|
@ -1796,7 +1804,7 @@ function getVideosHtml(items) {
|
|||
}
|
||||
|
||||
function renderSpecials(page, item, user) {
|
||||
window.connectionManager.getApiClient(item.ServerId).getSpecialFeatures(user.Id, item.Id).then(function (specials) {
|
||||
ServerConnections.getApiClient(item.ServerId).getSpecialFeatures(user.Id, item.Id).then(function (specials) {
|
||||
const specialsContent = page.querySelector('#specialsContent');
|
||||
specialsContent.innerHTML = getVideosHtml(specials);
|
||||
imageLoader.lazyChildren(specialsContent);
|
||||
|
@ -1815,7 +1823,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,
|
||||
|
@ -1849,10 +1857,14 @@ function onTrackSelectionsSubmit(e) {
|
|||
window.ItemDetailPage = new itemDetailPage();
|
||||
|
||||
export default function (view, params) {
|
||||
function getApiClient() {
|
||||
return params.serverId ? ServerConnections.getApiClient(params.serverId) : ApiClient;
|
||||
}
|
||||
|
||||
function reload(instance, page, params) {
|
||||
loading.show();
|
||||
|
||||
const apiClient = params.serverId ? window.connectionManager.getApiClient(params.serverId) : ApiClient;
|
||||
const apiClient = getApiClient();
|
||||
|
||||
Promise.all([getPromise(apiClient, params), apiClient.getCurrentUser()]).then(([item, user]) => {
|
||||
currentItem = item;
|
||||
|
@ -1863,16 +1875,14 @@ export default function (view, params) {
|
|||
}
|
||||
|
||||
function splitVersions(instance, page, apiClient, params) {
|
||||
import('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({
|
||||
type: 'DELETE',
|
||||
url: apiClient.getUrl('Videos/' + params.id + '/AlternateSources')
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
reload(instance, page, params);
|
||||
});
|
||||
confirm('Are you sure you wish to split the media sources into separate items?', 'Split Media Apart').then(function () {
|
||||
loading.show();
|
||||
apiClient.ajax({
|
||||
type: 'DELETE',
|
||||
url: apiClient.getUrl('Videos/' + params.id + '/AlternateSources')
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
reload(instance, page, params);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -1901,7 +1911,7 @@ export default function (view, params) {
|
|||
const item = currentItem;
|
||||
|
||||
if (item.Type === 'Program') {
|
||||
const apiClient = window.connectionManager.getApiClient(item.ServerId);
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
return void apiClient.getLiveTvChannel(item.ChannelId, apiClient.getCurrentUserId()).then(function (channel) {
|
||||
playbackManager.play({
|
||||
items: [channel]
|
||||
|
@ -1929,7 +1939,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,8 +1947,8 @@ export default function (view, params) {
|
|||
}
|
||||
|
||||
function onCancelTimerClick() {
|
||||
import('recordingHelper').then(({ default: recordingHelper }) => {
|
||||
recordingHelper.cancelTimer(window.connectionManager.getApiClient(currentItem.ServerId), currentItem.TimerId).then(function () {
|
||||
import('../../components/recordingcreator/recordinghelper').then(({ default: recordingHelper }) => {
|
||||
recordingHelper.cancelTimer(ServerConnections.getApiClient(currentItem.ServerId), currentItem.TimerId).then(function () {
|
||||
reload(self, view, params);
|
||||
});
|
||||
});
|
||||
|
@ -1949,20 +1959,20 @@ export default function (view, params) {
|
|||
}
|
||||
|
||||
function onDownloadClick() {
|
||||
import('fileDownloader').then(({ default: fileDownloader }) => {
|
||||
const downloadHref = apiClient.getItemDownloadUrl(currentItem.Id);
|
||||
fileDownloader.download([{
|
||||
url: downloadHref,
|
||||
itemId: currentItem.Id,
|
||||
serverId: currentItem.serverId
|
||||
}]);
|
||||
});
|
||||
const downloadHref = getApiClient().getItemDownloadUrl(currentItem.Id);
|
||||
download([{
|
||||
url: downloadHref,
|
||||
itemId: currentItem.Id,
|
||||
serverId: currentItem.serverId
|
||||
}]);
|
||||
}
|
||||
|
||||
function onMoreCommandsClick() {
|
||||
const button = this;
|
||||
let selectedItem = view.querySelector('.selectSource').value || currentItem.Id;
|
||||
|
||||
const apiClient = getApiClient();
|
||||
|
||||
apiClient.getItem(apiClient.getCurrentUserId(), selectedItem).then(function (item) {
|
||||
selectedItem = item;
|
||||
|
||||
|
@ -1985,6 +1995,7 @@ export default function (view, params) {
|
|||
|
||||
function onWebSocketMessage(e, data) {
|
||||
const msg = data;
|
||||
const apiClient = getApiClient();
|
||||
|
||||
if (msg.MessageType === 'UserDataChanged' && currentItem && msg.Data.UserId == apiClient.getCurrentUserId()) {
|
||||
const key = currentItem.UserData.Key;
|
||||
|
@ -2002,63 +2013,68 @@ export default function (view, params) {
|
|||
|
||||
let currentItem;
|
||||
const self = this;
|
||||
const apiClient = params.serverId ? window.connectionManager.getApiClient(params.serverId) : ApiClient;
|
||||
|
||||
const btnResume = view.querySelector('.mainDetailButtons .btnResume');
|
||||
const btnPlay = view.querySelector('.mainDetailButtons .btnPlay');
|
||||
if (layoutManager.tv && !btnResume.classList.contains('hide')) {
|
||||
btnResume.classList.add('fab');
|
||||
btnResume.classList.add('detailFloatingButton');
|
||||
} else if (layoutManager.tv && btnResume.classList.contains('hide')) {
|
||||
btnPlay.classList.add('fab');
|
||||
btnPlay.classList.add('detailFloatingButton');
|
||||
}
|
||||
function init() {
|
||||
const apiClient = getApiClient();
|
||||
|
||||
view.querySelectorAll('.btnPlay');
|
||||
bindAll(view, '.btnPlay', 'click', onPlayClick);
|
||||
bindAll(view, '.btnResume', 'click', onPlayClick);
|
||||
bindAll(view, '.btnInstantMix', 'click', onInstantMixClick);
|
||||
bindAll(view, '.btnShuffle', 'click', onShuffleClick);
|
||||
bindAll(view, '.btnPlayTrailer', 'click', onPlayTrailerClick);
|
||||
bindAll(view, '.btnCancelSeriesTimer', 'click', onCancelSeriesTimerClick);
|
||||
bindAll(view, '.btnCancelTimer', 'click', onCancelTimerClick);
|
||||
bindAll(view, '.btnDownload', 'click', onDownloadClick);
|
||||
view.querySelector('.detailImageContainer').addEventListener('click', onPosterClick);
|
||||
view.querySelector('.trackSelections').addEventListener('submit', onTrackSelectionsSubmit);
|
||||
view.querySelector('.btnSplitVersions').addEventListener('click', function () {
|
||||
splitVersions(self, view, apiClient, params);
|
||||
});
|
||||
bindAll(view, '.btnMoreCommands', 'click', onMoreCommandsClick);
|
||||
view.querySelector('.selectSource').addEventListener('change', function () {
|
||||
renderVideoSelections(view, self._currentPlaybackMediaSources);
|
||||
renderAudioSelections(view, self._currentPlaybackMediaSources);
|
||||
renderSubtitleSelections(view, self._currentPlaybackMediaSources);
|
||||
});
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
const page = this;
|
||||
|
||||
libraryMenu.setTransparentMenu(true);
|
||||
|
||||
if (e.detail.isRestored) {
|
||||
if (currentItem) {
|
||||
Emby.Page.setTitle('');
|
||||
renderTrackSelections(page, self, currentItem, true);
|
||||
}
|
||||
} else {
|
||||
reload(self, page, params);
|
||||
const btnResume = view.querySelector('.mainDetailButtons .btnResume');
|
||||
const btnPlay = view.querySelector('.mainDetailButtons .btnPlay');
|
||||
if (layoutManager.tv && !btnResume.classList.contains('hide')) {
|
||||
btnResume.classList.add('fab');
|
||||
btnResume.classList.add('detailFloatingButton');
|
||||
} else if (layoutManager.tv && btnResume.classList.contains('hide')) {
|
||||
btnPlay.classList.add('fab');
|
||||
btnPlay.classList.add('detailFloatingButton');
|
||||
}
|
||||
|
||||
events.on(apiClient, 'message', onWebSocketMessage);
|
||||
events.on(playbackManager, 'playerchange', onPlayerChange);
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
events.off(apiClient, 'message', onWebSocketMessage);
|
||||
events.off(playbackManager, 'playerchange', onPlayerChange);
|
||||
libraryMenu.setTransparentMenu(false);
|
||||
});
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
currentItem = null;
|
||||
self._currentPlaybackMediaSources = null;
|
||||
self.currentRecordingFields = null;
|
||||
});
|
||||
view.querySelectorAll('.btnPlay');
|
||||
bindAll(view, '.btnPlay', 'click', onPlayClick);
|
||||
bindAll(view, '.btnResume', 'click', onPlayClick);
|
||||
bindAll(view, '.btnInstantMix', 'click', onInstantMixClick);
|
||||
bindAll(view, '.btnShuffle', 'click', onShuffleClick);
|
||||
bindAll(view, '.btnPlayTrailer', 'click', onPlayTrailerClick);
|
||||
bindAll(view, '.btnCancelSeriesTimer', 'click', onCancelSeriesTimerClick);
|
||||
bindAll(view, '.btnCancelTimer', 'click', onCancelTimerClick);
|
||||
bindAll(view, '.btnDownload', 'click', onDownloadClick);
|
||||
view.querySelector('.detailImageContainer').addEventListener('click', onPosterClick);
|
||||
view.querySelector('.trackSelections').addEventListener('submit', onTrackSelectionsSubmit);
|
||||
view.querySelector('.btnSplitVersions').addEventListener('click', function () {
|
||||
splitVersions(self, view, apiClient, params);
|
||||
});
|
||||
bindAll(view, '.btnMoreCommands', 'click', onMoreCommandsClick);
|
||||
view.querySelector('.selectSource').addEventListener('change', function () {
|
||||
renderVideoSelections(view, self._currentPlaybackMediaSources);
|
||||
renderAudioSelections(view, self._currentPlaybackMediaSources);
|
||||
renderSubtitleSelections(view, self._currentPlaybackMediaSources);
|
||||
});
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
const page = this;
|
||||
|
||||
libraryMenu.setTransparentMenu(true);
|
||||
|
||||
if (e.detail.isRestored) {
|
||||
if (currentItem) {
|
||||
appRouter.setTitle('');
|
||||
renderTrackSelections(page, self, currentItem, true);
|
||||
}
|
||||
} else {
|
||||
reload(self, page, params);
|
||||
}
|
||||
|
||||
Events.on(apiClient, 'message', onWebSocketMessage);
|
||||
Events.on(playbackManager, 'playerchange', onPlayerChange);
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
Events.off(apiClient, 'message', onWebSocketMessage);
|
||||
Events.off(playbackManager, 'playerchange', onPlayerChange);
|
||||
libraryMenu.setTransparentMenu(false);
|
||||
});
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
currentItem = null;
|
||||
self._currentPlaybackMediaSources = null;
|
||||
self.currentRecordingFields = null;
|
||||
});
|
||||
}
|
||||
|
||||
init();
|
||||
}
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
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 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';
|
||||
import ServerConnections from '../components/ServerConnections';
|
||||
import { appRouter } from '../components/appRouter';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
function getInitialLiveTvQuery(instance, params) {
|
||||
const query = {
|
||||
UserId: window.connectionManager.getApiClient(params.serverId).getCurrentUserId(),
|
||||
UserId: ServerConnections.getApiClient(params.serverId).getCurrentUserId(),
|
||||
StartIndex: 0,
|
||||
Fields: 'ChannelInfo,PrimaryImageAspectRatio',
|
||||
Limit: 300
|
||||
|
@ -231,7 +233,7 @@ import 'emby-scroller';
|
|||
}
|
||||
|
||||
function getItems(instance, params, item, sortBy, startIndex, limit) {
|
||||
const apiClient = window.connectionManager.getApiClient(params.serverId);
|
||||
const apiClient = ServerConnections.getApiClient(params.serverId);
|
||||
|
||||
instance.queryRecursive = false;
|
||||
if (params.type === 'Recordings') {
|
||||
|
@ -332,7 +334,7 @@ import 'emby-scroller';
|
|||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
const apiClient = window.connectionManager.getApiClient(params.serverId);
|
||||
const apiClient = ServerConnections.getApiClient(params.serverId);
|
||||
const itemId = params.genreId || params.musicGenreId || params.studioId || params.personId || params.parentId;
|
||||
|
||||
if (itemId) {
|
||||
|
@ -345,7 +347,7 @@ import 'emby-scroller';
|
|||
function showViewSettingsMenu() {
|
||||
const instance = this;
|
||||
|
||||
import('viewSettings').then(({default: ViewSettings}) => {
|
||||
import('../components/viewSettings/viewSettings').then(({default: ViewSettings}) => {
|
||||
new ViewSettings().show({
|
||||
settingsKey: instance.getSettingsKey(),
|
||||
settings: instance.getViewSettings(),
|
||||
|
@ -360,7 +362,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 +381,7 @@ import 'emby-scroller';
|
|||
function showSortMenu() {
|
||||
const instance = this;
|
||||
|
||||
import('sortMenu').then(({default: SortMenu}) => {
|
||||
import('../components/sortmenu/sortmenu').then(({default: SortMenu}) => {
|
||||
new SortMenu().show({
|
||||
settingsKey: instance.getSettingsKey(),
|
||||
settings: instance.getSortValues(),
|
||||
|
@ -397,7 +399,7 @@ import 'emby-scroller';
|
|||
function onNewItemClick() {
|
||||
const instance = this;
|
||||
|
||||
import('playlistEditor').then(({default: playlistEditor}) => {
|
||||
import('../components/playlisteditor/playlisteditor').then(({default: playlistEditor}) => {
|
||||
new playlistEditor({
|
||||
items: [],
|
||||
serverId: instance.params.serverId
|
||||
|
@ -572,7 +574,7 @@ class ItemsView {
|
|||
}
|
||||
|
||||
function setTitle(item) {
|
||||
Emby.Page.setTitle(getTitle(item) || '');
|
||||
appRouter.setTitle(getTitle(item) || '');
|
||||
|
||||
if (item && item.CollectionType === 'playlists') {
|
||||
hideOrShowAll(view.querySelectorAll('.btnNewItem'), false);
|
||||
|
|
|
@ -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() {
|
||||
|
@ -91,13 +91,13 @@ export default function (view, params, tabContent) {
|
|||
}
|
||||
|
||||
function showFilterMenu(context) {
|
||||
import(['components/filterdialog/filterdialog']).then(({default: FilterDialog}) => {
|
||||
import('../../components/filterdialog/filterdialog').then(({default: FilterDialog}) => {
|
||||
const filterDialog = new FilterDialog({
|
||||
query: getQuery(),
|
||||
mode: 'livetvchannels',
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
events.on(filterDialog, 'filterchange', function () {
|
||||
Events.on(filterDialog, 'filterchange', function () {
|
||||
reloadItems(context);
|
||||
});
|
||||
filterDialog.show();
|
||||
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import tvguide from 'tvguide';
|
||||
import tvguide from '../../components/guide/guide';
|
||||
|
||||
export default function (view, params, tabContent) {
|
||||
let guideInstance;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
function renderRecordings(elem, recordings, cardOptions, scrollX) {
|
||||
if (!elem) {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
function enableScrollX() {
|
||||
return !layoutManager.desktop;
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
function enableScrollX() {
|
||||
return !layoutManager.desktop;
|
||||
|
@ -60,7 +61,7 @@ function loadRecommendedPrograms(page) {
|
|||
});
|
||||
loading.hide();
|
||||
|
||||
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
|
||||
autoFocuser.autoFocus(page);
|
||||
});
|
||||
});
|
||||
|
@ -239,31 +240,31 @@ export default function (view, params) {
|
|||
// TODO int is a little hard to read
|
||||
switch (index) {
|
||||
case 0:
|
||||
depends = 'controllers/livetv/livetvsuggested';
|
||||
depends = 'livetvsuggested';
|
||||
break;
|
||||
|
||||
case 1:
|
||||
depends = 'controllers/livetv/livetvguide';
|
||||
depends = 'livetvguide';
|
||||
break;
|
||||
|
||||
case 2:
|
||||
depends = 'controllers/livetv/livetvchannels';
|
||||
depends = 'livetvchannels';
|
||||
break;
|
||||
|
||||
case 3:
|
||||
depends = 'controllers/livetv/livetvrecordings';
|
||||
depends = 'livetvrecordings';
|
||||
break;
|
||||
|
||||
case 4:
|
||||
depends = 'controllers/livetv/livetvschedule';
|
||||
depends = 'livetvschedule';
|
||||
break;
|
||||
|
||||
case 5:
|
||||
depends = 'controllers/livetv/livetvseriestimers';
|
||||
depends = 'livetvseriestimers';
|
||||
break;
|
||||
}
|
||||
|
||||
import(depends).then(({default: controllerFactory}) => {
|
||||
import(`../livetv/${depends}`).then(({default: controllerFactory}) => {
|
||||
let tabContent;
|
||||
|
||||
if (index === 0) {
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
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';
|
||||
import Dashboard, { pageIdOn } from '../scripts/clientUtils';
|
||||
|
||||
function onListingsSubmitted() {
|
||||
Dashboard.navigate('livetvstatus.html');
|
||||
}
|
||||
|
||||
function init(page, type, providerId) {
|
||||
const url = 'components/tvproviders/' + type + '.js';
|
||||
|
||||
import(url).then(({default: factory}) => {
|
||||
import(`../components/tvproviders/${type}`).then(({default: factory}) => {
|
||||
const instance = new factory(page, providerId, {});
|
||||
events.on(instance, 'submitted', onListingsSubmitted);
|
||||
Events.on(instance, 'submitted', onListingsSubmitted);
|
||||
instance.init();
|
||||
});
|
||||
}
|
||||
|
||||
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);
|
||||
});
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
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';
|
||||
import Dashboard from '../scripts/clientUtils';
|
||||
import alert from '../components/alert';
|
||||
|
||||
function loadPage(page, config) {
|
||||
$('.liveTvSettingsForm', page).show();
|
||||
|
@ -50,9 +52,7 @@ function showSaveMessage(recordingPathChanged) {
|
|||
}
|
||||
|
||||
if (msg) {
|
||||
import('alert').then(({default: alert}) => {
|
||||
alert(msg);
|
||||
});
|
||||
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,
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
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.scss';
|
||||
import '../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import '../components/cardbuilder/card.css';
|
||||
import 'material-design-icons-iconfont';
|
||||
import '../elements/emby-button/emby-button';
|
||||
import Dashboard from '../scripts/clientUtils';
|
||||
import confirm from '../components/confirm/confirm';
|
||||
|
||||
const enableFocusTransform = !browser.slow && !browser.edge;
|
||||
|
||||
|
@ -56,17 +58,15 @@ function renderDevices(page, devices) {
|
|||
function deleteDevice(page, id) {
|
||||
const message = globalize.translate('MessageConfirmDeleteTunerDevice');
|
||||
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm(message, globalize.translate('HeaderDeleteDevice')).then(function () {
|
||||
loading.show();
|
||||
ApiClient.ajax({
|
||||
type: 'DELETE',
|
||||
url: ApiClient.getUrl('LiveTv/TunerHosts', {
|
||||
Id: id
|
||||
})
|
||||
}).then(function () {
|
||||
reload(page);
|
||||
});
|
||||
confirm(message, globalize.translate('HeaderDeleteDevice')).then(function () {
|
||||
loading.show();
|
||||
ApiClient.ajax({
|
||||
type: 'DELETE',
|
||||
url: ApiClient.getUrl('LiveTv/TunerHosts', {
|
||||
Id: id
|
||||
})
|
||||
}).then(function () {
|
||||
reload(page);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -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,19 +174,17 @@ function mapChannels(page, providerId) {
|
|||
function deleteProvider(page, id) {
|
||||
const message = globalize.translate('MessageConfirmDeleteGuideProvider');
|
||||
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm(message, globalize.translate('HeaderDeleteProvider')).then(function () {
|
||||
loading.show();
|
||||
ApiClient.ajax({
|
||||
type: 'DELETE',
|
||||
url: ApiClient.getUrl('LiveTv/ListingProviders', {
|
||||
Id: id
|
||||
})
|
||||
}).then(function () {
|
||||
reload(page);
|
||||
}, function () {
|
||||
reload(page);
|
||||
});
|
||||
confirm(message, globalize.translate('HeaderDeleteProvider')).then(function () {
|
||||
loading.show();
|
||||
ApiClient.ajax({
|
||||
type: 'DELETE',
|
||||
url: ApiClient.getUrl('LiveTv/ListingProviders', {
|
||||
Id: id
|
||||
})
|
||||
}).then(function () {
|
||||
reload(page);
|
||||
}, function () {
|
||||
reload(page);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -237,7 +235,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 +261,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
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
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';
|
||||
import Dashboard from '../scripts/clientUtils';
|
||||
|
||||
function isM3uVariant(type) {
|
||||
return ['nextpvr'].indexOf(type || '') !== -1;
|
||||
|
@ -102,7 +103,7 @@ function submitForm(page) {
|
|||
}
|
||||
|
||||
function getDetectedDevice() {
|
||||
return import('tunerPicker').then(({default: tunerPicker}) => {
|
||||
return import('../components/tunerPicker').then(({default: tunerPicker}) => {
|
||||
return new tunerPicker().show({
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
|
@ -211,7 +212,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,
|
||||
|
|
|
@ -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: [],
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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,13 +278,13 @@ 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',
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
events.on(filterDialog, 'filterchange', () => {
|
||||
Events.on(filterDialog, 'filterchange', () => {
|
||||
query.StartIndex = 0;
|
||||
itemsContainer.refreshItems();
|
||||
});
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -182,7 +184,7 @@ import 'emby-button';
|
|||
}
|
||||
|
||||
function autoFocus(page) {
|
||||
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
|
||||
autoFocuser.autoFocus(page);
|
||||
});
|
||||
}
|
||||
|
@ -281,31 +283,31 @@ import 'emby-button';
|
|||
|
||||
switch (index) {
|
||||
case 0:
|
||||
depends = 'controllers/movies/movies';
|
||||
depends = 'movies';
|
||||
break;
|
||||
|
||||
case 1:
|
||||
depends = 'controllers/movies/moviesrecommended.js';
|
||||
depends = 'moviesrecommended.js';
|
||||
break;
|
||||
|
||||
case 2:
|
||||
depends = 'controllers/movies/movietrailers';
|
||||
depends = 'movietrailers';
|
||||
break;
|
||||
|
||||
case 3:
|
||||
depends = 'controllers/movies/movies';
|
||||
depends = 'movies';
|
||||
break;
|
||||
|
||||
case 4:
|
||||
depends = 'controllers/movies/moviecollections';
|
||||
depends = 'moviecollections';
|
||||
break;
|
||||
|
||||
case 5:
|
||||
depends = 'controllers/movies/moviegenres';
|
||||
depends = 'moviegenres';
|
||||
break;
|
||||
}
|
||||
|
||||
import(depends).then(({default: controllerFactory}) => {
|
||||
import(`../movies/${depends}`).then(({default: controllerFactory}) => {
|
||||
let tabContent;
|
||||
|
||||
if (index === suggestionsTabIndex) {
|
||||
|
@ -403,7 +405,7 @@ import 'emby-button';
|
|||
}
|
||||
}
|
||||
|
||||
events.on(playbackManager, 'playbackstop', onPlaybackStop);
|
||||
Events.on(playbackManager, 'playbackstop', onPlaybackStop);
|
||||
inputManager.on(window, onInputCommand);
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
|
|
|
@ -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,13 +192,13 @@ 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',
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
events.on(filterDialog, 'filterchange', function () {
|
||||
Events.on(filterDialog, 'filterchange', function () {
|
||||
getQuery(tabContent).StartIndex = 0;
|
||||
reloadItems();
|
||||
});
|
||||
|
|
|
@ -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,14 +204,13 @@ 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',
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
|
||||
events.on(filterDialog, 'filterchange', function () {
|
||||
Events.on(filterDialog, 'filterchange', function () {
|
||||
getQuery().StartIndex = 0;
|
||||
reloadItems(tabContent);
|
||||
});
|
||||
|
|
|
@ -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,13 +176,13 @@ 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,
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
events.on(filterDialog, 'filterchange', function () {
|
||||
Events.on(filterDialog, 'filterchange', function () {
|
||||
getQuery(tabContent).StartIndex = 0;
|
||||
reloadItems(tabContent);
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
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.scss';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -74,7 +75,7 @@ import 'flexStyles';
|
|||
imageLoader.lazyChildren(elem);
|
||||
loading.hide();
|
||||
|
||||
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
|
||||
autoFocuser.autoFocus(page);
|
||||
});
|
||||
});
|
||||
|
@ -170,7 +171,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']);
|
||||
});
|
||||
}
|
||||
|
@ -268,32 +269,32 @@ import 'flexStyles';
|
|||
|
||||
switch (index) {
|
||||
case 0:
|
||||
depends = 'controllers/music/musicalbums';
|
||||
depends = 'musicalbums';
|
||||
break;
|
||||
|
||||
case 1:
|
||||
depends = 'controllers/music/musicrecommended';
|
||||
depends = 'musicrecommended';
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
depends = 'controllers/music/musicartists';
|
||||
depends = 'musicartists';
|
||||
break;
|
||||
|
||||
case 4:
|
||||
depends = 'controllers/music/musicplaylists';
|
||||
depends = 'musicplaylists';
|
||||
break;
|
||||
|
||||
case 5:
|
||||
depends = 'controllers/music/songs';
|
||||
depends = 'songs';
|
||||
break;
|
||||
|
||||
case 6:
|
||||
depends = 'controllers/music/musicgenres';
|
||||
depends = 'musicgenres';
|
||||
break;
|
||||
}
|
||||
|
||||
import(depends).then(({default: controllerFactory}) => {
|
||||
import(`../music/${depends}`).then(({default: controllerFactory}) => {
|
||||
let tabContent;
|
||||
|
||||
if (index == 1) {
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -119,7 +121,7 @@ import 'emby-itemscontainer';
|
|||
loading.hide();
|
||||
isLoading = false;
|
||||
|
||||
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
|
||||
autoFocuser.autoFocus(page);
|
||||
});
|
||||
});
|
||||
|
@ -130,13 +132,13 @@ 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',
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
events.on(filterDialog, 'filterchange', function () {
|
||||
Events.on(filterDialog, 'filterchange', function () {
|
||||
getQuery(tabContent).StartIndex = 0;
|
||||
reloadItems(tabContent);
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -1,22 +1,26 @@
|
|||
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 { 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';
|
||||
import ServerConnections from '../../../components/ServerConnections';
|
||||
import shell from '../../../scripts/shell';
|
||||
import SubtitleSync from '../../../components/subtitlesync/subtitlesync';
|
||||
import { appRouter } from '../../../components/appRouter';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -73,7 +77,7 @@ import 'css!assets/css/videoosd';
|
|||
|
||||
function getDisplayItem(item) {
|
||||
if (item.Type === 'TvChannel') {
|
||||
const apiClient = window.connectionManager.getApiClient(item.ServerId);
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
return apiClient.getItem(apiClient.getCurrentUserId(), item.Id).then(function (refreshedItem) {
|
||||
return {
|
||||
originalItem: refreshedItem,
|
||||
|
@ -97,9 +101,9 @@ import 'css!assets/css/videoosd';
|
|||
return void view.querySelector('.btnRecord').classList.add('hide');
|
||||
}
|
||||
|
||||
window.connectionManager.getApiClient(item.ServerId).getCurrentUser().then(function (user) {
|
||||
ServerConnections.getApiClient(item.ServerId).getCurrentUser().then(function (user) {
|
||||
if (user.Policy.EnableLiveTvManagement) {
|
||||
import('recordingButton').then(({default: RecordingButton}) => {
|
||||
import('../../../components/recordingcreator/recordingbutton').then(({default: RecordingButton}) => {
|
||||
if (recordingButtonManager) {
|
||||
return void recordingButtonManager.refreshItem(item);
|
||||
}
|
||||
|
@ -190,7 +194,7 @@ import 'css!assets/css/videoosd';
|
|||
currentItem = item;
|
||||
if (!item) {
|
||||
updateRecordingButton(null);
|
||||
Emby.Page.setTitle('');
|
||||
appRouter.setTitle('');
|
||||
nowPlayingVolumeSlider.disabled = true;
|
||||
nowPlayingPositionSlider.disabled = true;
|
||||
btnFastForward.disabled = true;
|
||||
|
@ -238,7 +242,7 @@ import 'css!assets/css/videoosd';
|
|||
itemName = parentName || '';
|
||||
}
|
||||
|
||||
Emby.Page.setTitle(itemName);
|
||||
appRouter.setTitle(itemName);
|
||||
|
||||
const documentTitle = parentName || (item ? item.Name : null);
|
||||
|
||||
|
@ -510,7 +514,7 @@ import 'css!assets/css/videoosd';
|
|||
|
||||
if (state.NextMediaType !== 'Video') {
|
||||
view.removeEventListener('viewbeforehide', onViewHideStopPlayback);
|
||||
Emby.Page.back();
|
||||
appRouter.back();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -540,16 +544,16 @@ import 'css!assets/css/videoosd';
|
|||
onStateChanged.call(player, {
|
||||
type: 'init'
|
||||
}, state);
|
||||
events.on(player, 'playbackstart', onPlaybackStart);
|
||||
events.on(player, 'playbackstop', onPlaybackStopped);
|
||||
events.on(player, 'volumechange', onVolumeChanged);
|
||||
events.on(player, 'pause', onPlayPauseStateChanged);
|
||||
events.on(player, 'unpause', onPlayPauseStateChanged);
|
||||
events.on(player, 'timeupdate', onTimeUpdate);
|
||||
events.on(player, 'fullscreenchange', updateFullscreenIcon);
|
||||
events.on(player, 'mediastreamschange', onMediaStreamsChanged);
|
||||
events.on(player, 'beginFetch', onBeginFetch);
|
||||
events.on(player, 'endFetch', onEndFetch);
|
||||
Events.on(player, 'playbackstart', onPlaybackStart);
|
||||
Events.on(player, 'playbackstop', onPlaybackStopped);
|
||||
Events.on(player, 'volumechange', onVolumeChanged);
|
||||
Events.on(player, 'pause', onPlayPauseStateChanged);
|
||||
Events.on(player, 'unpause', onPlayPauseStateChanged);
|
||||
Events.on(player, 'timeupdate', onTimeUpdate);
|
||||
Events.on(player, 'fullscreenchange', updateFullscreenIcon);
|
||||
Events.on(player, 'mediastreamschange', onMediaStreamsChanged);
|
||||
Events.on(player, 'beginFetch', onBeginFetch);
|
||||
Events.on(player, 'endFetch', onEndFetch);
|
||||
resetUpNextDialog();
|
||||
|
||||
if (player.isFetching) {
|
||||
|
@ -564,14 +568,14 @@ import 'css!assets/css/videoosd';
|
|||
const player = currentPlayer;
|
||||
|
||||
if (player) {
|
||||
events.off(player, 'playbackstart', onPlaybackStart);
|
||||
events.off(player, 'playbackstop', onPlaybackStopped);
|
||||
events.off(player, 'volumechange', onVolumeChanged);
|
||||
events.off(player, 'pause', onPlayPauseStateChanged);
|
||||
events.off(player, 'unpause', onPlayPauseStateChanged);
|
||||
events.off(player, 'timeupdate', onTimeUpdate);
|
||||
events.off(player, 'fullscreenchange', updateFullscreenIcon);
|
||||
events.off(player, 'mediastreamschange', onMediaStreamsChanged);
|
||||
Events.off(player, 'playbackstart', onPlaybackStart);
|
||||
Events.off(player, 'playbackstop', onPlaybackStopped);
|
||||
Events.off(player, 'volumechange', onVolumeChanged);
|
||||
Events.off(player, 'pause', onPlayPauseStateChanged);
|
||||
Events.off(player, 'unpause', onPlayPauseStateChanged);
|
||||
Events.off(player, 'timeupdate', onTimeUpdate);
|
||||
Events.off(player, 'fullscreenchange', updateFullscreenIcon);
|
||||
Events.off(player, 'mediastreamschange', onMediaStreamsChanged);
|
||||
currentPlayer = null;
|
||||
}
|
||||
}
|
||||
|
@ -613,7 +617,7 @@ import 'css!assets/css/videoosd';
|
|||
}
|
||||
|
||||
function showComingUpNext(player) {
|
||||
import('upNextDialog').then(({default: UpNextDialog}) => {
|
||||
import('../../../components/upnextdialog/upnextdialog').then(({default: UpNextDialog}) => {
|
||||
if (!(currentVisibleMenu || currentUpNextDialog)) {
|
||||
currentVisibleMenu = 'upnext';
|
||||
comingUpNextDisplayed = true;
|
||||
|
@ -623,7 +627,7 @@ import 'css!assets/css/videoosd';
|
|||
player: player,
|
||||
nextItem: nextItem
|
||||
});
|
||||
events.on(currentUpNextDialog, 'hide', onUpNextHidden);
|
||||
Events.on(currentUpNextDialog, 'hide', onUpNextHidden);
|
||||
}, onUpNextHidden);
|
||||
}
|
||||
});
|
||||
|
@ -852,7 +856,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 +893,7 @@ import 'css!assets/css/videoosd';
|
|||
}
|
||||
|
||||
function toggleStats() {
|
||||
import('playerStats').then(({default: PlayerStats}) => {
|
||||
import('../../../components/playerstats/playerstats').then(({default: PlayerStats}) => {
|
||||
const player = currentPlayer;
|
||||
|
||||
if (player) {
|
||||
|
@ -929,7 +933,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 +979,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,14 +1001,12 @@ import 'css!assets/css/videoosd';
|
|||
}
|
||||
|
||||
function toggleSubtitleSync(action) {
|
||||
import('subtitleSync').then(({default: SubtitleSync}) => {
|
||||
const player = currentPlayer;
|
||||
if (subtitleSyncOverlay) {
|
||||
subtitleSyncOverlay.toggle(action);
|
||||
} else if (player) {
|
||||
subtitleSyncOverlay = new SubtitleSync(player);
|
||||
}
|
||||
});
|
||||
const player = currentPlayer;
|
||||
if (subtitleSyncOverlay) {
|
||||
subtitleSyncOverlay.toggle(action);
|
||||
} else if (player) {
|
||||
subtitleSyncOverlay = new SubtitleSync(player);
|
||||
}
|
||||
}
|
||||
|
||||
function destroySubtitleSync() {
|
||||
|
@ -1228,9 +1230,7 @@ import 'css!assets/css/videoosd';
|
|||
let playPauseClickTimeout;
|
||||
function onViewHideStopPlayback() {
|
||||
if (playbackManager.isPlayingVideo()) {
|
||||
import('shell').then(({default: shell}) => {
|
||||
shell.disableFullscreen();
|
||||
});
|
||||
shell.disableFullscreen();
|
||||
|
||||
clearTimeout(playPauseClickTimeout);
|
||||
const player = currentPlayer;
|
||||
|
@ -1248,9 +1248,7 @@ import 'css!assets/css/videoosd';
|
|||
}
|
||||
}
|
||||
|
||||
import('shell').then(({default: shell}) => {
|
||||
shell.enableFullscreen();
|
||||
});
|
||||
shell.enableFullscreen();
|
||||
|
||||
let currentPlayer;
|
||||
let comingUpNextDisplayed;
|
||||
|
@ -1295,11 +1293,11 @@ import 'css!assets/css/videoosd';
|
|||
|
||||
view.addEventListener('viewbeforeshow', function (e) {
|
||||
headerElement.classList.add('osdHeader');
|
||||
Emby.Page.setTransparency('full');
|
||||
appRouter.setTransparency('full');
|
||||
});
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
try {
|
||||
events.on(playbackManager, 'playerchange', onPlayerChange);
|
||||
Events.on(playbackManager, 'playerchange', onPlayerChange);
|
||||
bindToPlayer(playbackManager.getCurrentPlayer());
|
||||
/* eslint-disable-next-line compat/compat */
|
||||
dom.addEventListener(document, window.PointerEvent ? 'pointermove' : 'mousemove', onPointerMove, {
|
||||
|
@ -1337,9 +1335,7 @@ import 'css!assets/css/videoosd';
|
|||
passive: true
|
||||
});
|
||||
} catch (e) {
|
||||
import('appRouter').then(({default: appRouter}) => {
|
||||
appRouter.goHome();
|
||||
});
|
||||
appRouter.goHome();
|
||||
}
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
|
@ -1384,7 +1380,7 @@ import 'css!assets/css/videoosd';
|
|||
passive: true
|
||||
});
|
||||
inputManager.off(window, onInputCommand);
|
||||
events.off(playbackManager, 'playerchange', onPlayerChange);
|
||||
Events.off(playbackManager, 'playerchange', onPlayerChange);
|
||||
releaseCurrentPlayer();
|
||||
});
|
||||
view.querySelector('.btnFullscreen').addEventListener('click', function () {
|
||||
|
@ -1515,7 +1511,7 @@ import 'css!assets/css/videoosd';
|
|||
const item = currentItem;
|
||||
|
||||
if (item && item.Chapters && item.Chapters.length && item.Chapters[0].ImageTag) {
|
||||
const html = getChapterBubbleHtml(window.connectionManager.getApiClient(item.ServerId), item, item.Chapters, ticks);
|
||||
const html = getChapterBubbleHtml(ServerConnections.getApiClient(item.ServerId), item, item.Chapters, ticks);
|
||||
|
||||
if (html) {
|
||||
return html;
|
||||
|
@ -1548,15 +1544,15 @@ import 'css!assets/css/videoosd';
|
|||
|
||||
if (browser.touch) {
|
||||
(function () {
|
||||
import('touchHelper').then(({default: TouchHelper}) => {
|
||||
import('../../../scripts/touchHelper').then(({default: TouchHelper}) => {
|
||||
self.touchHelper = new TouchHelper(view, {
|
||||
swipeYThreshold: 30,
|
||||
triggerOnMove: true,
|
||||
preventDefaultOnMove: true,
|
||||
ignoreTagNames: ['BUTTON', 'INPUT', 'TEXTAREA']
|
||||
});
|
||||
events.on(self.touchHelper, 'swipeup', onVerticalSwipe);
|
||||
events.on(self.touchHelper, 'swipedown', onVerticalSwipe);
|
||||
Events.on(self.touchHelper, 'swipeup', onVerticalSwipe);
|
||||
Events.on(self.touchHelper, 'swipedown', onVerticalSwipe);
|
||||
});
|
||||
})();
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
@ -19,7 +19,7 @@ export default function (view, params) {
|
|||
parentId: params.parentId,
|
||||
collectionType: params.collectionType
|
||||
});
|
||||
events.on(self.searchFields, 'search', onSearch);
|
||||
Events.on(self.searchFields, 'search', onSearch);
|
||||
}
|
||||
});
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import ServerConnections from '../../../components/ServerConnections';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -36,7 +38,7 @@ import 'emby-button';
|
|||
function submitServer(page) {
|
||||
loading.show();
|
||||
const host = page.querySelector('#txtServerHost').value;
|
||||
window.connectionManager.connectToAddress(host, {
|
||||
ServerConnections.connectToAddress(host, {
|
||||
enableAutoLogin: appSettings.enableAutoLogin()
|
||||
}).then(function(result) {
|
||||
handleConnectionResult(page, result);
|
||||
|
@ -51,7 +53,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 +64,7 @@ import 'emby-button';
|
|||
}
|
||||
|
||||
function goBack() {
|
||||
import('appRouter').then(({default: appRouter}) => {
|
||||
import('../../../components/appRouter').then(({default: appRouter}) => {
|
||||
appRouter.back();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import globalize from 'globalize';
|
||||
import globalize from '../../../scripts/globalize';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
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 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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import ServerConnections from '../../../components/ServerConnections';
|
||||
import toast from '../../../components/toast/toast';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -27,10 +30,8 @@ import 'emby-checkbox';
|
|||
|
||||
const UnauthorizedOrForbidden = [401, 403];
|
||||
if (UnauthorizedOrForbidden.includes(response.status)) {
|
||||
import('toast').then(({default: toast}) => {
|
||||
const messageKey = response.status === 401 ? 'MessageInvalidUser' : 'MessageUnauthorizedUser';
|
||||
toast(globalize.translate(messageKey));
|
||||
});
|
||||
const messageKey = response.status === 401 ? 'MessageInvalidUser' : 'MessageUnauthorizedUser';
|
||||
toast(globalize.translate(messageKey));
|
||||
} else {
|
||||
Dashboard.alert({
|
||||
message: globalize.translate('MessageUnableToConnectToServer'),
|
||||
|
@ -191,7 +192,7 @@ import 'emby-checkbox';
|
|||
const serverId = params.serverid;
|
||||
|
||||
if (serverId) {
|
||||
return window.connectionManager.getOrCreateApiClient(serverId);
|
||||
return ServerConnections.getOrCreateApiClient(serverId);
|
||||
}
|
||||
|
||||
return ApiClient;
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import globalize from 'globalize';
|
||||
import globalize from '../../../scripts/globalize';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
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 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.scss';
|
||||
import '../../../elements/emby-scroller/emby-scroller';
|
||||
import '../../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import '../../../components/cardbuilder/card.css';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import ServerConnections from '../../../components/ServerConnections';
|
||||
import alert from '../../../components/alert';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -100,9 +103,7 @@ import 'emby-button';
|
|||
}
|
||||
|
||||
function alertTextWithOptions(options) {
|
||||
import('alert').then(({default: alert}) => {
|
||||
alert(options);
|
||||
});
|
||||
alert(options);
|
||||
}
|
||||
|
||||
function showServerConnectionFailure() {
|
||||
|
@ -112,7 +113,7 @@ import 'emby-button';
|
|||
export default function (view, params) {
|
||||
function connectToServer(server) {
|
||||
loading.show();
|
||||
window.connectionManager.connectToServer(server, {
|
||||
ServerConnections.connectToServer(server, {
|
||||
enableAutoLogin: appSettings.enableAutoLogin()
|
||||
}).then(function (result) {
|
||||
loading.hide();
|
||||
|
@ -144,7 +145,7 @@ import 'emby-button';
|
|||
|
||||
function deleteServer(server) {
|
||||
loading.show();
|
||||
window.connectionManager.deleteServer(server.Id).then(function () {
|
||||
ServerConnections.deleteServer(server.Id).then(function () {
|
||||
loading.hide();
|
||||
loadServers();
|
||||
});
|
||||
|
@ -186,7 +187,7 @@ import 'emby-button';
|
|||
|
||||
function loadServers() {
|
||||
loading.show();
|
||||
window.connectionManager.getAvailableServers().then(onServersRetrieved);
|
||||
ServerConnections.getAvailableServers().then(onServersRetrieved);
|
||||
}
|
||||
|
||||
let servers;
|
||||
|
|
|
@ -1,12 +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 * 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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -160,7 +161,7 @@ import 'emby-itemscontainer';
|
|||
loading.hide();
|
||||
isLoading = false;
|
||||
|
||||
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
|
||||
autoFocuser.autoFocus(page);
|
||||
});
|
||||
});
|
||||
|
@ -171,13 +172,13 @@ 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',
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
events.on(filterDialog, 'filterchange', function () {
|
||||
Events.on(filterDialog, 'filterchange', function () {
|
||||
reloadItems(tabContent);
|
||||
});
|
||||
filterDialog.show();
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
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';
|
||||
import Dashboard from '../../scripts/clientUtils';
|
||||
import autoFocuser from '../../components/autoFocuser';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -127,9 +130,7 @@ import 'emby-button';
|
|||
});
|
||||
loading.hide();
|
||||
|
||||
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||
autoFocuser.autoFocus(view);
|
||||
});
|
||||
autoFocuser.autoFocus(view);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -168,9 +169,7 @@ import 'emby-button';
|
|||
});
|
||||
loading.hide();
|
||||
|
||||
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||
autoFocuser.autoFocus(view);
|
||||
});
|
||||
autoFocuser.autoFocus(view);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -209,9 +208,7 @@ import 'emby-button';
|
|||
});
|
||||
loading.hide();
|
||||
|
||||
import('autoFocuser').then(({default: autoFocuser}) => {
|
||||
autoFocuser.autoFocus(view);
|
||||
});
|
||||
autoFocuser.autoFocus(view);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -246,31 +243,31 @@ import 'emby-button';
|
|||
|
||||
switch (index) {
|
||||
case 0:
|
||||
depends = 'controllers/shows/tvshows';
|
||||
depends = 'tvshows';
|
||||
break;
|
||||
|
||||
case 1:
|
||||
depends = 'controllers/shows/tvrecommended';
|
||||
depends = 'tvrecommended';
|
||||
break;
|
||||
|
||||
case 2:
|
||||
depends = 'controllers/shows/tvupcoming';
|
||||
depends = 'tvupcoming';
|
||||
break;
|
||||
|
||||
case 3:
|
||||
depends = 'controllers/shows/tvgenres';
|
||||
depends = 'tvgenres';
|
||||
break;
|
||||
|
||||
case 4:
|
||||
depends = 'controllers/shows/tvstudios';
|
||||
depends = 'tvstudios';
|
||||
break;
|
||||
|
||||
case 5:
|
||||
depends = 'controllers/shows/episodes';
|
||||
depends = 'episodes';
|
||||
break;
|
||||
}
|
||||
|
||||
import(depends).then(({default: controllerFactory}) => {
|
||||
import(`../shows/${depends}`).then(({default: controllerFactory}) => {
|
||||
let tabContent;
|
||||
|
||||
if (index === 1) {
|
||||
|
@ -373,14 +370,14 @@ import 'emby-button';
|
|||
}
|
||||
}
|
||||
|
||||
events.on(playbackManager, 'playbackstop', onPlaybackStop);
|
||||
events.on(ApiClient, 'message', onWebSocketMessage);
|
||||
Events.on(playbackManager, 'playbackstop', onPlaybackStop);
|
||||
Events.on(ApiClient, 'message', onWebSocketMessage);
|
||||
inputManager.on(window, onInputCommand);
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function (e) {
|
||||
inputManager.off(window, onInputCommand);
|
||||
events.off(playbackManager, 'playbackstop', onPlaybackStop);
|
||||
events.off(ApiClient, 'message', onWebSocketMessage);
|
||||
Events.off(playbackManager, 'playbackstop', onPlaybackStop);
|
||||
Events.off(ApiClient, 'message', onWebSocketMessage);
|
||||
});
|
||||
view.addEventListener('viewdestroy', function (e) {
|
||||
tabControllers.forEach(function (t) {
|
||||
|
|
|
@ -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,13 +214,13 @@ 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',
|
||||
serverId: ApiClient.serverId()
|
||||
});
|
||||
events.on(filterDialog, 'filterchange', function () {
|
||||
Events.on(filterDialog, 'filterchange', function () {
|
||||
getQuery(tabContent).StartIndex = 0;
|
||||
reloadItems(tabContent);
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
export default function (view, params) {
|
||||
view.querySelector('.btnLogout').addEventListener('click', function () {
|
||||
|
@ -53,7 +54,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);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import toast from '../../../components/toast/toast';
|
||||
import confirm from '../../../components/confirm/confirm';
|
||||
|
||||
function reloadUser(page) {
|
||||
const userId = getParameterByName('userId');
|
||||
|
@ -40,26 +43,20 @@ function onFileReaderError(evt) {
|
|||
loading.hide();
|
||||
switch (evt.target.error.code) {
|
||||
case evt.target.error.NOT_FOUND_ERR:
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('FileNotFound'));
|
||||
});
|
||||
toast(globalize.translate('FileNotFound'));
|
||||
break;
|
||||
case evt.target.error.ABORT_ERR:
|
||||
onFileReaderAbort();
|
||||
break;
|
||||
case evt.target.error.NOT_READABLE_ERR:
|
||||
default:
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('FileReadError'));
|
||||
});
|
||||
toast(globalize.translate('FileReadError'));
|
||||
}
|
||||
}
|
||||
|
||||
function onFileReaderAbort(evt) {
|
||||
loading.hide();
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('FileReadCancelled'));
|
||||
});
|
||||
toast(globalize.translate('FileReadCancelled'));
|
||||
}
|
||||
|
||||
function setFiles(page, files) {
|
||||
|
@ -89,14 +86,12 @@ export default function (view, params) {
|
|||
reloadUser(view);
|
||||
new UserPasswordPage(view, params);
|
||||
view.querySelector('#btnDeleteImage').addEventListener('click', function () {
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
confirm(globalize.translate('DeleteImageConfirmation'), globalize.translate('DeleteImage')).then(function () {
|
||||
loading.show();
|
||||
const userId = getParameterByName('userId');
|
||||
ApiClient.deleteUserImage(userId, 'primary').then(function () {
|
||||
loading.hide();
|
||||
reloadUser(view);
|
||||
});
|
||||
confirm(globalize.translate('DeleteImageConfirmation'), globalize.translate('DeleteImage')).then(function () {
|
||||
loading.show();
|
||||
const userId = getParameterByName('userId');
|
||||
ApiClient.deleteUserImage(userId, 'primary').then(function () {
|
||||
loading.hide();
|
||||
reloadUser(view);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import QuickConnectSettings from 'quickConnectSettings';
|
||||
import globalize from 'globalize';
|
||||
import toast from 'toast';
|
||||
import QuickConnectSettings from '../../../components/quickConnectSettings/quickConnectSettings';
|
||||
import globalize from '../../../scripts/globalize';
|
||||
import toast from '../../../components/toast/toast';
|
||||
|
||||
export default function (view) {
|
||||
let quickConnectSettingsInstance = null;
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import loading from 'loading';
|
||||
import loading from '../../../components/loading/loading';
|
||||
|
||||
function onFinish() {
|
||||
loading.show();
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
function save(page) {
|
||||
loading.show();
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
function save(page) {
|
||||
loading.show();
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
function loadPage(page, config, languageOptions) {
|
||||
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) {
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
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';
|
||||
import Dashboard from '../../../scripts/clientUtils';
|
||||
import toast from '../../../components/toast/toast';
|
||||
|
||||
function getApiClient() {
|
||||
return ApiClient;
|
||||
|
@ -36,9 +38,7 @@ function onSubmit(e) {
|
|||
const form = this;
|
||||
|
||||
if (form.querySelector('#txtManualPassword').value != form.querySelector('#txtPasswordConfirm').value) {
|
||||
import('toast').then(({default: toast}) => {
|
||||
toast(globalize.translate('PasswordMatchError'));
|
||||
});
|
||||
toast(globalize.translate('PasswordMatchError'));
|
||||
} else {
|
||||
submit(form);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue