From 11e675de58082d77695911624112674a93f5da8c Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 12 Jul 2020 04:24:45 +0900 Subject: [PATCH] fix two minor issues --- src/controllers/auth/login.js | 12 ++---------- src/controllers/dashboard/dashboard.js | 8 +------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/controllers/auth/login.js b/src/controllers/auth/login.js index c0c37e27d6..640cb26c2e 100644 --- a/src/controllers/auth/login.js +++ b/src/controllers/auth/login.js @@ -7,18 +7,10 @@ define(['apphost', 'appSettings', 'dom', 'connectionManager', 'loading', 'layout loading.show(); apiClient.authenticateUserByName(username, password).then(function (result) { var user = result.User; - var serverId = getParameterByName('serverid'); - var newUrl; - - if (user.Policy.IsAdministrator && !serverId) { - newUrl = 'dashboard.html'; - } else { - newUrl = 'home.html'; - } - loading.hide(); + Dashboard.onServerChanged(user.Id, result.AccessToken, apiClient); - Dashboard.navigate(newUrl); + Dashboard.navigate('home.html'); }, function (response) { page.querySelector('#txtManualName').value = ''; page.querySelector('#txtManualPassword').value = ''; diff --git a/src/controllers/dashboard/dashboard.js b/src/controllers/dashboard/dashboard.js index 6a378903d3..e6e01338b0 100644 --- a/src/controllers/dashboard/dashboard.js +++ b/src/controllers/dashboard/dashboard.js @@ -169,13 +169,7 @@ define(['datetime', 'events', 'itemHelper', 'serverNotifications', 'dom', 'globa function reloadSystemInfo(view, apiClient) { apiClient.getSystemInfo().then(function (systemInfo) { view.querySelector('#serverName').innerHTML = globalize.translate('DashboardServerName', systemInfo.ServerName); - var localizedVersion = globalize.translate('DashboardVersionNumber', systemInfo.Version); - - if (systemInfo.SystemUpdateLevel !== 'Release') { - localizedVersion += ' ' + systemInfo.SystemUpdateLevel; - } - - view.querySelector('#versionNumber').innerHTML = localizedVersion; + view.querySelector('#versionNumber').innerHTML = globalize.translate('DashboardVersionNumber', systemInfo.Version); view.querySelector('#operatingSystem').innerHTML = globalize.translate('DashboardOperatingSystem', systemInfo.OperatingSystem); view.querySelector('#architecture').innerHTML = globalize.translate('DashboardArchitecture', systemInfo.SystemArchitecture);