mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix search dipping into restricted channels
This commit is contained in:
parent
0005654885
commit
de50f5892d
11 changed files with 24 additions and 304 deletions
|
@ -1,123 +0,0 @@
|
|||
define(['jQuery'], function ($) {
|
||||
|
||||
function showSignIn(page) {
|
||||
|
||||
$('.kidsOptionsLogin', page).fadeIn();
|
||||
|
||||
$('#txtPinCode', page).val('');
|
||||
$('.btnOptions', page).hide();
|
||||
$('.kidContent', page).hide();
|
||||
}
|
||||
|
||||
function validatePin(page) {
|
||||
|
||||
}
|
||||
|
||||
function loadContent(page) {
|
||||
|
||||
var options = {
|
||||
|
||||
SortBy: "Random",
|
||||
SortOrder: "Descending",
|
||||
MediaTypes: "Video",
|
||||
Limit: 100,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
ExcludeLocationTypes: "Virtual",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Thumb"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).then(function (result) {
|
||||
|
||||
$('.itemsContainer', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
|
||||
items: result.Items,
|
||||
shape: "horizontalBackdrop",
|
||||
preferThumb: true,
|
||||
overlayText: true,
|
||||
lazy: true,
|
||||
defaultAction: 'play',
|
||||
coverImage: true,
|
||||
enableImageEnhancers: false
|
||||
|
||||
})).lazyChildren();
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function onPinSubmit() {
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
if (validatePin(page)) {
|
||||
|
||||
$('.kidsOptionsLogin', page).hide();
|
||||
$('.kidsOptions', page).fadeIn();
|
||||
|
||||
} else {
|
||||
Dashboard.alert({
|
||||
message: 'Invalid pin code entered. Please try again.',
|
||||
title: 'Input Error'
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onOptionsSubmit() {
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
$('.kidsOptions', page).fadeOut();
|
||||
$('.btnOptions', page).show();
|
||||
$('.kidContent', page).show();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#kidsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
$('.kidContent', page).hide();
|
||||
|
||||
$('.kidsWelcome', page).show();
|
||||
$('.lnkPinCode', page).attr('href', 'myprofile.html?userId=' + userId);
|
||||
$('.btnOptions', page).buttonEnabled(false);
|
||||
$('.kidsOptionsLogin', page).hide();
|
||||
$('.kidsOptions', page).hide();
|
||||
|
||||
$('.kidsBackdropContainer').css('background-image', 'url(css/images/kids/bg.jpg)');
|
||||
|
||||
}).on('pageinit', "#kidsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.btnDismissWelcome', page).on('click', function () {
|
||||
|
||||
$('.kidsWelcome', page).fadeOut();
|
||||
$('.btnOptions', page).buttonEnabled(true);
|
||||
$('.kidContent', page).show();
|
||||
loadContent(page);
|
||||
|
||||
});
|
||||
|
||||
$('.btnOptions', page).on('click', function () {
|
||||
|
||||
showSignIn(page);
|
||||
});
|
||||
|
||||
$('.btnCancelPin', page).on('click', function () {
|
||||
|
||||
$('.kidsOptionsLogin', page).fadeOut();
|
||||
$('.btnOptions', page).show();
|
||||
$('.kidContent', page).show();
|
||||
});
|
||||
|
||||
$('.kidPinForm').off('submit', onPinSubmit).on('submit', onPinSubmit);
|
||||
$('.kidsOptionsForm').off('submit', onOptionsSubmit).on('submit', onOptionsSubmit);
|
||||
});
|
||||
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
define(['appStorage'], function (appStorage) {
|
||||
define(['appStorage', 'shell'], function (appStorage, shell) {
|
||||
|
||||
var supporterPlaybackKey = 'lastSupporterPlaybackMessage4';
|
||||
|
||||
|
@ -190,7 +190,6 @@
|
|||
}
|
||||
|
||||
window.RegistrationServices = {
|
||||
|
||||
renderPluginInfo: function (page, pkg, pluginSecurityInfo) {
|
||||
|
||||
require(['jQuery'], function ($) {
|
||||
|
@ -213,8 +212,7 @@
|
|||
if (expDateTime <= nowTime) {
|
||||
regStatus += "<p style='color:red;'>";
|
||||
regStatus += Globalize.translate('MessageTrialExpired');
|
||||
}
|
||||
else if (expDateTime > new Date(1970, 1, 1).getTime()) {
|
||||
} else if (expDateTime > new Date(1970, 1, 1).getTime()) {
|
||||
|
||||
regStatus += "<p style='color:blue;'>";
|
||||
regStatus += Globalize.translate('MessageTrialWillExpireIn').replace('{0}', Math.round(expDateTime - nowTime) / (86400000));
|
||||
|
@ -294,6 +292,10 @@
|
|||
resolve();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
showPremiereInfo: function () {
|
||||
shell.openUrl('https://emby.media/premiere');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -3149,10 +3149,6 @@ var AppInfo = {};
|
|||
}
|
||||
}
|
||||
|
||||
if (browserInfo.msie) {
|
||||
deps.push('devices/ie/ie');
|
||||
}
|
||||
|
||||
deps.push('scripts/librarylist');
|
||||
deps.push('scripts/librarymenu');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue