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

update shared components

This commit is contained in:
Luke Pulverenti 2016-03-15 00:00:17 -04:00
parent 8bada4146e
commit 57d96ea95d
6 changed files with 41 additions and 15 deletions

View file

@ -259,12 +259,12 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
}
}
var server = connectionManager.currentLoggedInServer();
var apiClient = connectionManager.currentApiClient();
var pathname = ctx.pathname.toLowerCase();
console.log('Emby.Page - processing path request ' + pathname);
if (server) {
if (apiClient && apiClient.isLoggedIn()) {
console.log('Emby.Page - user is authenticated');
@ -495,6 +495,19 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
page.pushState(state, title, url);
}
function setBaseRoute() {
var baseRoute = window.location.pathname.replace('/index.html', '');
if (baseRoute.lastIndexOf('/') == baseRoute.length - 1) {
baseRoute = baseRoute.substring(0, baseRoute.length - 1);
}
console.log('Setting page base to ' + baseRoute);
page.base(baseRoute);
}
setBaseRoute();
return {
addRoute: addRoute,
param: param,