add method to open client settings

This commit is contained in:
dkanada 2020-03-20 02:54:12 +09:00
parent f26e9dcf89
commit 2ef912d960
3 changed files with 20 additions and 0 deletions

View File

@ -10,6 +10,10 @@ define(["apphost", "connectionManager", "listViewStyle", "emby-button"], functio
Dashboard.selectServer();
});
view.querySelector(".clientSettings").addEventListener("click", function () {
window.NativeShell.openClientSettings();
});
view.addEventListener("viewshow", function() {
// this page can also be used by admins to change user preferences from the user edit page
var userId = params.userId || Dashboard.getCurrentUserId();
@ -21,6 +25,12 @@ define(["apphost", "connectionManager", "listViewStyle", "emby-button"], functio
page.querySelector(".lnkPlaybackPreferences").setAttribute("href", "mypreferencesplayback.html?userId=" + userId);
page.querySelector(".lnkSubtitlePreferences").setAttribute("href", "mypreferencessubtitles.html?userId=" + userId);
if (window.NativeShell && window.NativeShell.AppHost.supports("clientsettings")) {
page.querySelector(".clientSettings").classList.remove("hide");
} else {
page.querySelector(".clientSettings").classList.add("hide");
}
if (appHost.supports("multiserver")) {
page.querySelector(".selectServer").classList.remove("hide");
} else {

View File

@ -47,6 +47,15 @@
</div>
</div>
</a>
<a is="emby-linkbutton" data-ripple="false" href="#" style="display:block;padding:0;margin:0;" class="clientSettings listItem-border">
<div class="listItem">
<i class="material-icons listItemIcon listItemIcon-transparent devices_other"></i>
<div class="listItemBody">
<div class="listItemBodyText">${ClientSettings}</div>
</div>
</div>
</a>
</div>
<div class="adminSection verticalSection verticalSection-extrabottompadding">
<h2 class="sectionTitle" style="padding-left:.25em;">${HeaderAdmin}</h2>

View File

@ -147,6 +147,7 @@
"ChannelNumber": "Channel number",
"Channels": "Channels",
"CinemaModeConfigurationHelp": "Cinema mode brings the theater experience straight to your living room with the ability to play trailers and custom intros before the main feature.",
"ClientSettings": "Client Settings",
"Collections": "Collections",
"ColorPrimaries": "Color primaries",
"ColorSpace": "Color space",