1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #448 from PrplHaz4/fix-AutoRunWebApp

fix AutoRunWebApp checkbox on dashboardgeneral
This commit is contained in:
dkanada 2019-09-11 21:23:27 -07:00 committed by GitHub
commit 7f6d97d0d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -3,10 +3,11 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
function loadPage(page, config, languageOptions, systemInfo) { function loadPage(page, config, languageOptions, systemInfo) {
page.querySelector("#txtServerName").value = systemInfo.ServerName; page.querySelector("#txtServerName").value = systemInfo.ServerName;
$("#chkAutoRunWebApp", page).checked(config.AutoRunWebApp);
if (systemInfo.CanLaunchWebBrowser) { if (systemInfo.CanLaunchWebBrowser) {
page.querySelector("#fldRunWebAppAtStartup").classList.remove("hide"); page.querySelector("#fldAutoRunWebApp").classList.remove("hide");
} else { } else {
page.querySelector("#fldRunWebAppAtStartup").classList.add("hide"); page.querySelector("#fldAutoRunWebApp").classList.add("hide");
} }
page.querySelector("#txtCachePath").value = systemInfo.CachePath || ""; page.querySelector("#txtCachePath").value = systemInfo.CachePath || "";
$("#txtMetadataPath", page).val(systemInfo.InternalMetadataPath || ""); $("#txtMetadataPath", page).val(systemInfo.InternalMetadataPath || "");
@ -46,6 +47,7 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
config.MetadataPath = $("#txtMetadataPath", form).val(); config.MetadataPath = $("#txtMetadataPath", form).val();
config.MetadataNetworkPath = $("#txtMetadataNetworkPath", form).val(); config.MetadataNetworkPath = $("#txtMetadataNetworkPath", form).val();
var requiresReload = (config.UICulture !== currentLanguage); var requiresReload = (config.UICulture !== currentLanguage);
config.AutoRunWebApp = $("#chkAutoRunWebApp", form).checked();
config.EnableAutomaticRestart = $("#chkEnableAutomaticRestart", form).checked(); config.EnableAutomaticRestart = $("#chkEnableAutomaticRestart", form).checked();
config.EnableAutoUpdate = $("#chkEnableAutomaticServerUpdates", form).checked(); config.EnableAutoUpdate = $("#chkEnableAutomaticServerUpdates", form).checked();
ApiClient.updateServerConfiguration(config).then(function() { ApiClient.updateServerConfiguration(config).then(function() {

View file

@ -26,9 +26,9 @@
</div> </div>
</div> </div>
</div> </div>
<div id="fldRunWebAppAtStartup" class="checkboxContainer checkboxContainer-withDescription hide"> <div id="fldAutoRunWebApp" class="checkboxContainer checkboxContainer-withDescription hide">
<label> <label>
<input is="emby-checkbox" type="checkbox" id="chkRunWebAppAtStartup" /> <input is="emby-checkbox" type="checkbox" id="chkAutoRunWebApp" />
<span>${LaunchWebAppOnStartup}</span> <span>${LaunchWebAppOnStartup}</span>
</label> </label>
<div class="fieldDescription checkboxFieldDescription"> <div class="fieldDescription checkboxFieldDescription">