1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

enable unified routing

This commit is contained in:
Luke Pulverenti 2016-03-16 01:33:31 -04:00
parent 2360213901
commit 154f6b5fd8
133 changed files with 6988 additions and 7112 deletions

View file

@ -116,7 +116,7 @@
headerUserButton.src = src;
} else if (icon) {
headerUserButton.classList.remove('headerUserButtonRound');
header.icon = icon;
headerUserButton.icon = icon;
} else {
headerUserButton.classList.remove('headerUserButtonRound');
}
@ -319,7 +319,7 @@
var html = '';
var homeHref = window.ApiClient ? 'index.html' : 'selectserver.html?showuser=1';
var homeHref = window.ApiClient ? 'home.html' : 'selectserver.html?showuser=1';
html += '<div style="margin-top:5px;"></div>';
@ -829,11 +829,11 @@
updateTabLinks(page);
});
pageClassOn('pageshow', 'page', function () {
pageClassOn('pageshow', 'page', function (e) {
var page = this;
if (!NavHelper.isBack()) {
if (!e.detail.isRestored) {
// Scroll back up so in case vertical scroll was messed with
window.scrollTo(0, 0);
}
@ -976,27 +976,4 @@
setDrawerClass();
});
(function () {
var isCurrentNavBack = false;
window.addEventListener("navigate", function (e) {
var data = e.detail.state || {};
var direction = data.direction;
isCurrentNavBack = direction == 'back';
});
function isBack() {
return isCurrentNavBack;
}
window.NavHelper = {
isBack: isBack
};
})();
});