mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
move page.js to node
This commit is contained in:
parent
7e369da67b
commit
9d1f61f414
6 changed files with 18 additions and 1084 deletions
|
@ -370,7 +370,7 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
|
|||
}
|
||||
|
||||
function enableNativeHistory() {
|
||||
return page.enableNativeHistory();
|
||||
return enableHistory;
|
||||
}
|
||||
|
||||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue