mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
multiple import fixes between other minor bugs
This commit is contained in:
parent
f77165f8c0
commit
4dd1917949
4 changed files with 77 additions and 86 deletions
|
@ -15,6 +15,7 @@ import appFooter from '../appFooter/appFooter';
|
||||||
import itemShortcuts from '../shortcuts';
|
import itemShortcuts from '../shortcuts';
|
||||||
import './nowPlayingBar.css';
|
import './nowPlayingBar.css';
|
||||||
import '../../elements/emby-slider/emby-slider';
|
import '../../elements/emby-slider/emby-slider';
|
||||||
|
import { appRouter } from '../appRouter';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
|
@ -248,9 +249,7 @@ import '../../elements/emby-slider/emby-slider';
|
||||||
}
|
}
|
||||||
|
|
||||||
function showRemoteControl() {
|
function showRemoteControl() {
|
||||||
import('../appRouter').then(({default: appRouter}) => {
|
|
||||||
appRouter.showNowPlaying();
|
appRouter.showNowPlaying();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let nowPlayingBarElement;
|
let nowPlayingBarElement;
|
||||||
|
|
|
@ -7,6 +7,10 @@ import { appRouter } from '../appRouter';
|
||||||
import globalize from '../../scripts/globalize';
|
import globalize from '../../scripts/globalize';
|
||||||
import { appHost } from '../apphost';
|
import { appHost } from '../apphost';
|
||||||
import { enable, isEnabled, supported } from '../../scripts/autocast';
|
import { enable, isEnabled, supported } from '../../scripts/autocast';
|
||||||
|
import '../../elements/emby-checkbox/emby-checkbox';
|
||||||
|
import '../../elements/emby-button/emby-button';
|
||||||
|
import dialog from '../dialog/dialog';
|
||||||
|
import dialogHelper from '../dialogHelper/dialogHelper';
|
||||||
|
|
||||||
function mirrorItem(info, player) {
|
function mirrorItem(info, player) {
|
||||||
const item = info.item;
|
const item = info.item;
|
||||||
|
@ -140,19 +144,11 @@ export function show(button) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function showActivePlayerMenu(playerInfo) {
|
function showActivePlayerMenu(playerInfo) {
|
||||||
Promise.all([
|
|
||||||
import('../dialogHelper/dialogHelper'),
|
|
||||||
import('../dialog/dialog'),
|
|
||||||
import('../../elements/emby-checkbox/emby-checkbox'),
|
|
||||||
import('../../elements/emby-button/emby-button')
|
|
||||||
]).then(([dialogHelper]) => {
|
|
||||||
showActivePlayerMenuInternal(dialogHelper, playerInfo);
|
showActivePlayerMenuInternal(dialogHelper, playerInfo);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function disconnectFromPlayer(currentDeviceName) {
|
function disconnectFromPlayer(currentDeviceName) {
|
||||||
if (playbackManager.getSupportedCommands().indexOf('EndSession') !== -1) {
|
if (playbackManager.getSupportedCommands().indexOf('EndSession') !== -1) {
|
||||||
import('../dialog/dialog').then(({default: dialog}) => {
|
|
||||||
const menuItems = [];
|
const menuItems = [];
|
||||||
|
|
||||||
menuItems.push({
|
menuItems.push({
|
||||||
|
@ -164,7 +160,7 @@ function disconnectFromPlayer(currentDeviceName) {
|
||||||
id: 'no'
|
id: 'no'
|
||||||
});
|
});
|
||||||
|
|
||||||
dialog({
|
dialog.show({
|
||||||
buttons: menuItems,
|
buttons: menuItems,
|
||||||
text: globalize.translate('ConfirmEndPlayerSession', currentDeviceName)
|
text: globalize.translate('ConfirmEndPlayerSession', currentDeviceName)
|
||||||
|
|
||||||
|
@ -181,7 +177,6 @@ function disconnectFromPlayer(currentDeviceName) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
playbackManager.setDefaultPlayerActive();
|
playbackManager.setDefaultPlayerActive();
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ import globalize from '../scripts/globalize';
|
||||||
return Promise.resolve(plugin);
|
return Promise.resolve(plugin);
|
||||||
} else {
|
} else {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
PluginManager.loadStrings(plugin)
|
this.#loadStrings(plugin)
|
||||||
.then(function () {
|
.then(function () {
|
||||||
resolve(plugin);
|
resolve(plugin);
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,6 +3,7 @@ import loading from '../loading/loading';
|
||||||
import ServerConnections from '../ServerConnections';
|
import ServerConnections from '../ServerConnections';
|
||||||
import toast from '../toast/toast';
|
import toast from '../toast/toast';
|
||||||
import confirm from '../confirm/confirm';
|
import confirm from '../confirm/confirm';
|
||||||
|
import dialog from '../dialog/dialog';
|
||||||
|
|
||||||
/*eslint prefer-const: "error"*/
|
/*eslint prefer-const: "error"*/
|
||||||
|
|
||||||
|
@ -100,7 +101,6 @@ function sendToast(msg) {
|
||||||
|
|
||||||
function showMultiCancellationPrompt(serverId, programId, timerId, timerStatus, seriesTimerId) {
|
function showMultiCancellationPrompt(serverId, programId, timerId, timerStatus, seriesTimerId) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
import('../dialog/dialog').then((dialog) => {
|
|
||||||
const items = [];
|
const items = [];
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
|
@ -129,11 +129,9 @@ function showMultiCancellationPrompt(serverId, programId, timerId, timerStatus,
|
||||||
type: 'cancel'
|
type: 'cancel'
|
||||||
});
|
});
|
||||||
|
|
||||||
dialog({
|
dialog.show({
|
||||||
|
|
||||||
text: globalize.translate('MessageConfirmRecordingCancellation'),
|
text: globalize.translate('MessageConfirmRecordingCancellation'),
|
||||||
buttons: items
|
buttons: items
|
||||||
|
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
const apiClient = ServerConnections.getApiClient(serverId);
|
const apiClient = ServerConnections.getApiClient(serverId);
|
||||||
|
|
||||||
|
@ -154,7 +152,6 @@ function showMultiCancellationPrompt(serverId, programId, timerId, timerStatus,
|
||||||
}
|
}
|
||||||
}, reject);
|
}, reject);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleRecording(serverId, programId, timerId, timerStatus, seriesTimerId) {
|
function toggleRecording(serverId, programId, timerId, timerStatus, seriesTimerId) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue