1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix eslint issues

This commit is contained in:
Bill Thornton 2023-03-29 00:38:22 -04:00
parent ed21a8dcdd
commit 6f3aa2f1df
85 changed files with 251 additions and 251 deletions

View file

@ -37,7 +37,7 @@ import template from './accessSchedule.template.html';
context.querySelector('#selectEnd').innerHTML = html;
}
function loadSchedule(context, {DayOfWeek, StartHour, EndHour}) {
function loadSchedule(context, { DayOfWeek, StartHour, EndHour }) {
context.querySelector('#selectDay').value = DayOfWeek || 'Sunday';
context.querySelector('#selectStart').value = StartHour || 0;
context.querySelector('#selectEnd').value = EndHour || 0;

View file

@ -309,8 +309,8 @@ function askForExit() {
exitPromise = actionsheet.show({
title: globalize.translate('MessageConfirmAppExit'),
items: [
{id: 'yes', name: globalize.translate('Yes')},
{id: 'no', name: globalize.translate('No')}
{ id: 'yes', name: globalize.translate('Yes') },
{ id: 'no', name: globalize.translate('No') }
]
}).then(function (value) {
if (value === 'yes') {
@ -366,20 +366,20 @@ export const appHost = {
};
},
deviceName: function () {
return window.NativeShell?.AppHost?.deviceName
? window.NativeShell.AppHost.deviceName() : getDeviceName();
return window.NativeShell?.AppHost?.deviceName ?
window.NativeShell.AppHost.deviceName() : getDeviceName();
},
deviceId: function () {
return window.NativeShell?.AppHost?.deviceId
? window.NativeShell.AppHost.deviceId() : getDeviceId();
return window.NativeShell?.AppHost?.deviceId ?
window.NativeShell.AppHost.deviceId() : getDeviceId();
},
appName: function () {
return window.NativeShell?.AppHost?.appName
? window.NativeShell.AppHost.appName() : appName;
return window.NativeShell?.AppHost?.appName ?
window.NativeShell.AppHost.appName() : appName;
},
appVersion: function () {
return window.NativeShell?.AppHost?.appVersion
? window.NativeShell.AppHost.appVersion() : Package.version;
return window.NativeShell?.AppHost?.appVersion ?
window.NativeShell.AppHost.appVersion() : Package.version;
},
getPushTokenInfo: function () {
return {};

View file

@ -896,13 +896,13 @@ import { appRouter } from '../appRouter';
}
if (options.showYear || options.showSeriesYear) {
const productionYear = item.ProductionYear && datetime.toLocaleString(item.ProductionYear, {useGrouping: false});
const productionYear = item.ProductionYear && datetime.toLocaleString(item.ProductionYear, { useGrouping: false });
if (item.Type === 'Series') {
if (item.Status === 'Continuing') {
lines.push(globalize.translate('SeriesYearToPresent', productionYear || ''));
} else {
if (item.EndDate && item.ProductionYear) {
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), {useGrouping: false});
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false });
lines.push(productionYear + ((endYear === item.ProductionYear) ? '' : (' - ' + endYear)));
} else {
lines.push(productionYear || '');

View file

@ -28,7 +28,7 @@ import ServerConnections from '../ServerConnections';
}
const mediaStreams = ((item.MediaSources || [])[0] || {}).MediaStreams || [];
const videoStream = mediaStreams.filter(({Type}) => {
const videoStream = mediaStreams.filter(({ Type }) => {
return Type === 'Video';
})[0] || {};
@ -68,7 +68,7 @@ import ServerConnections from '../ServerConnections';
return html;
}
function getImgUrl({Id}, {ImageTag}, index, maxWidth, apiClient) {
function getImgUrl({ Id }, { ImageTag }, index, maxWidth, apiClient) {
if (ImageTag) {
return apiClient.getScaledImageUrl(Id, {
@ -82,7 +82,7 @@ import ServerConnections from '../ServerConnections';
return null;
}
function buildChapterCard(item, apiClient, chapter, index, {width, coverImage}, className, shape) {
function buildChapterCard(item, apiClient, chapter, index, { width, coverImage }, className, shape) {
const imgUrl = getImgUrl(item, chapter, index, width || 400, apiClient);
let cardImageContainerClass = 'cardContent cardContent-shadow cardImageContainer chapterCardImageContainer';

View file

@ -22,7 +22,7 @@ const Filter: FC<FilterProps> = ({
const element = useRef<HTMLDivElement>(null);
const showFilterMenu = useCallback(() => {
import('../filtermenu/filtermenu').then(({default: FilterMenu}) => {
import('../filtermenu/filtermenu').then(({ default: FilterMenu }) => {
const filterMenu = new FilterMenu();
filterMenu.show({
settings: viewQuerySettings,

View file

@ -6,7 +6,7 @@ const NewCollection: FC = () => {
const element = useRef<HTMLDivElement>(null);
const showCollectionEditor = useCallback(() => {
import('../collectionEditor/collectionEditor').then(({default: CollectionEditor}) => {
import('../collectionEditor/collectionEditor').then(({ default: CollectionEditor }) => {
const serverId = window.ApiClient.serverId();
const collectionEditor = new CollectionEditor();
collectionEditor.show({

View file

@ -16,7 +16,7 @@ const SelectView: FC<SelectViewProps> = ({
const element = useRef<HTMLDivElement>(null);
const showViewSettingsMenu = useCallback(() => {
import('../viewSettings/viewSettings').then(({default: ViewSettings}) => {
import('../viewSettings/viewSettings').then(({ default: ViewSettings }) => {
const viewsettings = new ViewSettings();
viewsettings.show({
settings: viewQuerySettings,

View file

@ -19,7 +19,7 @@ const Sort: FC<SortProps> = ({
const element = useRef<HTMLDivElement>(null);
const showSortMenu = useCallback(() => {
import('../sortmenu/sortmenu').then(({default: SortMenu}) => {
import('../sortmenu/sortmenu').then(({ default: SortMenu }) => {
const sortMenu = new SortMenu();
sortMenu.show({
settings: viewQuerySettings,

View file

@ -14,7 +14,7 @@ type IProps = {
children?: React.ReactNode
}
const AccessContainer: FunctionComponent<IProps> = ({containerClassName, headerTitle, checkBoxClassName, checkBoxTitle, listContainerClassName, accessClassName, listTitle, description, children }: IProps) => {
const AccessContainer: FunctionComponent<IProps> = ({ containerClassName, headerTitle, checkBoxClassName, checkBoxTitle, listContainerClassName, accessClassName, listTitle, description, children }: IProps) => {
return (
<div className={containerClassName}>
<h2>{globalize.translate(headerTitle)}</h2>

View file

@ -22,7 +22,7 @@ function getDisplayTime(hours = 0) {
return datetime.getDisplayTime(new Date(2000, 1, 1, hours, minutes, 0, 0));
}
const AccessScheduleList: FunctionComponent<AccessScheduleListProps> = ({index, DayOfWeek, StartHour, EndHour}: AccessScheduleListProps) => {
const AccessScheduleList: FunctionComponent<AccessScheduleListProps> = ({ index, DayOfWeek, StartHour, EndHour }: AccessScheduleListProps) => {
return (
<div
className='liSchedule listItem'

View file

@ -5,7 +5,7 @@ type IProps = {
tag?: string;
}
const BlockedTagList: FunctionComponent<IProps> = ({tag}: IProps) => {
const BlockedTagList: FunctionComponent<IProps> = ({ tag }: IProps) => {
return (
<div className='paperList'>
<div className='listItem'>

View file

@ -36,7 +36,7 @@ const createLinkElement = (activeTab: string) => ({
</a>`
});
const SectionTabs: FunctionComponent<IProps> = ({activeTab}: IProps) => {
const SectionTabs: FunctionComponent<IProps> = ({ activeTab }: IProps) => {
return (
<div
data-role='controlgroup'

View file

@ -74,7 +74,7 @@ const UserCardBox: FunctionComponent<IProps> = ({ user = {} }: IProps) => {
</div>
<div className='cardFooter visualCardBox-cardFooter'>
<div
style={{textAlign: 'right', float: 'right', paddingTop: '5px'}}
style={{ textAlign: 'right', float: 'right', paddingTop: '5px' }}
>
<IconButtonElement
is='paper-icon-button-light'

View file

@ -14,7 +14,7 @@ type IProps = {
userId: string;
}
const UserPasswordForm: FunctionComponent<IProps> = ({userId}: IProps) => {
const UserPasswordForm: FunctionComponent<IProps> = ({ userId }: IProps) => {
const element = useRef<HTMLDivElement>(null);
const loadUser = useCallback(() => {
@ -76,7 +76,7 @@ const UserPasswordForm: FunctionComponent<IProps> = ({userId}: IProps) => {
chkEnableLocalEasyPassword.checked = user.Configuration.EnableLocalPassword || false;
import('../../autoFocuser').then(({default: autoFocuser}) => {
import('../../autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(page);
});
});
@ -214,7 +214,7 @@ const UserPasswordForm: FunctionComponent<IProps> = ({userId}: IProps) => {
<div ref={element}>
<form
className='updatePasswordForm passwordSection hide'
style={{margin: '0 auto 2em'}}
style={{ margin: '0 auto 2em' }}
>
<div className='detailSection'>
<div id='fldCurrentPassword' className='inputContainer hide'>
@ -260,7 +260,7 @@ const UserPasswordForm: FunctionComponent<IProps> = ({userId}: IProps) => {
<br />
<form
className='localAccessForm localAccessSection'
style={{margin: '0 auto'}}
style={{ margin: '0 auto' }}
>
<div className='detailSection'>
<div className='detailSectionHeader'>

View file

@ -29,7 +29,7 @@ import ServerConnections from '../ServerConnections';
import template from './tvguide.template.html';
function showViewSettings(instance) {
import('./guide-settings').then(({default: guideSettingsDialog}) => {
import('./guide-settings').then(({ default: guideSettingsDialog }) => {
guideSettingsDialog.show(instance.categoryOptions).then(function () {
instance.refresh();
});

View file

@ -26,8 +26,8 @@ import Events from '../utils/events.ts';
function canPlayNativeHls() {
const media = document.createElement('video');
return !!(media.canPlayType('application/x-mpegURL').replace(/no/, '') ||
media.canPlayType('application/vnd.apple.mpegURL').replace(/no/, ''));
return !!(media.canPlayType('application/x-mpegURL').replace(/no/, '')
|| media.canPlayType('application/vnd.apple.mpegURL').replace(/no/, ''));
}
export function enableHlsJsPlayer(runTimeTicks, mediaType) {
@ -201,8 +201,8 @@ import Events from '../utils/events.ts';
.catch((e) => {
const errorName = (e.name || '').toLowerCase();
// safari uses aborterror
if (errorName === 'notallowederror' ||
errorName === 'aborterror') {
if (errorName === 'notallowederror'
|| errorName === 'aborterror') {
// swallow this error because the user can still click the play button on the video element
return Promise.resolve();
}

View file

@ -282,7 +282,7 @@ import template from './imageeditor.template.html';
const providerCount = parseInt(imageCard.getAttribute('data-providers'), 10);
const numImages = parseInt(imageCard.getAttribute('data-numimages'), 10);
import('../actionSheet/actionSheet').then(({default: actionSheet}) => {
import('../actionSheet/actionSheet').then(({ default: actionSheet }) => {
const commands = [];
commands.push({
@ -353,7 +353,7 @@ import template from './imageeditor.template.html';
addListeners(context, 'btnOpenUploadMenu', 'click', function () {
const imageType = this.getAttribute('data-imagetype');
import('../imageUploader/imageUploader').then(({default: imageUploader}) => {
import('../imageUploader/imageUploader').then(({ default: imageUploader }) => {
imageUploader.show({
theme: options.theme,

View file

@ -326,7 +326,7 @@ import toast from './toast/toast';
// eslint-disable-next-line sonarjs/max-switch-cases
switch (id) {
case 'addtocollection':
import('./collectionEditor/collectionEditor').then(({default: CollectionEditor}) => {
import('./collectionEditor/collectionEditor').then(({ default: CollectionEditor }) => {
const collectionEditor = new CollectionEditor();
collectionEditor.show({
items: [itemId],
@ -335,7 +335,7 @@ import toast from './toast/toast';
});
break;
case 'addtoplaylist':
import('./playlisteditor/playlisteditor').then(({default: playlistEditor}) => {
import('./playlisteditor/playlisteditor').then(({ default: playlistEditor }) => {
new playlistEditor({
items: [itemId],
serverId: serverId
@ -408,7 +408,7 @@ import toast from './toast/toast';
break;
}
case 'editsubtitles':
import('./subtitleeditor/subtitleeditor').then(({default: subtitleEditor}) => {
import('./subtitleeditor/subtitleeditor').then(({ default: subtitleEditor }) => {
subtitleEditor.show(itemId, serverId).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
});
break;
@ -464,7 +464,7 @@ import toast from './toast/toast';
playbackManager.clearQueue();
break;
case 'record':
import('./recordingcreator/recordingcreator').then(({default: recordingCreator}) => {
import('./recordingcreator/recordingcreator').then(({ default: recordingCreator }) => {
recordingCreator.show(itemId, serverId).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
});
break;
@ -535,7 +535,7 @@ import toast from './toast/toast';
}
function deleteTimer(apiClient, item, resolve, command) {
import('./recordingcreator/recordinghelper').then(({default: recordingHelper}) => {
import('./recordingcreator/recordinghelper').then(({ default: recordingHelper }) => {
const timerId = item.TimerId || item.Id;
recordingHelper.cancelTimerWithConfirmation(timerId, item.ServerId).then(function () {
getResolveFunction(resolve, command, true)();
@ -544,7 +544,7 @@ import toast from './toast/toast';
}
function deleteSeriesTimer(apiClient, item, resolve, command) {
import('./recordingcreator/recordinghelper').then(({default: recordingHelper}) => {
import('./recordingcreator/recordinghelper').then(({ default: recordingHelper }) => {
recordingHelper.cancelSeriesTimerWithConfirmation(item.Id, item.ServerId).then(function () {
getResolveFunction(resolve, command, true)();
});
@ -585,15 +585,15 @@ import toast from './toast/toast';
const serverId = apiClient.serverInfo().Id;
if (item.Type === 'Timer') {
import('./recordingcreator/recordingeditor').then(({default: recordingEditor}) => {
import('./recordingcreator/recordingeditor').then(({ default: recordingEditor }) => {
recordingEditor.show(item.Id, serverId).then(resolve, reject);
});
} else if (item.Type === 'SeriesTimer') {
import('./recordingcreator/seriesrecordingeditor').then(({default: recordingEditor}) => {
import('./recordingcreator/seriesrecordingeditor').then(({ default: recordingEditor }) => {
recordingEditor.show(item.Id, serverId).then(resolve, reject);
});
} else {
import('./metadataEditor/metadataEditor').then(({default: metadataEditor}) => {
import('./metadataEditor/metadataEditor').then(({ default: metadataEditor }) => {
metadataEditor.show(item.Id, serverId).then(resolve, reject);
});
}
@ -614,7 +614,7 @@ import toast from './toast/toast';
}
function refresh(apiClient, item) {
import('./refreshdialog/refreshdialog').then(({default: refreshDialog}) => {
import('./refreshdialog/refreshdialog').then(({ default: refreshDialog }) => {
new refreshDialog({
itemIds: [item.Id],
serverId: apiClient.serverInfo().Id,

View file

@ -167,7 +167,7 @@ import datetime from '../../scripts/datetime';
lines.push(escapeHtml(identifyResult.Name));
if (identifyResult.ProductionYear) {
lines.push(datetime.toLocaleString(identifyResult.ProductionYear, {useGrouping: false}));
lines.push(datetime.toLocaleString(identifyResult.ProductionYear, { useGrouping: false }));
}
let resultHtml = lines.join('<br/>');

View file

@ -316,7 +316,7 @@ import template from './libraryoptionseditor.template.html';
}
function showImageOptionsForType(type) {
import('../imageOptionsEditor/imageOptionsEditor').then(({default: ImageOptionsEditor}) => {
import('../imageOptionsEditor/imageOptionsEditor').then(({ default: ImageOptionsEditor }) => {
let typeOptions = getTypeOptions(currentLibraryOptions, type);
if (!typeOptions) {
typeOptions = {

View file

@ -65,7 +65,7 @@ import '../elements/emby-button/emby-button';
}
};
import('../scripts/touchHelper').then(({default: TouchHelper}) => {
import('../scripts/touchHelper').then(({ default: TouchHelper }) => {
const touchHelper = new TouchHelper(view.parentNode.parentNode);
Events.on(touchHelper, 'swipeleft', onSwipeLeft);

View file

@ -103,7 +103,7 @@ import template from './mediaLibraryCreator.template.html';
function onAddButtonClick() {
const page = dom.parentWithClass(this, 'dlg-librarycreator');
import('../directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
enableNetworkSharePath: true,

View file

@ -164,7 +164,7 @@ import template from './mediaLibraryEditor.template.html';
}
function showDirectoryBrowser(context, originalPath, networkPath) {
import('../directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
enableNetworkSharePath: true,

View file

@ -177,13 +177,13 @@ import * as userSettings from '../../scripts/settings/userSettings';
if (options.year !== false && item.ProductionYear && item.Type === 'Series') {
if (item.Status === 'Continuing') {
miscInfo.push(globalize.translate('SeriesYearToPresent', datetime.toLocaleString(item.ProductionYear, {useGrouping: false})));
miscInfo.push(globalize.translate('SeriesYearToPresent', datetime.toLocaleString(item.ProductionYear, { useGrouping: false })));
} else if (item.ProductionYear) {
text = datetime.toLocaleString(item.ProductionYear, {useGrouping: false});
text = datetime.toLocaleString(item.ProductionYear, { useGrouping: false });
if (item.EndDate) {
try {
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), {useGrouping: false});
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false });
if (endYear !== item.ProductionYear) {
text += `-${endYear}`;
@ -253,7 +253,7 @@ import * as userSettings from '../../scripts/settings/userSettings';
miscInfo.push(item.ProductionYear);
} else if (item.PremiereDate) {
try {
text = datetime.toLocaleString(datetime.parseISO8601Date(item.PremiereDate).getFullYear(), {useGrouping: false});
text = datetime.toLocaleString(datetime.parseISO8601Date(item.PremiereDate).getFullYear(), { useGrouping: false });
miscInfo.push(text);
} catch (e) {
console.error('error parsing date:', item.PremiereDate);

View file

@ -211,7 +211,7 @@ import template from './metadataEditor.template.html';
}
function addElementToList(source, sortCallback) {
import('../prompt/prompt').then(({default: prompt}) => {
import('../prompt/prompt').then(({ default: prompt }) => {
prompt({
label: 'Value:'
}).then(function (text) {
@ -229,7 +229,7 @@ import template from './metadataEditor.template.html';
}
function editPerson(context, person, index) {
import('./personEditor').then(({default: personEditor}) => {
import('./personEditor').then(({ default: personEditor }) => {
personEditor.show(person).then(function (updatedPerson) {
const isNew = index === -1;
@ -253,7 +253,7 @@ import template from './metadataEditor.template.html';
}
function showMoreMenu(context, button, user) {
import('../itemContextMenu').then(({default: itemContextMenu}) => {
import('../itemContextMenu').then(({ default: itemContextMenu }) => {
const item = currentItem;
itemContextMenu.show({
@ -588,12 +588,12 @@ import template from './metadataEditor.template.html';
hideElement('#collapsibleSpecialEpisodeInfo', context);
}
if (item.Type === 'Person' ||
item.Type === 'Genre' ||
item.Type === 'Studio' ||
item.Type === 'MusicGenre' ||
item.Type === 'TvChannel' ||
item.Type === 'Book') {
if (item.Type === 'Person'
|| item.Type === 'Genre'
|| item.Type === 'Studio'
|| item.Type === 'MusicGenre'
|| item.Type === 'TvChannel'
|| item.Type === 'Book') {
hideElement('#peopleCollapsible', context);
} else {
showElement('#peopleCollapsible', context);

View file

@ -267,7 +267,7 @@ import datetime from '../../scripts/datetime';
}
break;
case 'addtocollection':
import('../collectionEditor/collectionEditor').then(({default: CollectionEditor}) => {
import('../collectionEditor/collectionEditor').then(({ default: CollectionEditor }) => {
const collectionEditor = new CollectionEditor();
collectionEditor.show({
items: items,
@ -308,7 +308,7 @@ import datetime from '../../scripts/datetime';
dispatchNeedsRefresh();
break;
case 'refresh':
import('../refreshdialog/refreshdialog').then(({default: refreshDialog}) => {
import('../refreshdialog/refreshdialog').then(({ default: refreshDialog }) => {
new refreshDialog({
itemIds: items,
serverId: serverId

View file

@ -69,7 +69,7 @@ import shell from '../../scripts/shell';
const list = [];
imageSizes.forEach((size) => {
const url = getImageUrl(item, {height: size});
const url = getImageUrl(item, { height: size });
if (url !== null) {
list.push(url);
}

View file

@ -141,7 +141,7 @@ function onManageRecordingClick() {
}
const self = this;
import('./recordingeditor').then(({default: recordingEditor}) => {
import('./recordingeditor').then(({ default: recordingEditor }) => {
recordingEditor.show(self.TimerId, options.serverId, {
enableCancel: false
}).then(function () {
@ -159,7 +159,7 @@ function onManageSeriesRecordingClick() {
const self = this;
import('./seriesrecordingeditor').then(({default: seriesRecordingEditor}) => {
import('./seriesrecordingeditor').then(({ default: seriesRecordingEditor }) => {
seriesRecordingEditor.show(self.SeriesTimerId, options.serverId, {
enableCancel: false

View file

@ -389,13 +389,13 @@ import layoutManager from './layoutManager';
if (xScroller !== yScroller) {
if (xScroller) {
scrollToHelper(xScroller, {left: scrollX, behavior: scrollBehavior});
scrollToHelper(xScroller, { left: scrollX, behavior: scrollBehavior });
}
if (yScroller) {
scrollToHelper(yScroller, {top: scrollY, behavior: scrollBehavior});
scrollToHelper(yScroller, { top: scrollY, behavior: scrollBehavior });
}
} else if (xScroller) {
scrollToHelper(xScroller, {left: scrollX, top: scrollY, behavior: scrollBehavior});
scrollToHelper(xScroller, { left: scrollX, top: scrollY, behavior: scrollBehavior });
}
}
@ -597,7 +597,7 @@ import layoutManager from './layoutManager';
setTimeout(function() {
scrollToElement(e.target, useSmoothScroll());
}, 0);
}, {capture: true});
}, { capture: true });
}
/* eslint-enable indent */

View file

@ -85,8 +85,8 @@ const SearchFields: FunctionComponent<SearchFieldsProps> = ({ onSearch = () => {
dangerouslySetInnerHTML={createInputElement()}
/>
</div>
{layoutManager.tv && !browser.tv &&
<AlphaPicker onAlphaPicked={onAlphaPicked} />
{layoutManager.tv && !browser.tv
&& <AlphaPicker onAlphaPicked={onAlphaPicked} />
}
</div>
);

View file

@ -71,7 +71,7 @@ import toast from './toast/toast';
}
function showProgramDialog(item) {
import('./recordingcreator/recordingcreator').then(({default:recordingCreator}) => {
import('./recordingcreator/recordingcreator').then(({ default:recordingCreator }) => {
recordingCreator.show(item.Id, item.ServerId);
});
}
@ -272,7 +272,7 @@ import toast from './toast/toast';
}
function addToPlaylist(item) {
import('./playlisteditor/playlisteditor').then(({default: playlistEditor}) => {
import('./playlisteditor/playlisteditor').then(({ default: playlistEditor }) => {
new playlistEditor().show({
items: [item.Id],
serverId: item.ServerId
@ -297,16 +297,16 @@ import toast from './toast/toast';
if (item.Type === 'Timer') {
if (item.ProgramId) {
import('./recordingcreator/recordingcreator').then(({default: recordingCreator}) => {
import('./recordingcreator/recordingcreator').then(({ default: recordingCreator }) => {
recordingCreator.show(item.ProgramId, currentServerId).then(resolve, reject);
});
} else {
import('./recordingcreator/recordingeditor').then(({default: recordingEditor}) => {
import('./recordingcreator/recordingeditor').then(({ default: recordingEditor }) => {
recordingEditor.show(item.Id, currentServerId).then(resolve, reject);
});
}
} else {
import('./metadataEditor/metadataEditor').then(({default: metadataEditor}) => {
import('./metadataEditor/metadataEditor').then(({ default: metadataEditor }) => {
metadataEditor.show(item.Id, currentServerId).then(resolve, reject);
});
}

View file

@ -342,7 +342,7 @@ function showDownloadOptions(button, context, subtitleId) {
}
function centerFocus(elem, horiz, on) {
import('../../scripts/scrollHelper').then(({default: scrollHelper}) => {
import('../../scripts/scrollHelper').then(({ default: scrollHelper }) => {
const fn = on ? 'on' : 'off';
scrollHelper.centerFocus[fn](elem, horiz);
});
@ -353,7 +353,7 @@ function onOpenUploadMenu(e) {
const selectLanguage = dialog.querySelector('#selectLanguage');
const apiClient = ServerConnections.getApiClient(currentItem.ServerId);
import('../subtitleuploader/subtitleuploader').then(({default: subtitleUploader}) => {
import('../subtitleuploader/subtitleuploader').then(({ default: subtitleUploader }) => {
subtitleUploader.show({
languages: {
list: selectLanguage.innerHTML,

View file

@ -94,9 +94,9 @@ function init(instance) {
subtitleSyncSlider.getBubbleHtml = function (value) {
const newOffset = getOffsetFromPercentage(value);
return '<h1 class="sliderBubbleText">' +
(newOffset > 0 ? '+' : '') + parseFloat(newOffset) + 's' +
'</h1>';
return '<h1 class="sliderBubbleText">'
+ (newOffset > 0 ? '+' : '') + parseFloat(newOffset) + 's'
+ '</h1>';
};
subtitleSyncCloseButton.addEventListener('click', function () {

View file

@ -48,7 +48,7 @@ function refreshTunerDevices(page, providerInfo, devices) {
function onSelectPathClick(e) {
const page = $(e.target).parents('.xmltvForm')[0];
import('../directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
includeFiles: true,

View file

@ -97,7 +97,7 @@ function dispatchViewEvent(view, eventInfo, eventName, isCancellable) {
return eventResult;
}
function getViewEventDetail(view, {state, url, options = {}}, isRestored) {
function getViewEventDetail(view, { state, url, options = {} }, isRestored) {
const index = url.indexOf('?');
// eslint-disable-next-line compat/compat
const searchParams = new URLSearchParams(url.substring(index + 1));