diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index 8ea203d5a5..3ea11d50e8 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -215,7 +215,6 @@ if (LibraryBrowser.needsRefresh(tabContent)) { if (window.ApiClient) { var userId = Dashboard.getCurrentUserId(); - Dashboard.showLoadingMsg(); getDisplayPreferences('home', userId).then(function (result) { diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 506d1a13f2..9c7a308761 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -402,6 +402,8 @@ onTabbedpagebeforeshowInternal: function (page, e, isFirstLoad) { + var pages = page.querySelector('neon-animated-pages'); + if (isFirstLoad) { console.log('selected tab is null, checking query string'); @@ -420,13 +422,11 @@ tabs.selected = selected; } else { - page.querySelector('neon-animated-pages').selected = selected; + pages.selected = selected; } } else { - var pages = page.querySelector('neon-animated-pages'); - // Go back to the first tab if (LibraryBrowser.enableFullPaperTabs() && !e.detail.isRestored) { if (pages.selected) { diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index d9955866bf..3685f8c94f 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1518,8 +1518,8 @@ var AppInfo = {}; //}); events.on(connectionManager, 'localusersignedin', function (e, user) { - localApiClient = connectionManager.getApiClient(user.ServerId); + window.ApiClient = localApiClient; }); } @@ -2942,7 +2942,8 @@ var AppInfo = {}; window.Emby.TransparencyLevel = pageObjects.TransparencyLevel; defineCoreRoutes(); Emby.Page.start({ - click: true + click: true, + hashbang: true }); var postInitDependencies = []; @@ -3227,7 +3228,7 @@ pageClassOn('viewshow', "page", function () { var apiClient = window.ApiClient; - if (apiClient && apiClient.accessToken() && Dashboard.getCurrentUserId()) { + if (apiClient && apiClient.isLoggedIn()) { var isSettingsPage = page.classList.contains('type-interior'); @@ -3244,29 +3245,9 @@ pageClassOn('viewshow', "page", function () { } } - else { - - var isConnectMode = Dashboard.isConnectMode(); - - if (isConnectMode) { - - if (!Dashboard.isServerlessPage()) { - Dashboard.logout(); - return; - } - } - - if (!isConnectMode && this.id !== "loginPage" && !page.classList.contains('forgotPasswordPage') && !page.classList.contains('forgotPasswordPinPage') && !page.classList.contains('wizardPage') && this.id !== 'publicSharedItemPage') { - - console.log('Not logged into server. Redirecting to login.'); - Dashboard.logout(); - return; - } - } - Dashboard.ensureHeader(page); - if (apiClient && !apiClient.isWebSocketOpen()) { + if (apiClient && apiClient.isLoggedIn() && !apiClient.isWebSocketOpen()) { Dashboard.refreshSystemInfoFromServer(); }