mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update image magick sharp
This commit is contained in:
parent
88698139ff
commit
35bc1c89ac
12 changed files with 308 additions and 28 deletions
125
dashboard-ui/scripts/kids.js
Normal file
125
dashboard-ui/scripts/kids.js
Normal file
|
@ -0,0 +1,125 @@
|
|||
(function ($, document, window) {
|
||||
|
||||
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).done(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();
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$(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();
|
||||
});
|
||||
});
|
||||
|
||||
window.KidsPage = {
|
||||
|
||||
onPinSubmit: function () {
|
||||
|
||||
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;
|
||||
},
|
||||
|
||||
onOptionsSubmit: function () {
|
||||
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
$('.kidsOptions', page).fadeOut();
|
||||
$('.btnOptions', page).show();
|
||||
$('.kidContent', page).show();
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery, document, window);
|
Loading…
Add table
Add a link
Reference in a new issue