mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
commit
016de76ab8
@ -4,7 +4,7 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
|
||||
function loadPage(page, config, languageOptions, systemInfo) {
|
||||
-1 !== systemInfo.OperatingSystem.toLowerCase().indexOf("windows") ? page.querySelector("#windowsStartupDescription").classList.remove("hide") : page.querySelector("#windowsStartupDescription").classList.add("hide"), systemInfo.SupportsAutoRunAtStartup ? page.querySelector("#fldRunAtStartup").classList.remove("hide") : page.querySelector("#fldRunAtStartup").classList.add("hide"), systemInfo.CanLaunchWebBrowser ? page.querySelector("#fldRunWebAppAtStartup").classList.remove("hide") : page.querySelector("#fldRunWebAppAtStartup").classList.add("hide"), page.querySelector("#txtCachePath").value = config.CachePath || "", $("#selectLocalizationLanguage", page).html(languageOptions.map(function(l) {
|
||||
return '<option value="' + l.Value + '">' + l.Name + "</option>"
|
||||
})).val(config.UICulture), currentLanguage = config.UICulture, $("#chkUsageData", page).checked(config.EnableAnonymousUsageReporting), $("#chkRunAtStartup", page).checked(config.RunAtStartup), $("#chkRunWebAppAtStartup", page).checked(config.AutoRunWebApp || !1), systemInfo.CanSelfUpdate ? page.querySelector(".fldAutomaticUpdates").classList.remove("hide") : page.querySelector(".fldAutomaticUpdates").classList.add("hide"), $("#chkEnableAutomaticServerUpdates", page).checked(config.EnableAutoUpdate), $("#chkEnableAutomaticRestart", page).checked(config.EnableAutomaticRestart), systemInfo.CanSelfRestart ? page.querySelector("#fldEnableAutomaticRestart").classList.remove("hide") : page.querySelector("#fldEnableAutomaticRestart").classList.add("hide"), systemInfo.CanSelfRestart || systemInfo.CanSelfUpdate ? $(".autoUpdatesContainer", page).removeClass("hide") : $(".autoUpdatesContainer", page).addClass("hide"), loading.hide()
|
||||
})).val(config.UICulture), currentLanguage = config.UICulture, $("#chkRunAtStartup", page).checked(config.RunAtStartup), $("#chkRunWebAppAtStartup", page).checked(config.AutoRunWebApp || !1), systemInfo.CanSelfUpdate ? page.querySelector(".fldAutomaticUpdates").classList.remove("hide") : page.querySelector(".fldAutomaticUpdates").classList.add("hide"), $("#chkEnableAutomaticServerUpdates", page).checked(config.EnableAutoUpdate), $("#chkEnableAutomaticRestart", page).checked(config.EnableAutomaticRestart), systemInfo.CanSelfRestart ? page.querySelector("#fldEnableAutomaticRestart").classList.remove("hide") : page.querySelector("#fldEnableAutomaticRestart").classList.add("hide"), systemInfo.CanSelfRestart || systemInfo.CanSelfUpdate ? $(".autoUpdatesContainer", page).removeClass("hide") : $(".autoUpdatesContainer", page).addClass("hide"), loading.hide()
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
@ -14,7 +14,7 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
|
||||
return ApiClient.getServerConfiguration().then(function(config) {
|
||||
config.UICulture = $("#selectLocalizationLanguage", form).val(), config.CachePath = form.querySelector("#txtCachePath").value;
|
||||
var requiresReload = !1;
|
||||
config.UICulture !== currentLanguage && (requiresReload = !0), config.EnableAnonymousUsageReporting = $("#chkUsageData", form).checked(), config.RunAtStartup = $("#chkRunAtStartup", form).checked(), config.AutoRunWebApp = $("#chkRunWebAppAtStartup", form).checked(), config.EnableAutomaticRestart = $("#chkEnableAutomaticRestart", form).checked(), config.EnableAutoUpdate = $("#chkEnableAutomaticServerUpdates", form).checked(), ApiClient.updateServerConfiguration(config).then(function() {
|
||||
config.UICulture !== currentLanguage && (requiresReload = !0), config.RunAtStartup = $("#chkRunAtStartup", form).checked(), config.AutoRunWebApp = $("#chkRunWebAppAtStartup", form).checked(), config.EnableAutomaticRestart = $("#chkEnableAutomaticRestart", form).checked(), config.EnableAutoUpdate = $("#chkEnableAutomaticServerUpdates", form).checked(), ApiClient.updateServerConfiguration(config).then(function() {
|
||||
ApiClient.getNamedConfiguration(brandingConfigKey).then(function(brandingConfig) {
|
||||
brandingConfig.LoginDisclaimer = form.querySelector("#txtLoginDisclaimer").value, brandingConfig.CustomCss = form.querySelector("#txtCustomCss").value, currentBrandingOptions && brandingConfig.CustomCss !== currentBrandingOptions.CustomCss && (requiresReload = !0), ApiClient.updateNamedConfiguration(brandingConfigKey, brandingConfig).then(function() {
|
||||
Dashboard.processServerConfigurationUpdateResult(), requiresReload && !AppInfo.isNativeApp && window.location.reload(!0)
|
||||
@ -48,4 +48,4 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user