mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Make import paths ES6-compatible
This commit is contained in:
parent
1a635e2f81
commit
bfb8c7c1f6
245 changed files with 2073 additions and 1995 deletions
|
@ -1,3 +1,4 @@
|
|||
|
||||
.itemSelectionPanel {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import browser from 'browser';
|
||||
import appHost from 'apphost';
|
||||
import loading from 'loading';
|
||||
import globalize from 'globalize';
|
||||
import dom from 'dom';
|
||||
import 'css!./multiSelect';
|
||||
import browser from '../../scripts/browser';
|
||||
import appHost from '../apphost';
|
||||
import loading from '../loading/loading';
|
||||
import connectionManager from 'jellyfin-apiclient';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import dom from '../../scripts/dom';
|
||||
import './multiSelect.css';
|
||||
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -138,7 +139,7 @@ import 'css!./multiSelect';
|
|||
|
||||
function alertText(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
import('alert').then(({default: alert}) => {
|
||||
import('../alert').then((alert) => {
|
||||
alert(options).then(resolve, resolve);
|
||||
});
|
||||
});
|
||||
|
@ -154,7 +155,7 @@ import 'css!./multiSelect';
|
|||
title = globalize.translate('HeaderDeleteItems');
|
||||
}
|
||||
|
||||
import('confirm').then(({default: confirm}) => {
|
||||
import('../confirm/confirm').then((confirm) => {
|
||||
confirm(msg, title).then(() => {
|
||||
const promises = itemIds.map(itemId => {
|
||||
apiClient.deleteItem(itemId);
|
||||
|
@ -229,7 +230,7 @@ import 'css!./multiSelect';
|
|||
icon: 'refresh'
|
||||
});
|
||||
|
||||
import('actionsheet').then(({default: actionsheet}) => {
|
||||
import('../actionSheet/actionSheet').then((actionsheet) => {
|
||||
actionsheet.show({
|
||||
items: menuItems,
|
||||
positionTo: e.target,
|
||||
|
@ -239,7 +240,7 @@ import 'css!./multiSelect';
|
|||
|
||||
switch (id) {
|
||||
case 'addtocollection':
|
||||
import('collectionEditor').then(({default: collectionEditor}) => {
|
||||
import('../collectionEditor/collectionEditor').then((collectionEditor) => {
|
||||
new collectionEditor({
|
||||
items: items,
|
||||
serverId: serverId
|
||||
|
@ -249,7 +250,7 @@ import 'css!./multiSelect';
|
|||
dispatchNeedsRefresh();
|
||||
break;
|
||||
case 'playlist':
|
||||
import('playlistEditor').then(({default: playlistEditor}) => {
|
||||
import('../playlisteditor/playlisteditor').then((laylistEditor) => {
|
||||
new playlistEditor({
|
||||
items: items,
|
||||
serverId: serverId
|
||||
|
@ -281,7 +282,7 @@ import 'css!./multiSelect';
|
|||
dispatchNeedsRefresh();
|
||||
break;
|
||||
case 'refresh':
|
||||
import('refreshDialog').then(({default: refreshDialog}) => {
|
||||
import('../refreshdialog/refreshdialog').then((refreshDialog) => {
|
||||
new refreshDialog({
|
||||
itemIds: items,
|
||||
serverId: serverId
|
||||
|
@ -317,7 +318,7 @@ import 'css!./multiSelect';
|
|||
|
||||
function combineVersions(apiClient, selection) {
|
||||
if (selection.length < 2) {
|
||||
import('alert').then(({default: alert}) => {
|
||||
import('../alert').then((alert) => {
|
||||
alert({
|
||||
|
||||
text: globalize.translate('PleaseSelectTwoItems')
|
||||
|
@ -341,7 +342,7 @@ import 'css!./multiSelect';
|
|||
}
|
||||
|
||||
function showSelections(initialCard) {
|
||||
import('emby-checkbox').then(() => {
|
||||
import('../../elements/emby-checkbox/emby-checkbox').then(() => {
|
||||
const cards = document.querySelectorAll('.card');
|
||||
for (let i = 0, length = cards.length; i < length; i++) {
|
||||
showSelection(cards[i], initialCard === cards[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue