mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
modify necessary void replacements
This commit is contained in:
parent
87f47d8001
commit
408f2b2bda
@ -51,7 +51,7 @@ import template from './accessSchedule.template.html';
|
||||
};
|
||||
|
||||
if (parseFloat(updatedSchedule.StartHour) >= parseFloat(updatedSchedule.EndHour)) {
|
||||
return void alert(globalize.translate('ErrorStartHourGreaterThanEnd'));
|
||||
return alert(globalize.translate('ErrorStartHourGreaterThanEnd'));
|
||||
}
|
||||
|
||||
context.submitted = true;
|
||||
|
@ -23,7 +23,7 @@ import ServerConnections from './ServerConnections';
|
||||
if (!actionableParent || actionableParent.classList.contains('cardContent')) {
|
||||
apiClient.getJSON(apiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) {
|
||||
if (items.length === 1) {
|
||||
return void appRouter.showItem(items[0]);
|
||||
return appRouter.showItem(items[0]);
|
||||
}
|
||||
|
||||
const url = 'details?id=' + itemId + '&serverId=' + serverId;
|
||||
|
@ -323,7 +323,7 @@ import template from './libraryoptionseditor.template.html';
|
||||
function onImageFetchersContainerClick(e) {
|
||||
const btnImageOptionsForType = dom.parentWithClass(e.target, 'btnImageOptionsForType');
|
||||
if (btnImageOptionsForType) {
|
||||
return void showImageOptionsForType(dom.parentWithClass(btnImageOptionsForType, 'imageFetcher').getAttribute('data-type'));
|
||||
return showImageOptionsForType(dom.parentWithClass(btnImageOptionsForType, 'imageFetcher').getAttribute('data-type'));
|
||||
}
|
||||
onSortableContainerClick.call(this, e);
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ export default function (page, providerId, options) {
|
||||
const selectedListingsId = $('#selectListing', page).val();
|
||||
|
||||
if (!selectedListingsId) {
|
||||
return void Dashboard.alert({
|
||||
return Dashboard.alert({
|
||||
message: globalize.translate('ErrorPleaseSelectLineup')
|
||||
});
|
||||
}
|
||||
@ -168,7 +168,7 @@ export default function (page, providerId, options) {
|
||||
|
||||
function refreshListings(value) {
|
||||
if (!value) {
|
||||
return void $('#selectListing', page).html('');
|
||||
return $('#selectListing', page).html('');
|
||||
}
|
||||
|
||||
loading.show();
|
||||
|
@ -175,7 +175,8 @@ import confirm from '../../components/confirm/confirm';
|
||||
|
||||
if (!result.Items.length) {
|
||||
view.querySelector('.activeRecordingsSection').classList.add('hide');
|
||||
return void(itemsContainer.innerHTML = '');
|
||||
itemsContainer.innerHTML = '';
|
||||
return undefined;
|
||||
}
|
||||
|
||||
view.querySelector('.activeRecordingsSection').classList.remove('hide');
|
||||
|
@ -140,7 +140,7 @@ function renderSeriesTimerSchedule(page, apiClient, seriesTimerId) {
|
||||
|
||||
function renderTimerEditor(page, item, apiClient, user) {
|
||||
if (item.Type !== 'Recording' || !user.Policy.EnableLiveTvManagement || !item.TimerId || item.Status !== 'InProgress') {
|
||||
return void hideAll(page, 'btnCancelTimer');
|
||||
return hideAll(page, 'btnCancelTimer');
|
||||
}
|
||||
|
||||
hideAll(page, 'btnCancelTimer', true);
|
||||
@ -148,7 +148,7 @@ function renderTimerEditor(page, item, apiClient, user) {
|
||||
|
||||
function renderSeriesTimerEditor(page, item, apiClient, user) {
|
||||
if (item.Type !== 'SeriesTimer') {
|
||||
return void hideAll(page, 'btnCancelSeriesTimer');
|
||||
return hideAll(page, 'btnCancelSeriesTimer');
|
||||
}
|
||||
|
||||
if (user.Policy.EnableLiveTvManagement) {
|
||||
@ -160,11 +160,11 @@ function renderSeriesTimerEditor(page, item, apiClient, user) {
|
||||
|
||||
page.querySelector('.seriesTimerScheduleSection').classList.remove('hide');
|
||||
hideAll(page, 'btnCancelSeriesTimer', true);
|
||||
return void renderSeriesTimerSchedule(page, apiClient, item.Id);
|
||||
return renderSeriesTimerSchedule(page, apiClient, item.Id);
|
||||
}
|
||||
|
||||
page.querySelector('.seriesTimerScheduleSection').classList.add('hide');
|
||||
return void hideAll(page, 'btnCancelSeriesTimer');
|
||||
return hideAll(page, 'btnCancelSeriesTimer');
|
||||
}
|
||||
|
||||
function renderTrackSelections(page, instance, item, forceReload) {
|
||||
@ -806,7 +806,8 @@ function renderNextUp(page, item, user) {
|
||||
const section = page.querySelector('.nextUpSection');
|
||||
|
||||
if (item.Type != 'Series') {
|
||||
return void section.classList.add('hide');
|
||||
section.classList.add('hide');
|
||||
return undefined;
|
||||
}
|
||||
|
||||
ServerConnections.getApiClient(item.ServerId).getNextUpEpisodes({
|
||||
@ -1113,7 +1114,7 @@ function renderMoreFromSeason(view, item, apiClient) {
|
||||
|
||||
if (section) {
|
||||
if (item.Type !== 'Episode' || !item.SeasonId || !item.SeriesId) {
|
||||
return void section.classList.add('hide');
|
||||
return section.classList.add('hide');
|
||||
}
|
||||
|
||||
const userId = apiClient.getCurrentUserId();
|
||||
@ -1123,7 +1124,7 @@ function renderMoreFromSeason(view, item, apiClient) {
|
||||
Fields: 'ItemCounts,PrimaryImageAspectRatio,BasicSyncInfo,CanDelete,MediaSourceCount'
|
||||
}).then(function (result) {
|
||||
if (result.Items.length < 2) {
|
||||
return void section.classList.add('hide');
|
||||
return section.classList.add('hide');
|
||||
}
|
||||
|
||||
section.classList.remove('hide');
|
||||
@ -1158,10 +1159,10 @@ function renderMoreFromArtist(view, item, apiClient) {
|
||||
if (section) {
|
||||
if (item.Type === 'MusicArtist') {
|
||||
if (!apiClient.isMinServerVersion('3.4.1.19')) {
|
||||
return void section.classList.add('hide');
|
||||
return section.classList.add('hide');
|
||||
}
|
||||
} else if (item.Type !== 'MusicAlbum' || !item.AlbumArtists || !item.AlbumArtists.length) {
|
||||
return void section.classList.add('hide');
|
||||
return section.classList.add('hide');
|
||||
}
|
||||
|
||||
const query = {
|
||||
@ -1180,7 +1181,7 @@ function renderMoreFromArtist(view, item, apiClient) {
|
||||
|
||||
apiClient.getItems(apiClient.getCurrentUserId(), query).then(function (result) {
|
||||
if (!result.Items.length) {
|
||||
return void section.classList.add('hide');
|
||||
return section.classList.add('hide');
|
||||
}
|
||||
|
||||
section.classList.remove('hide');
|
||||
@ -1214,7 +1215,7 @@ function renderSimilarItems(page, item, context) {
|
||||
|
||||
if (similarCollapsible) {
|
||||
if (item.Type != 'Movie' && item.Type != 'Trailer' && item.Type != 'Series' && item.Type != 'Program' && item.Type != 'Recording' && item.Type != 'MusicAlbum' && item.Type != 'MusicArtist' && item.Type != 'Playlist') {
|
||||
return void similarCollapsible.classList.add('hide');
|
||||
return similarCollapsible.classList.add('hide');
|
||||
}
|
||||
|
||||
similarCollapsible.classList.remove('hide');
|
||||
@ -1231,7 +1232,7 @@ function renderSimilarItems(page, item, context) {
|
||||
|
||||
apiClient.getSimilarItems(item.Id, options).then(function (result) {
|
||||
if (!result.Items.length) {
|
||||
return void similarCollapsible.classList.add('hide');
|
||||
return similarCollapsible.classList.add('hide');
|
||||
}
|
||||
|
||||
similarCollapsible.classList.remove('hide');
|
||||
@ -1818,7 +1819,8 @@ function renderCast(page, item) {
|
||||
});
|
||||
|
||||
if (!people.length) {
|
||||
return void page.querySelector('#castCollapsible').classList.add('hide');
|
||||
page.querySelector('#castCollapsible').classList.add('hide');
|
||||
return undefined;
|
||||
}
|
||||
|
||||
page.querySelector('#castCollapsible').classList.remove('hide');
|
||||
@ -1913,7 +1915,7 @@ export default function (view, params) {
|
||||
|
||||
if (item.Type === 'Program') {
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
return void apiClient.getLiveTvChannel(item.ChannelId, apiClient.getCurrentUserId()).then(function (channel) {
|
||||
return apiClient.getLiveTvChannel(item.ChannelId, apiClient.getCurrentUserId()).then(function (channel) {
|
||||
playbackManager.play({
|
||||
items: [channel]
|
||||
});
|
||||
|
@ -721,7 +721,7 @@ class ItemsView {
|
||||
return globalize.translate('Videos');
|
||||
}
|
||||
|
||||
return void 0;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function play() {
|
||||
|
@ -54,14 +54,14 @@ import { appRouter } from '../../../components/appRouter';
|
||||
recordingButtonManager = null;
|
||||
}
|
||||
|
||||
return void view.querySelector('.btnRecord').classList.add('hide');
|
||||
return view.querySelector('.btnRecord').classList.add('hide');
|
||||
}
|
||||
|
||||
ServerConnections.getApiClient(item.ServerId).getCurrentUser().then(function (user) {
|
||||
if (user.Policy.EnableLiveTvManagement) {
|
||||
import('../../../components/recordingcreator/recordingbutton').then(({default: RecordingButton}) => {
|
||||
if (recordingButtonManager) {
|
||||
return void recordingButtonManager.refreshItem(item);
|
||||
return recordingButtonManager.refreshItem(item);
|
||||
}
|
||||
|
||||
recordingButtonManager = new RecordingButton({
|
||||
@ -1449,7 +1449,7 @@ import { appRouter } from '../../../components/appRouter';
|
||||
/* eslint-disable-next-line compat/compat */
|
||||
dom.addEventListener(view, window.PointerEvent ? 'pointerdown' : 'click', function (e) {
|
||||
if (dom.parentWithClass(e.target, ['videoOsdBottom', 'upNextContainer'])) {
|
||||
return void showOsd();
|
||||
return showOsd();
|
||||
}
|
||||
|
||||
const pointerType = e.pointerType || (layoutManager.mobile ? 'touch' : 'mouse');
|
||||
|
@ -5,14 +5,14 @@ import Dashboard from '../../../scripts/clientUtils';
|
||||
|
||||
function processForgotPasswordResult(result) {
|
||||
if (result.Action == 'ContactAdmin') {
|
||||
return void Dashboard.alert({
|
||||
return Dashboard.alert({
|
||||
message: globalize.translate('MessageContactAdminToResetPassword'),
|
||||
title: globalize.translate('ButtonForgotPassword')
|
||||
});
|
||||
}
|
||||
|
||||
if (result.Action == 'InNetworkRequired') {
|
||||
return void Dashboard.alert({
|
||||
return Dashboard.alert({
|
||||
message: globalize.translate('MessageForgotPasswordInNetworkRequired'),
|
||||
title: globalize.translate('ButtonForgotPassword')
|
||||
});
|
||||
@ -26,7 +26,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
||||
msg += '<br/>';
|
||||
msg += result.PinFile;
|
||||
msg += '<br/>';
|
||||
return void Dashboard.alert({
|
||||
return Dashboard.alert({
|
||||
message: msg,
|
||||
title: globalize.translate('ButtonForgotPassword'),
|
||||
callback: function () {
|
||||
|
@ -9,7 +9,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
||||
msg += '<br/>';
|
||||
msg += '<br/>';
|
||||
msg += result.UsersReset.join('<br/>');
|
||||
return void Dashboard.alert({
|
||||
return Dashboard.alert({
|
||||
message: msg,
|
||||
title: globalize.translate('HeaderPasswordReset'),
|
||||
callback: function () {
|
||||
|
@ -645,7 +645,7 @@ import Headroom from 'headroom.js';
|
||||
if (!user) {
|
||||
showBySelector('.libraryMenuDownloads', false);
|
||||
showBySelector('.lnkSyncToOtherDevices', false);
|
||||
return void showBySelector('.userMenuOptions', false);
|
||||
return showBySelector('.userMenuOptions', false);
|
||||
}
|
||||
|
||||
if (user.Policy.EnableContentDownloading) {
|
||||
@ -957,7 +957,7 @@ import Headroom from 'headroom.js';
|
||||
|
||||
function setTitle (title) {
|
||||
if (title == null) {
|
||||
return void LibraryMenu.setDefaultTitle();
|
||||
return LibraryMenu.setDefaultTitle();
|
||||
}
|
||||
|
||||
if (title === '-') {
|
||||
|
Loading…
Reference in New Issue
Block a user