mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-12-12 08:15:42 +00:00
Merge pull request #871 from grafixeyehero/page.js
Move page.js to node
This commit is contained in:
commit
ee69bb6807
@ -35,6 +35,7 @@
|
||||
"libjass": "^0.11.0",
|
||||
"material-design-icons-iconfont": "^5.0.1",
|
||||
"native-promise-only": "^0.8.0-a",
|
||||
"page": "^1.11.5",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"shaka-player": "^2.5.9",
|
||||
"sortablejs": "^1.10.2",
|
||||
|
@ -101,3 +101,9 @@ var jellyfin_noto = require("jellyfin-noto");
|
||||
_define("jellyfin-noto", function () {
|
||||
return jellyfin_noto;
|
||||
});
|
||||
|
||||
// page.js
|
||||
var page = require("page");
|
||||
_define("page", function() {
|
||||
return page;
|
||||
});
|
||||
|
@ -370,7 +370,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
||||
}
|
||||
|
||||
function enableNativeHistory() {
|
||||
return page.enableNativeHistory();
|
||||
return false;
|
||||
}
|
||||
|
||||
function authenticate(ctx, route, callback) {
|
||||
@ -562,7 +562,10 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
||||
if (!document.querySelector('.dialogContainer') && startPages.indexOf(curr.type) !== -1) {
|
||||
return false;
|
||||
}
|
||||
return page.canGoBack();
|
||||
if (enableHistory()) {
|
||||
return history.length > 1;
|
||||
}
|
||||
return (page.len || 0) > 0;
|
||||
}
|
||||
|
||||
function showDirect(path) {
|
||||
@ -666,7 +669,8 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
||||
|
||||
function pushState(state, title, url) {
|
||||
state.navigate = false;
|
||||
page.pushState(state, title, url);
|
||||
history.pushState(state, title, url);
|
||||
|
||||
}
|
||||
|
||||
function setBaseRoute() {
|
||||
@ -716,7 +720,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
||||
appRouter.getRoutes = getRoutes;
|
||||
appRouter.pushState = pushState;
|
||||
appRouter.enableNativeHistory = enableNativeHistory;
|
||||
appRouter.handleAnchorClick = page.handleAnchorClick;
|
||||
appRouter.handleAnchorClick = page.clickHandler;
|
||||
appRouter.TransparencyLevel = {
|
||||
None: 0,
|
||||
Backdrop: 1,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -737,7 +737,8 @@ var AppInfo = {};
|
||||
"libjass",
|
||||
"webcomponents",
|
||||
"material-icons",
|
||||
"jellyfin-noto"
|
||||
"jellyfin-noto",
|
||||
"page"
|
||||
]
|
||||
},
|
||||
urlArgs: urlArgs,
|
||||
@ -791,7 +792,6 @@ var AppInfo = {};
|
||||
|
||||
// TODO remove these libraries
|
||||
// all of these have been modified so we need to fix that first
|
||||
define("page", [bowerPath + "/pagejs/page"], returnFirstDependency);
|
||||
define("headroom", [componentsPath + "/headroom/headroom"], returnFirstDependency);
|
||||
define("scroller", [componentsPath + "/scroller"], returnFirstDependency);
|
||||
define("navdrawer", [componentsPath + "/navdrawer/navdrawer"], returnFirstDependency);
|
||||
|
Loading…
Reference in New Issue
Block a user