mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update translations
This commit is contained in:
parent
764a5ac824
commit
c2e474e8e9
105 changed files with 13294 additions and 12883 deletions
|
@ -1,10 +1,5 @@
|
|||
(function ($, document) {
|
||||
|
||||
function getView() {
|
||||
|
||||
return 'Thumb';
|
||||
}
|
||||
|
||||
function reload(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
@ -23,7 +18,6 @@
|
|||
Limit: limit,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
ExcludeLocationTypes: "Virtual",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
};
|
||||
|
@ -35,39 +29,22 @@
|
|||
} else {
|
||||
page.querySelector('.noNextUpItems').classList.remove('hide');
|
||||
}
|
||||
var view = getView();
|
||||
|
||||
var html = '';
|
||||
|
||||
if (view == 'ThumbCard') {
|
||||
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
showTitle: true,
|
||||
preferThumb: true,
|
||||
showParentTitle: true,
|
||||
lazy: true,
|
||||
cardLayout: true,
|
||||
showDetailsMenu: true,
|
||||
context: 'home-nextup'
|
||||
});
|
||||
|
||||
} else if (view == 'Thumb') {
|
||||
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
overlayText: false,
|
||||
lazy: true,
|
||||
preferThumb: true,
|
||||
showDetailsMenu: true,
|
||||
centerText: true,
|
||||
overlayPlayButton: AppInfo.enableAppLayouts,
|
||||
context: 'home-nextup'
|
||||
});
|
||||
}
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
overlayText: false,
|
||||
lazy: true,
|
||||
preferThumb: true,
|
||||
showDetailsMenu: true,
|
||||
centerText: true,
|
||||
overlayPlayButton: AppInfo.enableAppLayouts,
|
||||
context: 'home-nextup'
|
||||
});
|
||||
|
||||
var elem = page.querySelector('#nextUpItems');
|
||||
elem.innerHTML = html;
|
||||
|
|
|
@ -4,6 +4,27 @@
|
|||
|
||||
function getDefaultSection(index) {
|
||||
|
||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
||||
|
||||
switch (index) {
|
||||
|
||||
case 0:
|
||||
return defaultFirstSection;
|
||||
case 1:
|
||||
return 'resume';
|
||||
case 2:
|
||||
return 'nextup';
|
||||
case 3:
|
||||
return 'latestmovies';
|
||||
case 4:
|
||||
return 'latestepisodes';
|
||||
case 5:
|
||||
return 'latesttvrecordings';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
switch (index) {
|
||||
|
||||
case 0:
|
||||
|
@ -37,6 +58,12 @@
|
|||
if (section == 'latestmedia') {
|
||||
return Sections.loadRecentlyAdded(elem, user);
|
||||
}
|
||||
else if (section == 'latestmovies') {
|
||||
return Sections.loadLatestMovies(elem, user);
|
||||
}
|
||||
else if (section == 'latestepisodes') {
|
||||
return Sections.loadLatestEpisodes(elem, user);
|
||||
}
|
||||
else if (section == 'librarytiles') {
|
||||
return Sections.loadLibraryTiles(elem, user, 'backdrop', index, false, showLibraryTileNames);
|
||||
}
|
||||
|
@ -55,7 +82,9 @@
|
|||
else if (section == 'resume') {
|
||||
return Sections.loadResume(elem, userId);
|
||||
}
|
||||
|
||||
else if (section == 'nextup') {
|
||||
return Sections.loadNextUp(elem, userId);
|
||||
}
|
||||
else if (section == 'latesttvrecordings') {
|
||||
return Sections.loadLatestLiveTvRecordings(elem, userId);
|
||||
}
|
||||
|
@ -75,7 +104,7 @@
|
|||
function loadSections(page, user, displayPreferences) {
|
||||
|
||||
var i, length;
|
||||
var sectionCount = 4;
|
||||
var sectionCount = 6;
|
||||
|
||||
var elem = page.querySelector('.sections');
|
||||
|
||||
|
@ -244,6 +273,14 @@
|
|||
Events.on(page.querySelector('.btnTakeTour'), 'click', function () {
|
||||
takeTour(page, Dashboard.getCurrentUserId());
|
||||
});
|
||||
|
||||
if (AppInfo.enableHomeTabs) {
|
||||
page.classList.remove('noSecondaryNavPage');
|
||||
page.querySelector('.libraryViewNav').classList.remove('hide');
|
||||
} else {
|
||||
page.classList.add('noSecondaryNavPage');
|
||||
page.querySelector('.libraryViewNav').classList.add('hide');
|
||||
}
|
||||
});
|
||||
|
||||
pageIdOn('pageshow', "indexPage", function () {
|
||||
|
|
|
@ -2964,112 +2964,6 @@
|
|||
$link.next().removeClass('btnUserItemRatingOn');
|
||||
},
|
||||
|
||||
getDetailImageHtml: function (item, href, preferThumb) {
|
||||
|
||||
var imageTags = item.ImageTags || {};
|
||||
|
||||
if (item.PrimaryImageTag) {
|
||||
imageTags.Primary = item.PrimaryImageTag;
|
||||
}
|
||||
|
||||
var html = '';
|
||||
|
||||
var url;
|
||||
|
||||
var imageHeight = 360;
|
||||
|
||||
if (preferThumb && imageTags.Thumb) {
|
||||
|
||||
url = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Thumb",
|
||||
height: imageHeight,
|
||||
tag: item.ImageTags.Thumb
|
||||
});
|
||||
}
|
||||
else if (imageTags.Primary) {
|
||||
|
||||
url = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Primary",
|
||||
height: imageHeight,
|
||||
tag: item.ImageTags.Primary
|
||||
});
|
||||
}
|
||||
else if (item.BackdropImageTags && item.BackdropImageTags.length) {
|
||||
|
||||
url = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Backdrop",
|
||||
height: imageHeight,
|
||||
tag: item.BackdropImageTags[0]
|
||||
});
|
||||
}
|
||||
else if (imageTags.Thumb) {
|
||||
|
||||
url = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Thumb",
|
||||
height: imageHeight,
|
||||
tag: item.ImageTags.Thumb
|
||||
});
|
||||
}
|
||||
else if (imageTags.Disc) {
|
||||
|
||||
url = ApiClient.getScaledImageUrl(item.Id, {
|
||||
type: "Disc",
|
||||
height: imageHeight,
|
||||
tag: item.ImageTags.Disc
|
||||
});
|
||||
}
|
||||
else if (item.AlbumId && item.AlbumPrimaryImageTag) {
|
||||
|
||||
url = ApiClient.getScaledImageUrl(item.AlbumId, {
|
||||
type: "Primary",
|
||||
height: imageHeight,
|
||||
tag: item.AlbumPrimaryImageTag
|
||||
});
|
||||
|
||||
}
|
||||
else if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicGenre") {
|
||||
url = "css/images/items/detail/audio.png";
|
||||
}
|
||||
else if (item.MediaType == "Game" || item.Type == "GameGenre") {
|
||||
url = "css/images/items/detail/game.png";
|
||||
}
|
||||
else if (item.Type == "Person") {
|
||||
url = "css/images/items/detail/person.png";
|
||||
}
|
||||
else if (item.Type == "Genre" || item.Type == "Studio") {
|
||||
url = "css/images/items/detail/video.png";
|
||||
}
|
||||
else if (item.Type == "TvChannel") {
|
||||
url = "css/images/items/detail/tv.png";
|
||||
}
|
||||
else {
|
||||
url = "css/images/items/detail/video.png";
|
||||
}
|
||||
|
||||
html += '<div style="position:relative;">';
|
||||
|
||||
if (href) {
|
||||
html += "<a class='itemDetailGalleryLink' href='" + href + "'>";
|
||||
}
|
||||
|
||||
html += "<img class='itemDetailImage' src='" + url + "' />";
|
||||
if (href) {
|
||||
html += "</a>";
|
||||
}
|
||||
|
||||
var progressHtml = item.IsFolder ? '' : LibraryBrowser.getItemProgressBarHtml((item.Type == 'Recording' ? item : item.UserData));
|
||||
|
||||
if (progressHtml) {
|
||||
html += '<div class="detailImageProgressContainer">';
|
||||
html += progressHtml;
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
html += "</div>";
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
renderDetailImage: function (elem, item, editable, preferThumb) {
|
||||
|
||||
var imageTags = item.ImageTags || {};
|
||||
|
@ -3180,7 +3074,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
html += "<img class='itemDetailImage' src='" + url + "' />";
|
||||
html += "<img class='itemDetailImage lazy' src='css/images/empty.png' />";
|
||||
|
||||
if (editable) {
|
||||
html += "</a>";
|
||||
|
@ -3212,6 +3106,8 @@
|
|||
elem.classList.add('portraitDetailImageContainer');
|
||||
elem.classList.remove('squareDetailImageContainer');
|
||||
}
|
||||
|
||||
ImageLoader.lazyImage(elem.querySelector('img'), url);
|
||||
},
|
||||
|
||||
refreshDetailImageUserData: function (elem, item) {
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
var header = document.querySelector('.viewMenuBar');
|
||||
|
||||
var headerSearchButton = document.querySelector('.headerSearchButton')
|
||||
var headerSearchButton = document.querySelector('.headerSearchButton');
|
||||
|
||||
if (user.localUser) {
|
||||
$('.btnCast', header).visible(true);
|
||||
|
|
|
@ -308,7 +308,7 @@
|
|||
type: "Primary"
|
||||
});
|
||||
|
||||
html += '<img class="guideChannelImage" src="' + url + '" />';
|
||||
html += '<div class="guideChannelImage lazy" data-src="' + url + '"></div>';
|
||||
}
|
||||
|
||||
html += '</a>';
|
||||
|
@ -317,7 +317,9 @@
|
|||
html += '</div>';
|
||||
}
|
||||
|
||||
page.querySelector('.channelList').innerHTML = html;
|
||||
var channelList = page.querySelector('.channelList');
|
||||
channelList.innerHTML = html;
|
||||
ImageLoader.lazyChildren(channelList);
|
||||
}
|
||||
|
||||
function renderGuide(page, date, channels, programs) {
|
||||
|
|
|
@ -1,4 +1,15 @@
|
|||
$(document).on('pageshow', "#myPreferencesMenuPage", function () {
|
||||
pageIdOn('pageinit', 'myPreferencesMenuPage', function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.btnLogout', page).on('click', function () {
|
||||
|
||||
Dashboard.logout();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
pageIdOn('pageshow', 'myPreferencesMenuPage', function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -16,9 +27,21 @@
|
|||
page.querySelector('.lnkSync').classList.add('hide');
|
||||
}
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
page.querySelector('.headerUser').innerHTML = user.Name;
|
||||
|
||||
if (AppInfo.isNativeApp && $.browser.safari && user.Policy.IsAdministrator) {
|
||||
page.querySelector('.adminSection').classList.remove('hide');
|
||||
} else {
|
||||
page.querySelector('.adminSection').classList.add('hide');
|
||||
}
|
||||
});
|
||||
|
||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
||||
page.querySelector('.lnkServer').classList.remove('hide');
|
||||
page.querySelector('.userSection').classList.remove('hide');
|
||||
} else {
|
||||
page.querySelector('.lnkServer').classList.add('hide');
|
||||
page.querySelector('.userSection').classList.add('hide');
|
||||
}
|
||||
|
||||
});
|
|
@ -172,7 +172,7 @@
|
|||
|
||||
user.Configuration.ExcludeFoldersFromGrouping = null;
|
||||
|
||||
user.Configuration.GroupedFolders = $(".chkGroupFolder", page).get().filter(function(i) {
|
||||
user.Configuration.GroupedFolders = $(".chkGroupFolder", page).get().filter(function (i) {
|
||||
|
||||
return i.checked;
|
||||
|
||||
|
@ -273,6 +273,12 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
if (AppInfo.enableCustomHomeSections) {
|
||||
page.querySelector('.homeSections').classList.remove('hide');
|
||||
} else {
|
||||
page.querySelector('.homeSections').classList.add('hide');
|
||||
}
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
}
|
||||
|
||||
function enableScrollX() {
|
||||
|
||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
||||
}
|
||||
|
||||
|
@ -54,6 +55,10 @@
|
|||
return enableScrollX() ? 'overflowBackdrop' : 'backdrop';
|
||||
}
|
||||
|
||||
function getPortraitShape() {
|
||||
return enableScrollX() ? 'overflowPortrait' : 'portrait';
|
||||
}
|
||||
|
||||
function getLibraryButtonsHtml(items) {
|
||||
|
||||
var html = "";
|
||||
|
@ -175,7 +180,7 @@
|
|||
Limit: limit,
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
EnableImageTypes: "Primary,Backdrop,Thumb"
|
||||
};
|
||||
|
||||
return ApiClient.getJSON(ApiClient.getUrl('Users/' + user.Id + '/Items/Latest', options)).done(function (items) {
|
||||
|
@ -215,6 +220,93 @@
|
|||
});
|
||||
}
|
||||
|
||||
function loadLatestMovies(elem, user) {
|
||||
|
||||
var options = {
|
||||
|
||||
Limit: 12,
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Thumb",
|
||||
IncludeItemTypes: "Movie"
|
||||
};
|
||||
|
||||
return ApiClient.getJSON(ApiClient.getUrl('Users/' + user.Id + '/Items/Latest', options)).done(function (items) {
|
||||
|
||||
var html = '';
|
||||
|
||||
var scrollX = enableScrollX();
|
||||
|
||||
if (items.length) {
|
||||
html += '<h1 class="listHeader">' + Globalize.translate('HeaderLatestMovies') + '</h1>';
|
||||
if (scrollX) {
|
||||
html += '<div class="hiddenScrollX itemsContainer">';
|
||||
} else {
|
||||
html += '<div class="itemsContainer">';
|
||||
}
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: items,
|
||||
shape: getPortraitShape(),
|
||||
showUnplayedIndicator: false,
|
||||
showChildCountIndicator: true,
|
||||
lazy: true,
|
||||
context: 'home',
|
||||
centerText: true
|
||||
});
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
|
||||
$(elem).createCardMenus();
|
||||
});
|
||||
}
|
||||
|
||||
function loadLatestEpisodes(elem, user) {
|
||||
|
||||
var options = {
|
||||
|
||||
Limit: 12,
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Thumb",
|
||||
IncludeItemTypes: "Episode"
|
||||
};
|
||||
|
||||
return ApiClient.getJSON(ApiClient.getUrl('Users/' + user.Id + '/Items/Latest', options)).done(function (items) {
|
||||
|
||||
var html = '';
|
||||
|
||||
var scrollX = enableScrollX();
|
||||
|
||||
if (items.length) {
|
||||
html += '<h1 class="listHeader">' + Globalize.translate('HeaderLatestEpisodes') + '</h1>';
|
||||
if (scrollX) {
|
||||
html += '<div class="hiddenScrollX itemsContainer">';
|
||||
} else {
|
||||
html += '<div class="itemsContainer">';
|
||||
}
|
||||
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: items,
|
||||
preferThumb: true,
|
||||
shape: getThumbShape(),
|
||||
showUnplayedIndicator: false,
|
||||
showChildCountIndicator: true,
|
||||
lazy: true,
|
||||
context: 'home'
|
||||
});
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
|
||||
$(elem).createCardMenus();
|
||||
});
|
||||
}
|
||||
|
||||
function loadLatestChannelMedia(elem, userId) {
|
||||
|
||||
var screenWidth = $(window).width();
|
||||
|
@ -357,6 +449,50 @@
|
|||
});
|
||||
}
|
||||
|
||||
function loadNextUp(elem, userId) {
|
||||
|
||||
var query = {
|
||||
|
||||
Limit: 20,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
|
||||
UserId: userId,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
};
|
||||
|
||||
ApiClient.getNextUpEpisodes(query).done(function (result) {
|
||||
|
||||
var html = '';
|
||||
|
||||
if (result.Items.length) {
|
||||
html += '<h1 class="listHeader">' + Globalize.translate('HeaderNextUp') + '</h1>';
|
||||
if (enableScrollX()) {
|
||||
html += '<div class="hiddenScrollX itemsContainer">';
|
||||
} else {
|
||||
html += '<div class="itemsContainer">';
|
||||
}
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
preferThumb: true,
|
||||
shape: getThumbShape(),
|
||||
overlayText: false,
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
lazy: true,
|
||||
overlayPlayButton: true,
|
||||
context: 'home',
|
||||
centerText: true
|
||||
});
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
elem.innerHTML = html;
|
||||
|
||||
ImageLoader.lazyChildren(elem);
|
||||
$(elem).createCardMenus();
|
||||
});
|
||||
}
|
||||
|
||||
function handleLibraryLinkNavigations(elem) {
|
||||
|
||||
$('a', elem).on('click', function () {
|
||||
|
@ -497,9 +633,12 @@
|
|||
loadLatestChannelMedia: loadLatestChannelMedia,
|
||||
loadLibraryTiles: loadLibraryTiles,
|
||||
loadResume: loadResume,
|
||||
loadNextUp: loadNextUp,
|
||||
loadLatestChannelItems: loadLatestChannelItems,
|
||||
loadLatestLiveTvRecordings: loadLatestLiveTvRecordings,
|
||||
loadlibraryButtons: loadlibraryButtons
|
||||
loadlibraryButtons: loadlibraryButtons,
|
||||
loadLatestMovies: loadLatestMovies,
|
||||
loadLatestEpisodes: loadLatestEpisodes
|
||||
};
|
||||
|
||||
})(jQuery, document);
|
|
@ -1726,6 +1726,8 @@ var AppInfo = {};
|
|||
AppInfo.enableSearchInTopMenu = true;
|
||||
AppInfo.enableHomeFavorites = true;
|
||||
AppInfo.enableNowPlayingBar = true;
|
||||
AppInfo.enableCustomHomeSections = true;
|
||||
AppInfo.enableHomeTabs = true;
|
||||
|
||||
AppInfo.enableAppStorePolicy = isCordova;
|
||||
|
||||
|
@ -1745,6 +1747,8 @@ var AppInfo = {};
|
|||
AppInfo.enableSearchInTopMenu = false;
|
||||
AppInfo.enableHomeFavorites = false;
|
||||
AppInfo.enableNowPlayingBar = false;
|
||||
AppInfo.enableCustomHomeSections = false;
|
||||
AppInfo.enableHomeTabs = false;
|
||||
|
||||
} else {
|
||||
if (isMobile) {
|
||||
|
@ -2299,7 +2303,6 @@ var AppInfo = {};
|
|||
if (AppInfo.isNativeApp && $.browser.safari) {
|
||||
deps.push('cordova/ios/backgroundfetch');
|
||||
deps.push('cordova/ios/tabbar');
|
||||
deps.push('localsync');
|
||||
}
|
||||
if (AppInfo.isNativeApp && $.browser.android) {
|
||||
deps.push('cordova/android/newapp');
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
Limit: limit,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
ExcludeLocationTypes: "Virtual",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue