mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
commit
13a70d3186
12 changed files with 61 additions and 31 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
view.querySelector('.activeRecordingsSection').classList.remove('hide');
|
||||
|
|
|
@ -140,7 +140,8 @@ 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');
|
||||
hideAll(page, 'btnCancelTimer');
|
||||
return;
|
||||
}
|
||||
|
||||
hideAll(page, 'btnCancelTimer', true);
|
||||
|
@ -148,7 +149,8 @@ function renderTimerEditor(page, item, apiClient, user) {
|
|||
|
||||
function renderSeriesTimerEditor(page, item, apiClient, user) {
|
||||
if (item.Type !== 'SeriesTimer') {
|
||||
return void hideAll(page, 'btnCancelSeriesTimer');
|
||||
hideAll(page, 'btnCancelSeriesTimer');
|
||||
return;
|
||||
}
|
||||
|
||||
if (user.Policy.EnableLiveTvManagement) {
|
||||
|
@ -160,11 +162,13 @@ function renderSeriesTimerEditor(page, item, apiClient, user) {
|
|||
|
||||
page.querySelector('.seriesTimerScheduleSection').classList.remove('hide');
|
||||
hideAll(page, 'btnCancelSeriesTimer', true);
|
||||
return void renderSeriesTimerSchedule(page, apiClient, item.Id);
|
||||
renderSeriesTimerSchedule(page, apiClient, item.Id);
|
||||
return;
|
||||
}
|
||||
|
||||
page.querySelector('.seriesTimerScheduleSection').classList.add('hide');
|
||||
return void hideAll(page, 'btnCancelSeriesTimer');
|
||||
hideAll(page, 'btnCancelSeriesTimer');
|
||||
return;
|
||||
}
|
||||
|
||||
function renderTrackSelections(page, instance, item, forceReload) {
|
||||
|
@ -808,7 +812,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;
|
||||
}
|
||||
|
||||
ServerConnections.getApiClient(item.ServerId).getNextUpEpisodes({
|
||||
|
@ -1115,7 +1120,8 @@ function renderMoreFromSeason(view, item, apiClient) {
|
|||
|
||||
if (section) {
|
||||
if (item.Type !== 'Episode' || !item.SeasonId || !item.SeriesId) {
|
||||
return void section.classList.add('hide');
|
||||
section.classList.add('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
const userId = apiClient.getCurrentUserId();
|
||||
|
@ -1125,7 +1131,8 @@ 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');
|
||||
section.classList.add('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
section.classList.remove('hide');
|
||||
|
@ -1160,10 +1167,12 @@ function renderMoreFromArtist(view, item, apiClient) {
|
|||
if (section) {
|
||||
if (item.Type === 'MusicArtist') {
|
||||
if (!apiClient.isMinServerVersion('3.4.1.19')) {
|
||||
return void section.classList.add('hide');
|
||||
section.classList.add('hide');
|
||||
return;
|
||||
}
|
||||
} else if (item.Type !== 'MusicAlbum' || !item.AlbumArtists || !item.AlbumArtists.length) {
|
||||
return void section.classList.add('hide');
|
||||
section.classList.add('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
const query = {
|
||||
|
@ -1182,7 +1191,8 @@ function renderMoreFromArtist(view, item, apiClient) {
|
|||
|
||||
apiClient.getItems(apiClient.getCurrentUserId(), query).then(function (result) {
|
||||
if (!result.Items.length) {
|
||||
return void section.classList.add('hide');
|
||||
section.classList.add('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
section.classList.remove('hide');
|
||||
|
@ -1216,7 +1226,8 @@ 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');
|
||||
similarCollapsible.classList.add('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
similarCollapsible.classList.remove('hide');
|
||||
|
@ -1233,7 +1244,8 @@ function renderSimilarItems(page, item, context) {
|
|||
|
||||
apiClient.getSimilarItems(item.Id, options).then(function (result) {
|
||||
if (!result.Items.length) {
|
||||
return void similarCollapsible.classList.add('hide');
|
||||
similarCollapsible.classList.add('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
similarCollapsible.classList.remove('hide');
|
||||
|
@ -1820,7 +1832,8 @@ function renderCast(page, item) {
|
|||
});
|
||||
|
||||
if (!people.length) {
|
||||
return void page.querySelector('#castCollapsible').classList.add('hide');
|
||||
page.querySelector('#castCollapsible').classList.add('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
page.querySelector('#castCollapsible').classList.remove('hide');
|
||||
|
@ -1915,11 +1928,12 @@ 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) {
|
||||
apiClient.getLiveTvChannel(item.ChannelId, apiClient.getCurrentUserId()).then(function (channel) {
|
||||
playbackManager.play({
|
||||
items: [channel]
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
playItem(item, item.UserData && mode === 'resume' ? item.UserData.PlaybackPositionTicks : 0);
|
||||
|
|
|
@ -721,7 +721,7 @@ class ItemsView {
|
|||
return globalize.translate('Videos');
|
||||
}
|
||||
|
||||
return void 0;
|
||||
return;
|
||||
}
|
||||
|
||||
function play() {
|
||||
|
|
|
@ -55,14 +55,16 @@ import LibraryMenu from '../../../scripts/libraryMenu';
|
|||
recordingButtonManager = null;
|
||||
}
|
||||
|
||||
return void view.querySelector('.btnRecord').classList.add('hide');
|
||||
view.querySelector('.btnRecord').classList.add('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
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);
|
||||
recordingButtonManager.refreshItem(item);
|
||||
return;
|
||||
}
|
||||
|
||||
recordingButtonManager = new RecordingButton({
|
||||
|
@ -1450,7 +1452,8 @@ import LibraryMenu from '../../../scripts/libraryMenu';
|
|||
/* 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();
|
||||
showOsd();
|
||||
return;
|
||||
}
|
||||
|
||||
const pointerType = e.pointerType || (layoutManager.mobile ? 'touch' : 'mouse');
|
||||
|
|
|
@ -5,17 +5,19 @@ import Dashboard from '../../../utils/dashboard';
|
|||
|
||||
function processForgotPasswordResult(result) {
|
||||
if (result.Action == 'ContactAdmin') {
|
||||
return void Dashboard.alert({
|
||||
Dashboard.alert({
|
||||
message: globalize.translate('MessageContactAdminToResetPassword'),
|
||||
title: globalize.translate('ButtonForgotPassword')
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (result.Action == 'InNetworkRequired') {
|
||||
return void Dashboard.alert({
|
||||
Dashboard.alert({
|
||||
message: globalize.translate('MessageForgotPasswordInNetworkRequired'),
|
||||
title: globalize.translate('ButtonForgotPassword')
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (result.Action == 'PinCode') {
|
||||
|
@ -26,13 +28,14 @@ import Dashboard from '../../../utils/dashboard';
|
|||
msg += '<br/>';
|
||||
msg += result.PinFile;
|
||||
msg += '<br/>';
|
||||
return void Dashboard.alert({
|
||||
Dashboard.alert({
|
||||
message: msg,
|
||||
title: globalize.translate('ButtonForgotPassword'),
|
||||
callback: function () {
|
||||
Dashboard.navigate('forgotpasswordpin.html');
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,14 @@ import Dashboard from '../../../utils/dashboard';
|
|||
msg += '<br/>';
|
||||
msg += '<br/>';
|
||||
msg += result.UsersReset.join('<br/>');
|
||||
return void Dashboard.alert({
|
||||
Dashboard.alert({
|
||||
message: msg,
|
||||
title: globalize.translate('HeaderPasswordReset'),
|
||||
callback: function () {
|
||||
window.location.href = 'index.html';
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Dashboard.alert({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue