mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Improve UI
This commit is contained in:
parent
43d01146a2
commit
bf03a7ba57
7 changed files with 65 additions and 45 deletions
|
@ -3,12 +3,10 @@ define(["jQuery", "loading", "fnchecked"], function ($, loading) {
|
|||
|
||||
var page;
|
||||
function loadPage(status) {
|
||||
var active = (status == "Active");
|
||||
var available = (status == "Available") || active;
|
||||
var available = status === "Available" || status === "Active";
|
||||
|
||||
page.querySelector("#quickConnectStatus").textContent = status.toLocaleLowerCase();
|
||||
page.querySelector("#chkQuickConnectAvailable").checked = available;
|
||||
page.querySelector("#chkQuickConnectActive").checked = active;
|
||||
|
||||
loading.hide();
|
||||
}
|
||||
|
@ -17,9 +15,6 @@ define(["jQuery", "loading", "fnchecked"], function ($, loading) {
|
|||
loading.show();
|
||||
|
||||
var newStatus = page.querySelector("#chkQuickConnectAvailable").checked ? "Available" : "Unavailable";
|
||||
if (newStatus && page.querySelector("#chkQuickConnectActive").checked) {
|
||||
newStatus = "Active";
|
||||
}
|
||||
|
||||
var url = ApiClient.getUrl("/QuickConnect/Available");
|
||||
|
||||
|
@ -30,9 +25,8 @@ define(["jQuery", "loading", "fnchecked"], function ($, loading) {
|
|||
},
|
||||
url: url
|
||||
}, true).then(() => {
|
||||
Dashboard.alert({
|
||||
message: "Settings saved",
|
||||
title: "Saved"
|
||||
require(["toast"], function (toast) {
|
||||
toast("Settings saved");
|
||||
});
|
||||
|
||||
setTimeout(updatePage, 500);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue