mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add library to front page
This commit is contained in:
parent
dc6dbcf469
commit
655c9cb48f
11 changed files with 102 additions and 28 deletions
|
@ -38,7 +38,7 @@
|
|||
|
||||
.libraryPage > .ui-content {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 100px;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
.libraryPage .currentUsername {
|
||||
|
@ -56,7 +56,7 @@
|
|||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
margin: 0 auto;
|
||||
max-width: 1540px;
|
||||
max-width: 650px;
|
||||
}
|
||||
|
||||
.ehsContent td {
|
||||
|
@ -65,7 +65,51 @@
|
|||
}
|
||||
|
||||
.squareEhsContent {
|
||||
max-width: 750px;
|
||||
}
|
||||
|
||||
@media all and (min-width: 1000px) {
|
||||
|
||||
.ehsContent {
|
||||
max-width: 905px;
|
||||
}
|
||||
|
||||
.squareEhsContent {
|
||||
max-width: 750px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 1200px) {
|
||||
|
||||
.ehsContent {
|
||||
max-width: 925px;
|
||||
}
|
||||
|
||||
.squareEhsContent {
|
||||
max-width: 900px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 1400px) {
|
||||
|
||||
.ehsContent {
|
||||
max-width: 1240px;
|
||||
}
|
||||
|
||||
.squareEhsContent {
|
||||
max-width: 1240px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 1600px) {
|
||||
|
||||
.ehsContent {
|
||||
max-width: 1540px;
|
||||
}
|
||||
|
||||
.squareEhsContent {
|
||||
max-width: 1420px;
|
||||
}
|
||||
}
|
||||
|
||||
.detailPageContent {
|
||||
|
|
|
@ -90,13 +90,13 @@ h2 {
|
|||
font-size: 1.68em;
|
||||
}
|
||||
|
||||
a, a.ui-link {
|
||||
/*a, a.ui-link {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.ui-controlgroup a, a.ui-btn {
|
||||
font-weight: bold;
|
||||
}
|
||||
}*/
|
||||
|
||||
h1 a {
|
||||
text-decoration: none;
|
||||
|
|
|
@ -6,17 +6,16 @@
|
|||
<body>
|
||||
<div id="indexPage" data-role="page" class="page type-home libraryPage allLibraryPage noSecondaryNavPage backdropPage" data-theme="b" data-backdroptype="movie,series,game,book">
|
||||
|
||||
<!-- <div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="#" class="ui-btn-active">${TabHome}</a>
|
||||
<a href="#">${TabMyLibrary}</a>
|
||||
<a href="#">${TabFavorites}</a>
|
||||
</div>-->
|
||||
|
||||
<div data-role="content">
|
||||
|
||||
<table class="ehsContent">
|
||||
<tr>
|
||||
<td>
|
||||
<h1 class="listHeader">${HeaderMyLibrary}</h1>
|
||||
|
||||
<div class="myLibrary">
|
||||
</div>
|
||||
|
||||
<div id="resumableSection" style="display: none;">
|
||||
<h1 class="listHeader">${HeaderResume}</h1>
|
||||
|
||||
|
@ -28,8 +27,6 @@
|
|||
|
||||
<div id="recentlyAddedItems">
|
||||
</div>
|
||||
|
||||
<div class="spotlightContainer"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -32,6 +32,18 @@
|
|||
|
||||
DashboardPage.reloadSystemInfo(page);
|
||||
DashboardPage.reloadNews(page);
|
||||
|
||||
DashboardPage.sessionUpdateTimer = setInterval(DashboardPage.refreshSessionsLocally, 60000);
|
||||
},
|
||||
|
||||
refreshSessionsLocally: function () {
|
||||
|
||||
var list = DashboardPage.sessionsList;
|
||||
|
||||
if (list) {
|
||||
console.log('refreshSessionsLocally');
|
||||
DashboardPage.renderActiveConnections($.mobile.activePage, list);
|
||||
}
|
||||
},
|
||||
|
||||
reloadSystemInfo: function (page) {
|
||||
|
@ -122,6 +134,10 @@
|
|||
|
||||
$(ApiClient).off("websocketmessage", DashboardPage.onWebSocketMessage).off("websocketopen", DashboardPage.onWebSocketConnectionChange).off("websocketerror", DashboardPage.onWebSocketConnectionChange).off("websocketclose", DashboardPage.onWebSocketConnectionChange);
|
||||
DashboardPage.stopInterval();
|
||||
|
||||
if (DashboardPage.sessionUpdateTimer) {
|
||||
clearInterval(DashboardPage.sessionUpdateTimer);
|
||||
}
|
||||
},
|
||||
|
||||
startInterval: function () {
|
||||
|
@ -190,6 +206,8 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
DashboardPage.sessionsList = sessions;
|
||||
|
||||
var parentElement = $('.activeDevices', page);
|
||||
|
||||
$('.activeSession', parentElement).addClass('deadSession');
|
||||
|
|
|
@ -113,6 +113,24 @@
|
|||
|
||||
var options = {
|
||||
|
||||
SortBy: "SortName",
|
||||
Fields: "PrimaryImageAspectRatio"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
$('.myLibrary', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: 'smallBackdrop',
|
||||
showTitle: true,
|
||||
centerText: true
|
||||
|
||||
})).createPosterItemMenus();
|
||||
|
||||
});
|
||||
|
||||
options = {
|
||||
|
||||
SortBy: "DatePlayed",
|
||||
SortOrder: "Descending",
|
||||
MediaTypes: "Video",
|
||||
|
@ -124,7 +142,7 @@
|
|||
ExcludeLocationTypes: "Virtual"
|
||||
};
|
||||
|
||||
var promise1 = ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
if (result.Items.length) {
|
||||
$('#resumableSection', page).show();
|
||||
|
@ -156,7 +174,7 @@
|
|||
ExcludeLocationTypes: "Virtual,Remote"
|
||||
};
|
||||
|
||||
var promise2 = ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
|
||||
|
@ -168,9 +186,6 @@
|
|||
|
||||
})).createPosterItemMenus();
|
||||
});
|
||||
|
||||
//var allPromise = $.when(promise1, promise2);
|
||||
//reloadSpotlight(page, allPromise);
|
||||
});
|
||||
|
||||
})(jQuery, document, ApiClient);
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
clearProgressInterval();
|
||||
|
||||
var intervalTime = ApiClient.isWebSocketOpen() ? 2000 : 20000;
|
||||
var intervalTime = ApiClient.isWebSocketOpen() ? 1200 : 20000;
|
||||
|
||||
currentProgressInterval = setInterval(function () {
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "MusicAlbum",
|
||||
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 8 : 5),
|
||||
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 7 : 5),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
ParentId: parentId
|
||||
|
@ -36,7 +36,7 @@
|
|||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Audio",
|
||||
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 8 : 5),
|
||||
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 7 : 5),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,AudioInfo",
|
||||
ParentId: parentId
|
||||
|
@ -59,7 +59,7 @@
|
|||
SortBy: "DatePlayed",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Audio",
|
||||
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 8 : 5),
|
||||
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 7 : 5),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,AudioInfo",
|
||||
Filters: "IsPlayed",
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
if (chapter.ImageTag) {
|
||||
|
||||
imgUrl = ApiClient.getImageUrl(itemId, {
|
||||
maxwidth: 600,
|
||||
width: 800,
|
||||
tag: chapter.ImageTag,
|
||||
type: "Chapter",
|
||||
index: i
|
||||
|
|
|
@ -197,7 +197,7 @@
|
|||
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
|
||||
ApiClient.sendWebSocketMessage("SessionsStart", "100,900");
|
||||
ApiClient.sendWebSocketMessage("SessionsStart", "100,800");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Filters: "IsResumable",
|
||||
Limit: screenWidth >= 1920 ? 5 : (screenWidth >= 1440 ? 4 : 3),
|
||||
Limit: screenWidth >= 1920 ? 5 : 4,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
|
||||
ExcludeLocationTypes: "Virtual",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitleMediaBrowser}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="tvShowsPage" data-role="page" class="page libraryPage" data-theme="b" data-view="tv">
|
||||
<div id="tvShowsPage" data-role="page" class="page libraryPage backdropPage" data-theme="b" data-view="tv" data-backdroptype="series">
|
||||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="tvrecommended.html">${TabSuggested}</a>
|
||||
<a href="tvlatest.html">${TabLatest}</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue