mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add server select support for NativeShell
This commit is contained in:
parent
254c69b2f1
commit
6d6cce02af
5 changed files with 17 additions and 3 deletions
|
@ -187,6 +187,9 @@ define(["apphost", "appSettings", "dom", "connectionManager", "loading", "layout
|
||||||
view.querySelector("#txtManualName").value = "";
|
view.querySelector("#txtManualName").value = "";
|
||||||
showManualForm(view, true);
|
showManualForm(view, true);
|
||||||
});
|
});
|
||||||
|
view.querySelector(".btnSelectServer").addEventListener("click", function () {
|
||||||
|
Dashboard.selectServer();
|
||||||
|
});
|
||||||
view.addEventListener("viewshow", function (e) {
|
view.addEventListener("viewshow", function (e) {
|
||||||
loading.show();
|
loading.show();
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,10 @@ define(["apphost", "connectionManager", "listViewStyle", "emby-button"], functio
|
||||||
Dashboard.logout();
|
Dashboard.logout();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
view.querySelector(".selectServer").addEventListener("click", function () {
|
||||||
|
Dashboard.selectServer();
|
||||||
|
});
|
||||||
|
|
||||||
view.addEventListener("viewshow", function() {
|
view.addEventListener("viewshow", function() {
|
||||||
// this page can also be used by admins to change user preferences from the user edit page
|
// this page can also be used by admins to change user preferences from the user edit page
|
||||||
var userId = params.userId || Dashboard.getCurrentUserId();
|
var userId = params.userId || Dashboard.getCurrentUserId();
|
||||||
|
|
|
@ -47,9 +47,9 @@
|
||||||
<span>${ButtonForgotPassword}</span>
|
<span>${ButtonForgotPassword}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<a is="emby-linkbutton" href="selectserver.html" class="raised block btnSelectServer">
|
<button is="emby-button" type="button" class="raised block btnSelectServer">
|
||||||
<span>${ButtonChangeServer}</span>
|
<span>${ButtonChangeServer}</span>
|
||||||
</a>
|
</button>
|
||||||
|
|
||||||
<p class="disclaimer" style="text-align: center; margin-top: 2em;"></p>
|
<p class="disclaimer" style="text-align: center; margin-top: 2em;"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="userSection verticalSection verticalSection-extrabottompadding">
|
<div class="userSection verticalSection verticalSection-extrabottompadding">
|
||||||
<h2 class="sectionTitle" style="padding-left:.25em;">${HeaderUser}</h2>
|
<h2 class="sectionTitle" style="padding-left:.25em;">${HeaderUser}</h2>
|
||||||
<a is="emby-linkbutton" data-ripple="false" href="selectserver.html" style="display:block;padding:0;margin:0;" class="selectServer hide listItem-border">
|
<a is="emby-linkbutton" data-ripple="false" href="#" style="display:block;padding:0;margin:0;" class="selectServer hide listItem-border">
|
||||||
<div class="listItem">
|
<div class="listItem">
|
||||||
<i class="material-icons listItemIcon listItemIcon-transparent">wifi</i>
|
<i class="material-icons listItemIcon listItemIcon-transparent">wifi</i>
|
||||||
<div class="listItemBody">
|
<div class="listItemBody">
|
||||||
|
|
|
@ -221,6 +221,13 @@ var Dashboard = {
|
||||||
};
|
};
|
||||||
appHost.getPushTokenInfo();
|
appHost.getPushTokenInfo();
|
||||||
return capabilities = Object.assign(capabilities, appHost.getPushTokenInfo());
|
return capabilities = Object.assign(capabilities, appHost.getPushTokenInfo());
|
||||||
|
},
|
||||||
|
selectServer: function () {
|
||||||
|
if (window.NativeShell && typeof window.NativeShell.selectServer === "function") {
|
||||||
|
window.NativeShell.selectServer();
|
||||||
|
} else {
|
||||||
|
Dashboard.navigate("selectserver.html");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue