mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update xbox one profile
This commit is contained in:
parent
f515eab01b
commit
b28e9b73bb
24 changed files with 624 additions and 532 deletions
|
@ -9,7 +9,7 @@
|
|||
<div class="libraryViewNav scopedLibraryViewNav movieTabs">
|
||||
<a href="moviesrecommended.html">${TabSuggestions}</a>
|
||||
<a href="movies.html">${TabMovies}</a>
|
||||
<a href="movietrailers.html">${TabTrailers}</a>
|
||||
<a href="movietrailers.html" class="movieTrailersTab">${TabTrailers}</a>
|
||||
<a href="#" class="ui-btn-active">${TabCollections}</a>
|
||||
<a href="moviegenres.html">${TabGenres}</a>
|
||||
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
|
||||
|
|
|
@ -238,11 +238,6 @@
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
.cardImage canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.coveredCardImage {
|
||||
background-size: cover;
|
||||
}
|
||||
|
|
|
@ -114,14 +114,6 @@
|
|||
background-image: url("images/icons/subtitles.png");
|
||||
}
|
||||
|
||||
.ui-icon-wireless:after {
|
||||
background-image: url("images/icons/wireless.png");
|
||||
}
|
||||
/* Fallback */
|
||||
.ui-nosvg .ui-icon-wireless:after {
|
||||
background-image: url("images/icons/wireless.png");
|
||||
}
|
||||
|
||||
.ui-icon-expand:after {
|
||||
background-image: url("data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%20Tiny%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11-tiny.dtd%22%3E%3Csvg%20version%3D%221.1%22%20baseProfile%3D%22tiny%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2216px%22%20height%3D%2216px%22%20viewBox%3D%220%200%20500%20500%22%20xml%3Aspace%3D%22preserve%22%3E%20%3Cpath%20d%3D%22M210.659%20294.643q0%203.627-2.79%206.417l-92.634%2092.634%2040.179%2040.179q5.301%205.301%205.301%2012.556t-5.301%2012.556-12.556%205.301h-125q-7.254%200-12.556-5.301t-5.301-12.556v-125q0-7.254%205.301-12.556t12.556-5.301%2012.556%205.301l40.179%2040.179%2092.634-92.634q2.79-2.79%206.417-2.79t6.417%202.79l31.808%2031.808q2.79%202.79%202.79%206.417zM428.571%2053.571v125q0%207.254-5.301%2012.556t-12.556%205.301-12.556-5.301l-40.179-40.179-92.634%2092.634q-2.79%202.79-6.417%202.79t-6.417-2.79l-31.808-31.808q-2.79-2.79-2.79-6.417t2.79-6.417l92.634-92.634-40.179-40.179q-5.301-5.301-5.301-12.556t5.301-12.556%2012.556-5.301h125q7.254%200%2012.556%205.301t5.301%2012.556z%22%20fill%3D%22%23ffffff%22%20%2F%3E%3C%2Fsvg%3E");
|
||||
background-repeat: no-repeat;
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 345 B |
|
@ -1443,14 +1443,14 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
}
|
||||
|
||||
.userProfileSettingsForm .detailSectionContent {
|
||||
padding: 0 1em;
|
||||
padding: 0 .5em;
|
||||
}
|
||||
|
||||
@media all and (max-width: 700px) {
|
||||
|
||||
.userProfileSettingsForm .detailSection {
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
margin-left: .5em;
|
||||
margin-right: .5em;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1505,3 +1505,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
.homeLatestTabDisabled .homeLatestTab {
|
||||
display: none !important;
|
||||
}
|
||||
.movieTrailersTabDisabled .movieTrailersTab {
|
||||
display: none !important;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
.libraryPage {
|
||||
padding-top: 49px !important;
|
||||
padding-top: 50px !important;
|
||||
}
|
||||
|
||||
.libraryPage:not(.metadataEditorPage):not(.noSecondaryNavPage) {
|
||||
padding-top: 99px !important;
|
||||
padding-top: 98px !important;
|
||||
}
|
||||
|
||||
.libraryMenuDivider {
|
||||
|
@ -118,9 +118,7 @@
|
|||
left: 0;
|
||||
z-index: 999;
|
||||
top: 0;
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.libraryViewNav {
|
||||
|
@ -133,6 +131,7 @@
|
|||
z-index: 999;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
padding: 0 0 0;
|
||||
overflow-x: scroll;
|
||||
|
@ -141,6 +140,13 @@
|
|||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.bottomLibraryViewNav {
|
||||
top: initial;
|
||||
bottom: 0;
|
||||
border-top: 1px solid #444;
|
||||
height: 51px;
|
||||
}
|
||||
|
||||
.viewMenuBar {
|
||||
background-color: #111;
|
||||
}
|
||||
|
@ -232,6 +238,10 @@
|
|||
border-bottom: 5px solid transparent;
|
||||
}
|
||||
|
||||
.bottomLibraryViewNav a {
|
||||
padding: 12px 0 12px;
|
||||
}
|
||||
|
||||
.libraryViewNav a:not(.ui-btn-active):hover {
|
||||
color: #2ad !important;
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ h1 a:hover {
|
|||
transform: translateY(0%);
|
||||
}
|
||||
|
||||
.headroom--unpinned {
|
||||
.headroom--unpinned:not(.headroomDisabled) {
|
||||
-webkit-transform: translateY(-100%);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
|
@ -613,9 +613,9 @@ h1 .imageLink {
|
|||
/* Footer */
|
||||
#footer {
|
||||
position: fixed;
|
||||
bottom: -2px;
|
||||
left: -2px;
|
||||
right: -2px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* Above everything, except for the video player and popup overlays */
|
||||
z-index: 1097;
|
||||
color: #fff;
|
||||
|
@ -623,6 +623,10 @@ h1 .imageLink {
|
|||
background-color: rgba(26,26,26,.9);
|
||||
}
|
||||
|
||||
.footerOverBottomTabs {
|
||||
bottom: 50px;
|
||||
}
|
||||
|
||||
.footerNotification {
|
||||
padding: .75em 1em;
|
||||
margin: 0;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="moviesrecommended.html">${TabSuggestions}</a>
|
||||
<a href="movies.html">${TabMovies}</a>
|
||||
<a href="movietrailers.html">${TabTrailers}</a>
|
||||
<a href="movietrailers.html" class="movieTrailersTab">${TabTrailers}</a>
|
||||
<a href="collections.html?context=movies">${TabCollections}</a>
|
||||
<a href="moviegenres.html" class="ui-btn-active">${TabGenres}</a>
|
||||
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="moviesrecommended.html">${TabSuggestions}</a>
|
||||
<a href="movies.html">${TabMovies}</a>
|
||||
<a href="movietrailers.html">${TabTrailers}</a>
|
||||
<a href="movietrailers.html" class="movieTrailersTab">${TabTrailers}</a>
|
||||
<a href="collections.html?context=movies">${TabCollections}</a>
|
||||
<a href="moviegenres.html">${TabGenres}</a>
|
||||
<a href="moviepeople.html" class="ui-btn-active moviePeopleTab">${TabPeople}</a>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="moviesrecommended.html">${TabSuggestions}</a>
|
||||
<a href="movies.html">${TabMovies}</a>
|
||||
<a href="movietrailers.html">${TabTrailers}</a>
|
||||
<a href="movietrailers.html" class="movieTrailersTab">${TabTrailers}</a>
|
||||
<a href="collections.html?context=movies">${TabCollections}</a>
|
||||
<a href="moviegenres.html">${TabGenres}</a>
|
||||
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="moviesrecommended.html">${TabSuggestions}</a>
|
||||
<a href="movies.html" class="lnkMovies">${TabMovies}</a>
|
||||
<a href="movietrailers.html" class="lnkMovieTrailers">${TabTrailers}</a>
|
||||
<a href="movietrailers.html" class="lnkMovieTrailers movieTrailersTab">${TabTrailers}</a>
|
||||
<a href="collections.html?context=movies" class="lnkCollections">${TabCollections}</a>
|
||||
<a href="moviegenres.html">${TabGenres}</a>
|
||||
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="moviesrecommended.html">${TabSuggestions}</a>
|
||||
<a href="movies.html">${TabMovies}</a>
|
||||
<a href="movietrailers.html">${TabTrailers}</a>
|
||||
<a href="movietrailers.html" class="movieTrailersTab">${TabTrailers}</a>
|
||||
<a href="collections.html?context=movies">${TabCollections}</a>
|
||||
<a href="#" class="ui-btn-active">${TabGenres}</a>
|
||||
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="moviesrecommended.html">${TabSuggestions}</a>
|
||||
<a href="movies.html">${TabMovies}</a>
|
||||
<a href="movietrailers.html">${TabTrailers}</a>
|
||||
<a href="movietrailers.html" class="movieTrailersTab">${TabTrailers}</a>
|
||||
<a href="collections.html?context=movies">${TabCollections}</a>
|
||||
<a href="moviegenres.html">${TabGenres}</a>
|
||||
<a href="#" class="ui-btn-active">${TabPeople}</a>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="moviesrecommended.html">${TabSuggestions}</a>
|
||||
<a href="#" class="ui-btn-active">${TabMovies}</a>
|
||||
<a href="movietrailers.html">${TabTrailers}</a>
|
||||
<a href="movietrailers.html" class="movieTrailersTab">${TabTrailers}</a>
|
||||
<a href="collections.html?context=movies">${TabCollections}</a>
|
||||
<a href="moviegenres.html">${TabGenres}</a>
|
||||
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="#" class="ui-btn-active">${TabSuggestions}</a>
|
||||
<a href="movies.html">${TabMovies}</a>
|
||||
<a href="movietrailers.html">${TabTrailers}</a>
|
||||
<a href="movietrailers.html" class="movieTrailersTab">${TabTrailers}</a>
|
||||
<a href="collections.html?context=movies">${TabCollections}</a>
|
||||
<a href="moviegenres.html">${TabGenres}</a>
|
||||
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div class="libraryViewNav scopedLibraryViewNav">
|
||||
<a href="moviesrecommended.html">${TabSuggestions}</a>
|
||||
<a href="movies.html">${TabMovies}</a>
|
||||
<a href="movietrailers.html">${TabTrailers}</a>
|
||||
<a href="movietrailers.html" class="movieTrailersTab">${TabTrailers}</a>
|
||||
<a href="collections.html?context=movies">${TabCollections}</a>
|
||||
<a href="moviegenres.html">${TabGenres}</a>
|
||||
<a href="moviepeople.html" class="moviePeopleTab">${TabPeople}</a>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<a href="#" class="lnkWebClientPreferences">${TabAppSettings}</a>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
<br />
|
||||
<form class="displayPreferencesForm userProfileSettingsForm" style="margin: 0 auto;">
|
||||
|
||||
|
@ -137,10 +138,10 @@
|
|||
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<button type="submit" data-theme="a" data-icon="check" data-mini="true">
|
||||
<button type="submit" data-theme="a" data-icon="check">
|
||||
${ButtonOk}
|
||||
</button>
|
||||
<button type="button" onclick="history.back();" data-icon="delete" data-mini="true">
|
||||
<button type="button" onclick="history.back();" data-icon="delete">
|
||||
${ButtonCancel}
|
||||
</button>
|
||||
</li>
|
||||
|
@ -150,5 +151,6 @@
|
|||
$('.displayPreferencesForm').off('submit', DisplayPreferencesPage.onSubmit).on('submit', DisplayPreferencesPage.onSubmit);
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<a href="#" class="lnkMyProfile">${TabProfile}</a>
|
||||
<a href="#" class="lnkWebClientPreferences">${TabAppSettings}</a>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
|
||||
<br />
|
||||
<form style="margin: 0 auto;" class="languagePreferencesForm userProfileSettingsForm">
|
||||
|
@ -72,10 +73,10 @@
|
|||
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<button type="submit" data-theme="a" data-icon="check" data-mini="true">
|
||||
<button type="submit" data-theme="a" data-icon="check">
|
||||
${ButtonOk}
|
||||
</button>
|
||||
<button type="button" onclick="history.back();" data-icon="delete" data-mini="true">
|
||||
<button type="button" onclick="history.back();" data-icon="delete">
|
||||
${ButtonCancel}
|
||||
</button>
|
||||
</li>
|
||||
|
@ -85,5 +86,6 @@
|
|||
$('.languagePreferencesForm').off('submit', LanguagePreferencesPage.onSubmit).on('submit', LanguagePreferencesPage.onSubmit);
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -13,10 +13,11 @@
|
|||
<a href="#" class="ui-btn-active lnkWebClientPreferences">${TabAppSettings}</a>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
<br />
|
||||
<form class="webClientPreferencesForm userProfileSettingsForm" style="margin: 0 auto;">
|
||||
|
||||
<div class="detailSection">
|
||||
<div class="detailSection homePageConfigurationSection" style="display:none;">
|
||||
<div class="detailSectionHeader">
|
||||
${HeaderHomePage}
|
||||
</div>
|
||||
|
@ -186,15 +187,16 @@
|
|||
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<button type="submit" data-theme="a" data-icon="check" data-mini="true">
|
||||
<button type="submit" data-theme="a" data-icon="check">
|
||||
${ButtonOk}
|
||||
</button>
|
||||
<button type="button" onclick="history.back();" data-icon="delete" data-mini="true">
|
||||
<button type="button" onclick="history.back();" data-icon="delete">
|
||||
${ButtonCancel}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('.webClientPreferencesForm').off('submit', WebClientPreferencesPage.onSubmit).on('submit', WebClientPreferencesPage.onSubmit);
|
||||
</script>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<a href="#" class="lnkWebClientPreferences">${TabAppSettings}</a>
|
||||
</div>
|
||||
|
||||
<div data-role="content">
|
||||
<br />
|
||||
<div class="readOnlyContent" style="margin: 0 auto; padding: 0 1em;">
|
||||
<div id="fldImage" style="display:inline-block;"></div>
|
||||
|
@ -122,7 +123,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('.newImageForm').off('submit', MyProfilePage.onImageSubmit).on('submit', MyProfilePage.onImageSubmit);
|
||||
$('.updatePasswordForm').off('submit', UpdatePasswordPage.onSubmit).on('submit', UpdatePasswordPage.onSubmit);
|
||||
|
|
|
@ -123,9 +123,13 @@
|
|||
|
||||
function loadRecentlyAdded(elem, user, context) {
|
||||
|
||||
var limit = AppInfo.hasLowImageBandwidth ?
|
||||
16 :
|
||||
24;
|
||||
|
||||
var options = {
|
||||
|
||||
Limit: 24,
|
||||
Limit: limit,
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
|
|
|
@ -71,6 +71,8 @@
|
|||
|
||||
html += '</div>';
|
||||
|
||||
html = normalizeLinksHtml(html);
|
||||
|
||||
$(document.body).prepend(html);
|
||||
$('.viewMenuBar').trigger('create');
|
||||
|
||||
|
@ -78,6 +80,18 @@
|
|||
bindMenuEvents();
|
||||
}
|
||||
|
||||
function replaceAll(str, find, replace) {
|
||||
return str.replace(new RegExp(find, 'g'), replace);
|
||||
}
|
||||
|
||||
function normalizeLinksHtml(html) {
|
||||
|
||||
if (AppInfo.resetOnLibraryChange) {
|
||||
html = replaceAll(html, '<a ', '<a data-ajax="false"');
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
function bindMenuEvents() {
|
||||
|
||||
if (AppInfo.isTouchPreferred) {
|
||||
|
@ -99,6 +113,15 @@
|
|||
initHeadRoom(viewMenuBar);
|
||||
}
|
||||
|
||||
function updateViewMenuBarHeadroom(page, viewMenuBar) {
|
||||
|
||||
if ($(page).hasClass('libraryPage')) {
|
||||
viewMenuBar.removeClass('headroomDisabled');
|
||||
} else {
|
||||
viewMenuBar.addClass('headroomDisabled');
|
||||
}
|
||||
}
|
||||
|
||||
function getItemHref(item, context) {
|
||||
|
||||
return LibraryBrowser.getHref(item, context);
|
||||
|
@ -114,7 +137,7 @@
|
|||
html += '<div class="libraryMenuDivider"></div>';
|
||||
html += '<div class="adminMenuOptions">';
|
||||
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="dashboard" href="dashboard.html"><span class="fa fa-cog sidebarLinkIcon"></span>' + Globalize.translate('ButtonDashboard') + '</a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="dashboard" data-rel="none" href="dashboard.html"><span class="fa fa-cog sidebarLinkIcon"></span>' + Globalize.translate('ButtonDashboard') + '</a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder editorViewMenu" data-itemid="editor" href="edititemmetadata.html"><span class="fa fa-edit sidebarLinkIcon"></span>' + Globalize.translate('ButtonMetadataManager') + '</a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="reports" href="reports.html"><span class="fa fa-bar-chart sidebarLinkIcon"></span>' + Globalize.translate('ButtonReports') + '</a>';
|
||||
html += '</div>';
|
||||
|
@ -218,6 +241,8 @@
|
|||
|
||||
}).join('');
|
||||
|
||||
html = normalizeLinksHtml(html);
|
||||
|
||||
var elem = $('.libraryMenuOptions').html(html);
|
||||
|
||||
$('.sidebarLink', elem).on('click', function () {
|
||||
|
@ -308,6 +333,7 @@
|
|||
}
|
||||
|
||||
html += getViewsHtml();
|
||||
html = normalizeLinksHtml(html);
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
@ -492,11 +518,13 @@
|
|||
}).on('pagebeforeshow', ".page:not(.standalonePage)", function () {
|
||||
|
||||
var page = this;
|
||||
var viewMenuBar = $('.viewMenuBar');
|
||||
if (!$('.viewMenuBar').length) {
|
||||
|
||||
ConnectionManager.user().done(function (user) {
|
||||
|
||||
renderHeader(user);
|
||||
updateViewMenuBarHeadroom(page, $('.viewMenuBar'));
|
||||
|
||||
updateCastIcon();
|
||||
|
||||
|
@ -506,6 +534,7 @@
|
|||
} else {
|
||||
updateContextText(page);
|
||||
updateLibraryNavLinks(page);
|
||||
updateViewMenuBarHeadroom(page, viewMenuBar);
|
||||
}
|
||||
|
||||
var jpage = $(page);
|
||||
|
@ -519,14 +548,20 @@
|
|||
$(document.body).removeClass('dashboardDocument').removeClass('libraryDocument');
|
||||
}
|
||||
|
||||
}).on('pagebeforeshow', ".page", function () {
|
||||
}).on('pagebeforeshow', ".libraryPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
if ($(page).hasClass('standalonePage')) {
|
||||
$('.viewMenuBar').hide();
|
||||
if (AppInfo.enableBottomTabs) {
|
||||
$('.libraryViewNav', page).addClass('bottomLibraryViewNav');
|
||||
$(page).addClass('noSecondaryNavPage');
|
||||
} else {
|
||||
$('.viewMenuBar').show();
|
||||
|
||||
$('.libraryViewNav', page).each(function () {
|
||||
|
||||
initHeadRoom(this);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}).on('pageshow', ".libraryPage", function () {
|
||||
|
@ -541,12 +576,6 @@
|
|||
// Scroll back up so in case vertical scroll was messed with
|
||||
$(document).scrollTop(0);
|
||||
}
|
||||
|
||||
$('.libraryViewNav', page).each(function () {
|
||||
|
||||
initHeadRoom(this);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
function initHeadRoom(elem) {
|
||||
|
|
|
@ -100,6 +100,12 @@
|
|||
});
|
||||
|
||||
$('.fldEnableBackdrops', page).show();
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
$('.homePageConfigurationSection', page).hide();
|
||||
} else {
|
||||
$('.homePageConfigurationSection', page).show();
|
||||
}
|
||||
});
|
||||
|
||||
window.WebClientPreferencesPage = {
|
||||
|
|
|
@ -108,9 +108,7 @@ var Dashboard = {
|
|||
|
||||
if (!Dashboard.getUserPromise) {
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
Dashboard.getUserPromise = ConnectionManager.currentApiClient().getUser(userId).fail(Dashboard.logout);
|
||||
Dashboard.getUserPromise = ConnectionManager.currentApiClient().getCurrentUser().fail(Dashboard.logout);
|
||||
}
|
||||
|
||||
return Dashboard.getUserPromise;
|
||||
|
@ -368,7 +366,7 @@ var Dashboard = {
|
|||
|
||||
showFooterNotification: function (options) {
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
if (!AppInfo.enableFooterNotifications) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -376,7 +374,7 @@ var Dashboard = {
|
|||
|
||||
options.id = options.id || "notification" + new Date().getTime() + parseInt(Math.random());
|
||||
|
||||
var footer = $("#footer").css("top", "initial").show();
|
||||
var footer = $(".footer").css("top", "initial").show();
|
||||
|
||||
var parentElem = $('#footerNotifications', footer);
|
||||
|
||||
|
@ -572,10 +570,14 @@ var Dashboard = {
|
|||
refreshSystemInfoFromServer: function () {
|
||||
|
||||
if (Dashboard.getAccessToken()) {
|
||||
if (AppInfo.enableFooterNotifications) {
|
||||
ApiClient.getSystemInfo().done(function (info) {
|
||||
|
||||
Dashboard.updateSystemInfo(info);
|
||||
});
|
||||
} else {
|
||||
Dashboard.ensureWebSocket();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -702,7 +704,6 @@ var Dashboard = {
|
|||
|
||||
resetPluginSecurityInfo: function () {
|
||||
Dashboard.getPluginSecurityInfoPromise = null;
|
||||
Dashboard.validateCurrentUser();
|
||||
},
|
||||
|
||||
ensureHeader: function (page) {
|
||||
|
@ -922,7 +923,10 @@ var Dashboard = {
|
|||
}
|
||||
|
||||
ApiClient.openWebSocket();
|
||||
|
||||
if (!Dashboard.isConnectMode()) {
|
||||
ApiClient.reportCapabilities(Dashboard.capabilities());
|
||||
}
|
||||
},
|
||||
|
||||
processGeneralCommand: function (cmd) {
|
||||
|
@ -1480,6 +1484,11 @@ var AppInfo = {};
|
|||
if ($.browser.mobile) {
|
||||
AppInfo.hasLowImageBandwidth = true;
|
||||
}
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
AppInfo.enableBottomTabs = true;
|
||||
AppInfo.resetOnLibraryChange = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
@ -1496,6 +1505,11 @@ var AppInfo = {};
|
|||
AppInfo.enableMusicSongsTab = true;
|
||||
AppInfo.enableMusicArtistsTab = true;
|
||||
AppInfo.enableHomeLatestTab = true;
|
||||
AppInfo.enableMovieTrailersTab = true;
|
||||
}
|
||||
|
||||
if (!Dashboard.isRunningInCordova()) {
|
||||
AppInfo.enableFooterNotifications = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1557,9 +1571,11 @@ var AppInfo = {};
|
|||
if (window.ApiClient) {
|
||||
ApiClient.getDefaultImageQuality = Dashboard.getDefaultImageQuality;
|
||||
|
||||
if (!Dashboard.isRunningInCordova()) {
|
||||
Dashboard.importCss(ApiClient.getUrl('Branding/Css'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onReady() {
|
||||
|
||||
|
@ -1597,6 +1613,10 @@ var AppInfo = {};
|
|||
$(document.body).addClass('homeLatestTabDisabled');
|
||||
}
|
||||
|
||||
if (!AppInfo.enableMovieTrailersTab) {
|
||||
$(document.body).addClass('movieTrailersTabDisabled');
|
||||
}
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
$(document).addClass('nativeApp');
|
||||
}
|
||||
|
@ -1674,14 +1694,14 @@ var AppInfo = {};
|
|||
var mediaPlayerElem = $('#mediaPlayer', document.body);
|
||||
mediaPlayerElem.trigger('create');
|
||||
|
||||
var footerHtml = '<div id="footer" data-theme="b" class="ui-bar-b">';
|
||||
var footerHtml = '<div id="footer" class="footer" data-theme="b" class="ui-bar-b">';
|
||||
|
||||
footerHtml += '<div id="footerNotifications"></div>';
|
||||
footerHtml += '</div>';
|
||||
|
||||
$(document.body).append(footerHtml);
|
||||
|
||||
var footerElem = $('#footer', document.body);
|
||||
var footerElem = $('.footer', document.body);
|
||||
footerElem.trigger('create');
|
||||
|
||||
$(window).on("beforeunload", function () {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
function loadNextUp(page, context) {
|
||||
|
||||
var limit = AppInfo.hasLowImageBandwidth ?
|
||||
18 :
|
||||
16 :
|
||||
24;
|
||||
|
||||
var query = {
|
||||
|
@ -69,13 +69,17 @@
|
|||
|
||||
var parentId = LibraryMenu.getTopParentId();
|
||||
|
||||
var limit = AppInfo.hasLowImageBandwidth ?
|
||||
4 :
|
||||
6;
|
||||
|
||||
var options = {
|
||||
|
||||
SortBy: "DatePlayed",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Filters: "IsResumable",
|
||||
Limit: 6,
|
||||
Limit: limit,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData,SyncInfo",
|
||||
ExcludeLocationTypes: "Virtual",
|
||||
|
|
40
dashboard-ui/thirdparty/apiclient/apiclient.js
vendored
40
dashboard-ui/thirdparty/apiclient/apiclient.js
vendored
|
@ -54,23 +54,24 @@
|
|||
return serverInfo;
|
||||
};
|
||||
|
||||
var currentUser;
|
||||
var currentUserPromise;
|
||||
/**
|
||||
* Gets or sets the current user id.
|
||||
*/
|
||||
self.getCurrentUser = function () {
|
||||
|
||||
if (currentUser != null) {
|
||||
var promise = currentUserPromise;
|
||||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
deferred.resolveWith(null, [currentUser]);
|
||||
return deferred.promise();
|
||||
if (promise == null) {
|
||||
|
||||
promise = self.getUser(self.getCurrentUserId()).fail(function () {
|
||||
currentUserPromise = null;
|
||||
});
|
||||
|
||||
currentUserPromise = promise;
|
||||
}
|
||||
|
||||
return self.getUser(self.getCurrentUserId()).done(function (user) {
|
||||
|
||||
currentUser = user;
|
||||
});
|
||||
return promise;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -88,7 +89,7 @@
|
|||
self.setCurrentUserId = function (userId, token) {
|
||||
|
||||
currentUserId = userId;
|
||||
currentUser = null;
|
||||
currentUserPromise = null;
|
||||
accessToken = token;
|
||||
};
|
||||
|
||||
|
@ -376,7 +377,7 @@
|
|||
webSocket.onmessage = function (msg) {
|
||||
|
||||
msg = JSON.parse(msg.data);
|
||||
Events.trigger(self, 'websocketmessage', [msg]);
|
||||
onWebSocketMessage(msg);
|
||||
};
|
||||
|
||||
webSocket.onopen = function () {
|
||||
|
@ -404,6 +405,23 @@
|
|||
}
|
||||
};
|
||||
|
||||
function onWebSocketMessage(msg) {
|
||||
|
||||
if (msg.MessageType === "UserDeleted") {
|
||||
currentUserPromise = null;
|
||||
}
|
||||
else if (msg.MessageType === "UserUpdated" || msg.MessageType === "UserConfigurationUpdated") {
|
||||
|
||||
var user = msg.Data;
|
||||
if (user.Id == self.getCurrentUserId()) {
|
||||
|
||||
currentUserPromise = null;
|
||||
}
|
||||
}
|
||||
|
||||
Events.trigger(self, 'websocketmessage', [msg]);
|
||||
}
|
||||
|
||||
self.sendWebSocketMessage = function (name, data) {
|
||||
|
||||
logger.log('Sending web socket message: ' + name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue