mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
rework hosting options
This commit is contained in:
parent
1509f3805d
commit
0f142fff89
10 changed files with 222 additions and 167 deletions
|
@ -8,10 +8,7 @@
|
|||
Dashboard.setPageTitle(Dashboard.lastSystemInfo.ServerName);
|
||||
}
|
||||
|
||||
ApiClient.getSystemInfo().done(function (systemInfo) {
|
||||
|
||||
Dashboard.setPageTitle(systemInfo.ServerName);
|
||||
});
|
||||
refreshPageTitle(page);
|
||||
|
||||
$('#txtServerName', page).val(config.ServerName || '');
|
||||
|
||||
|
@ -21,21 +18,19 @@
|
|||
|
||||
})).val(config.UICulture).selectmenu('refresh');
|
||||
|
||||
$('#txtPortNumber', page).val(config.HttpServerPortNumber);
|
||||
$('#txtPublicPort', page).val(config.PublicPort);
|
||||
|
||||
$('#chkUseHttps', page).checked(config.UseHttps).checkboxradio('refresh');
|
||||
$('#txtHttpsPort', page).val(config.HttpsPortNumber);
|
||||
$('#txtCertificatePath', page).val(config.CertificatePath);
|
||||
|
||||
$('#txtDdns', page).val(config.WanDdns || '');
|
||||
|
||||
$('#chkEnableUpnp', page).checked(config.EnableUPnP).checkboxradio('refresh');
|
||||
$('#txtCachePath', page).val(config.CachePath || '');
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function refreshPageTitle(page) {
|
||||
|
||||
ApiClient.getSystemInfo().done(function (systemInfo) {
|
||||
|
||||
Dashboard.setPageTitle(systemInfo.ServerName);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#dashboardGeneralPage", function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
@ -88,27 +83,19 @@
|
|||
Dashboard.showLoadingMsg();
|
||||
|
||||
var form = this;
|
||||
var page = $(form).parents('.page');
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.ServerName = $('#txtServerName', form).val();
|
||||
config.UICulture = $('#selectLocalizationLanguage', form).val();
|
||||
|
||||
config.HttpServerPortNumber = $('#txtPortNumber', form).val();
|
||||
config.PublicPort = $('#txtPublicPort', form).val();
|
||||
|
||||
config.UseHttps = $('#chkUseHttps', form).checked();
|
||||
config.HttpsPortNumber = $('#txtHttpsPort', form).val();
|
||||
config.CertificatePath = $('#txtCertificatePath', form).val();
|
||||
|
||||
|
||||
config.EnableUPnP = $('#chkEnableUpnp', form).checked();
|
||||
|
||||
config.WanDdns = $('#txtDdns', form).val();
|
||||
config.CachePath = $('#txtCachePath', form).val();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(function () {
|
||||
|
||||
|
||||
refreshPageTitle(page);
|
||||
|
||||
ApiClient.getNamedConfiguration(brandingConfigKey).done(function (brandingConfig) {
|
||||
|
||||
brandingConfig.LoginDisclaimer = $('#txtLoginDisclaimer', form).val();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue