add check for multiserver on login page

This commit is contained in:
dkanada 2019-04-06 23:18:47 -07:00
parent f83bd20fa9
commit 38e3861e85
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
define(["appSettings", "dom", "connectionManager", "loading", "cardStyle", "emby-checkbox"], function(appSettings, dom, connectionManager, loading) { define(["apphost", "appSettings", "dom", "connectionManager", "loading", "cardStyle", "emby-checkbox"], function(appHost, appSettings, dom, connectionManager, loading) {
"use strict"; "use strict";
function authenticateUserByName(page, apiClient, username, password) { function authenticateUserByName(page, apiClient, username, password) {
@ -140,6 +140,9 @@ define(["appSettings", "dom", "connectionManager", "loading", "cardStyle", "emby
view.addEventListener("viewshow", function(e) { view.addEventListener("viewshow", function(e) {
loading.show(); loading.show();
if (!appHost.supports('multiserver')) {
view.querySelector(".btnSelectServer").classList.add("hide");
}
var apiClient = getApiClient(); var apiClient = getApiClient();
apiClient.getPublicUsers().then(function(users) { apiClient.getPublicUsers().then(function(users) {
if (users.length) { if (users.length) {

View File

@ -47,7 +47,7 @@
<span>${ButtonForgotPassword}</span> <span>${ButtonForgotPassword}</span>
</button> </button>
<a is="emby-linkbutton" href="selectserver.html" class="raised block"> <a is="emby-linkbutton" href="selectserver.html" class="raised block btnSelectServer">
<span>${ButtonChangeServer}</span> <span>${ButtonChangeServer}</span>
</a> </a>