mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
support head requests for images
This commit is contained in:
parent
91cb173176
commit
a8c7ec96d4
25 changed files with 1206 additions and 14 deletions
|
@ -125,7 +125,7 @@
|
|||
function loadRecentlyAdded(elem, userId) {
|
||||
|
||||
var screenWidth = $(window).width();
|
||||
|
||||
|
||||
var options = {
|
||||
|
||||
Limit: screenWidth >= 2400 ? 24 : (screenWidth >= 1600 ? 20 : (screenWidth >= 1440 ? 12 : (screenWidth >= 800 ? 9 : 8))),
|
||||
|
@ -197,7 +197,7 @@
|
|||
} else {
|
||||
$(elem).removeClass('hiddenSectionOnMobile');
|
||||
}
|
||||
|
||||
|
||||
getUserViews(userId).done(function (items) {
|
||||
|
||||
var html = '';
|
||||
|
@ -525,18 +525,41 @@
|
|||
}
|
||||
}
|
||||
|
||||
var homePageDismissValue = '2';
|
||||
var homePageDismissValue = '4';
|
||||
var homePageTourKey = 'homePageTour';
|
||||
|
||||
function dismissWelcome(page, userId) {
|
||||
|
||||
ApiClient.getDisplayPreferences('home', userId, 'webclient').done(function (result) {
|
||||
|
||||
result.CustomPrefs.homePageWelcomeDismissed = homePageDismissValue;
|
||||
ApiClient.updateDisplayPreferences('home', result, userId, 'webclient').done(function () {
|
||||
result.CustomPrefs[homePageTourKey] = homePageDismissValue;
|
||||
ApiClient.updateDisplayPreferences('home', result, userId, 'webclient');
|
||||
});
|
||||
}
|
||||
|
||||
function takeTour(page, userId) {
|
||||
|
||||
$.swipebox([
|
||||
{ href: 'css/images/tour/web/tourcontent.jpg', title: Globalize.translate('WebClientTourContent') },
|
||||
{ href: 'css/images/tour/web/tourmovies.jpg', title: Globalize.translate('WebClientTourMovies') },
|
||||
{ href: 'css/images/tour/web/tourmouseover.jpg', title: Globalize.translate('WebClientTourMouseOver') },
|
||||
{ href: 'css/images/tour/web/tourtaphold.jpg', title: Globalize.translate('WebClientTourTapHold') },
|
||||
{ href: 'css/images/tour/web/toureditor.png', title: Globalize.translate('WebClientTourMetadataManager') },
|
||||
{ href: 'css/images/tour/web/tourplaylist.png', title: Globalize.translate('WebClientTourPlaylists') },
|
||||
{ href: 'css/images/tour/web/tourcollections.jpg', title: Globalize.translate('WebClientTourCollections') },
|
||||
{ href: 'css/images/tour/web/tourusersettings1.png', title: Globalize.translate('WebClientTourUserPreferences1') },
|
||||
{ href: 'css/images/tour/web/tourusersettings2.png', title: Globalize.translate('WebClientTourUserPreferences2') },
|
||||
{ href: 'css/images/tour/web/tourusersettings3.png', title: Globalize.translate('WebClientTourUserPreferences3') },
|
||||
{ href: 'css/images/tour/web/tourusersettings4.png', title: Globalize.translate('WebClientTourUserPreferences4') },
|
||||
{ href: 'css/images/tour/web/tourmobile1.jpg', title: Globalize.translate('WebClientTourMobile1') },
|
||||
{ href: 'css/images/tour/web/tourmobile2.png', title: Globalize.translate('WebClientTourMobile2') },
|
||||
{ href: 'css/images/tour/enjoy.jpg', title: Globalize.translate('MessageEnjoyYourStay') }
|
||||
], {
|
||||
afterClose: function () {
|
||||
dismissWelcome(page, userId);
|
||||
$('.welcomeMessage', page).hide();
|
||||
|
||||
});
|
||||
},
|
||||
hideBarsDelay: 30000
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -547,7 +570,7 @@
|
|||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
$('.btnDismissWelcome', page).on('click', function () {
|
||||
dismissWelcome(page, userId);
|
||||
takeTour(page, userId);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#indexPage", function () {
|
||||
|
@ -558,7 +581,7 @@
|
|||
|
||||
ApiClient.getDisplayPreferences('home', userId, 'webclient').done(function (result) {
|
||||
|
||||
if (result.CustomPrefs.homePageWelcomeDismissed == homePageDismissValue) {
|
||||
if (result.CustomPrefs[homePageTourKey] == homePageDismissValue) {
|
||||
$('.welcomeMessage', page).hide();
|
||||
} else {
|
||||
$('.welcomeMessage', page).show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue