1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
This commit is contained in:
Greenback 2020-10-10 15:37:39 +01:00
parent c282e689b0
commit 020b955cfd
4 changed files with 1586 additions and 1429 deletions

View file

@ -105,6 +105,13 @@
</label> </label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableAutomaticPortMapHelp}</div> <div class="fieldDescription checkboxFieldDescription">${LabelEnableAutomaticPortMapHelp}</div>
</div> </div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkCreateHttpPortMap" />
<span>${LabelCreateHttpPortMap}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelCreateHttpPortMapHelp}</div>
</div>
<div class="inputContainer fldPublicPort hide"> <div class="inputContainer fldPublicPort hide">
<input is="emby-input" type="number" label="${LabelPublicHttpPort}" id="txtPublicPort" pattern="[0-9]*" required="required" min="1" max="65535" /> <input is="emby-input" type="number" label="${LabelPublicHttpPort}" id="txtPublicPort" pattern="[0-9]*" required="required" min="1" max="65535" />
<div class="fieldDescription">${LabelPublicHttpPortHelp}</div> <div class="fieldDescription">${LabelPublicHttpPortHelp}</div>
@ -114,6 +121,75 @@
<div class="fieldDescription">${LabelPublicHttpsPortHelp}</div> <div class="fieldDescription">${LabelPublicHttpsPortHelp}</div>
</div> </div>
</fieldset> </fieldset>
<fieldset class='verticalSection verticalSection-extrabottompadding'>
<legend><h3>${HeaderNetworking}</h3></legend>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkEnableIP4" />
<span>${LabelEnableIP4}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableIP4Help}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkEnableIP6" />
<span>${LabelEnableIP6}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableIP6Help}</div>
</div>
</fieldset>
<fieldset class='verticalSection verticalSection-extrabottompadding'>
<legend><h3>${HeaderAutoDiscovery}</h3></legend>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkAutodiscovery" />
<span>${LabelAutomaticDiscovery}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelAutomaticDiscoveryHelp}</div>
</div>
</fieldset>
<fieldset class='verticalSection verticalSection-extrabottompadding'>
<legend><h3>${HeaderPortRanges}</h3></legend>
<div class="inputContainer">
<input is="emby-input" type="text" id="txtPublishedServer" label="${LabelPublishedServerUri}" />
<div class="fieldDescription">${LabelPublishedServerUriHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="text" id="txtUDPPortRange" pattern="[0-9\-]*" label="${LabelUDPPortRange}" />
<div class="fieldDescription">${LabelUDPPortRangeHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="text" id="txtHDHomerunPortRange" pattern="[0-9\-]*" label="${LabelHDHomerunPortRange}" />
<div class="fieldDescription">${LabelHDHomerunPortRangeHelp}</div>
</div>
</fieldset>
<fieldset class='verticalSection verticalSection-extrabottompadding'>
<legend><h3>${HeaderDebugging}</h3></legend>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkEnableSSDPTracing" />
<span>${LabelEnableSSDPTracing}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableSSDPTracingHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="text" id="txtSSDPTracingFilter" pattern="[0-9\.]*" label="${LabelSSDPTracingFilter}" />
<div class="fieldDescription">${LabelSSDPTracingFilterHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkAutodiscoveryTracing" />
<span>${LabelAutoDiscoveryTracing}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelAutoDiscoveryTracingHelp}</div>
</div>
</fieldset>
</div> </div>
<div> <div>
<button is="emby-button" type="submit" class="raised button-submit block"> <button is="emby-button" type="submit" class="raised button-submit block">

View file

@ -19,7 +19,7 @@ import 'emby-select';
validateHttps(form).then(function () { validateHttps(form).then(function () {
loading.show(); loading.show();
ApiClient.getServerConfiguration().then(function (config) { ApiClient.getNamedConfiguration('network').then(function (config) {
config.LocalNetworkSubnets = form.querySelector('#txtLanNetworks').value.split(',').map(function (s) { config.LocalNetworkSubnets = form.querySelector('#txtLanNetworks').value.split(',').map(function (s) {
return s.trim(); return s.trim();
}).filter(function (s) { }).filter(function (s) {
@ -35,6 +35,18 @@ import 'emby-select';
}).filter(function (s) { }).filter(function (s) {
return s.length > 0; return s.length > 0;
}); });
config.LocalNetworkAddresses = form.querySelector('#txtLocalAddress').value.split(',').map(function (s) {
return s.trim();
}).filter(function (s) {
return s.length > 0;
});
config.PublishedServerUriBySubnet = form.querySelector('#txtPublishedServer').value.split(',').map(function (s) {
return s.trim();
}).filter(function (s) {
return s.length > 0;
});
config.IsRemoteIPFilterBlacklist = form.querySelector('#selectExternalAddressFilterMode').value === 'blacklist'; config.IsRemoteIPFilterBlacklist = form.querySelector('#selectExternalAddressFilterMode').value === 'blacklist';
config.PublicPort = form.querySelector('#txtPublicPort').value; config.PublicPort = form.querySelector('#txtPublicPort').value;
config.PublicHttpsPort = form.querySelector('#txtPublicHttpsPort').value; config.PublicHttpsPort = form.querySelector('#txtPublicHttpsPort').value;
@ -47,8 +59,18 @@ import 'emby-select';
config.EnableRemoteAccess = form.querySelector('#chkRemoteAccess').checked; config.EnableRemoteAccess = form.querySelector('#chkRemoteAccess').checked;
config.CertificatePath = form.querySelector('#txtCertificatePath').value || null; config.CertificatePath = form.querySelector('#txtCertificatePath').value || null;
config.CertificatePassword = form.querySelector('#txtCertPassword').value || null; config.CertificatePassword = form.querySelector('#txtCertPassword').value || null;
config.LocalNetworkAddresses = localAddress ? [localAddress] : [];
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult, Dashboard.processErrorResponse); config.UPnPCreateHttpPortMap = form.querySelector('#chkCreateHttpPortMap').checked;
config.AutoDiscovery = form.querySelector('#chkAutodiscovery').checked;
config.AutoDiscoveryTracing = form.querySelector('#chkAutodiscoveryTracing').checked;
config.EnableIPV6 = form.querySelector('#chkEnableIP6').checked;
config.EnableIPV4 = form.querySelector('#chkEnableIP4').checked;
config.UPnPCreateHttpPortMap = form.querySelector('#chkCreateHttpPortMap').checked;
config.UDPPortRange = form.querySelector('#txtUDPPortRange').value || null;
config.HDHomerunPortRange = form.querySelector('#txtHDHomerunPortRange').checked || null;
config.EnableSSDPTracing = form.querySelector('#chkEnableSSDPTracing').checked;
config.SSDPTracingFilter = form.querySelector('#txtSSDPTracingFilter').value || null;
ApiClient.updateNamedConfiguration('network', config).then(Dashboard.processServerConfigurationUpdateResult, Dashboard.processErrorResponse);
}); });
}); });
}); });
@ -111,7 +133,7 @@ import 'emby-select';
page.querySelector('#txtPortNumber').value = config.HttpServerPortNumber; page.querySelector('#txtPortNumber').value = config.HttpServerPortNumber;
page.querySelector('#txtPublicPort').value = config.PublicPort; page.querySelector('#txtPublicPort').value = config.PublicPort;
page.querySelector('#txtPublicHttpsPort').value = config.PublicHttpsPort; page.querySelector('#txtPublicHttpsPort').value = config.PublicHttpsPort;
page.querySelector('#txtLocalAddress').value = config.LocalNetworkAddresses[0] || ''; page.querySelector('#txtLocalAddress').value = (config.LocalNetworkSubnets || []).join(', ');
page.querySelector('#txtLanNetworks').value = (config.LocalNetworkSubnets || []).join(', '); page.querySelector('#txtLanNetworks').value = (config.LocalNetworkSubnets || []).join(', ');
page.querySelector('#txtKnownProxies').value = (config.KnownProxies || []).join(', '); page.querySelector('#txtKnownProxies').value = (config.KnownProxies || []).join(', ');
page.querySelector('#txtExternalAddressFilter').value = (config.RemoteIPFilter || []).join(', '); page.querySelector('#txtExternalAddressFilter').value = (config.RemoteIPFilter || []).join(', ');
@ -126,6 +148,17 @@ import 'emby-select';
page.querySelector('#txtCertPassword').value = config.CertificatePassword || ''; page.querySelector('#txtCertPassword').value = config.CertificatePassword || '';
page.querySelector('#chkEnableUpnp').checked = config.EnableUPnP; page.querySelector('#chkEnableUpnp').checked = config.EnableUPnP;
triggerChange(page.querySelector('#chkRemoteAccess')); triggerChange(page.querySelector('#chkRemoteAccess'));
page.querySelector('#chkCreateHttpPortMap').checked = config.UPnPCreateHttpPortMap;
page.querySelector('#chkAutodiscovery').checked = config.AutoDiscovery;
page.querySelector('#chkAutodiscoveryTracing').checked = config.AutoDiscoveryTracing;
page.querySelector('#chkEnableIP6').checked = config.EnableIPV6;
page.querySelector('#chkEnableIP4').checked = config.EnableIPV4;
page.querySelector('#chkCreateHttpPortMap').checked = config.UPnPCreateHttpPortMap;
page.querySelector('#txtUDPPortRange').value = config.UDPPortRange;
page.querySelector('#txtHDHomerunPortRange').checked = config.HDHomerunPortRange;
page.querySelector('#chkEnableSSDPTracing').checked = config.EnableSSDPTracing;
page.querySelector('#txtSSDPTracingFilter').value = config.SSDPTracingFilter;
page.querySelector('#txtPublishedServer').value = (config.PublishedServerUriBySubnet || []).join(', ');
loading.hide(); loading.hide();
} }
@ -164,7 +197,7 @@ import 'emby-select';
view.querySelector('.dashboardHostingForm').addEventListener('submit', onSubmit); view.querySelector('.dashboardHostingForm').addEventListener('submit', onSubmit);
view.addEventListener('viewshow', function (e) { view.addEventListener('viewshow', function (e) {
loading.show(); loading.show();
ApiClient.getServerConfiguration().then(function (config) { ApiClient.getNamedConfiguration('network').then(function (config) {
loadPage(view, config); loadPage(view, config);
}); });
}); });

View file

@ -1418,5 +1418,29 @@
"ButtonUseQuickConnect": "Use Quick Connect", "ButtonUseQuickConnect": "Use Quick Connect",
"ButtonActivate": "Activate", "ButtonActivate": "Activate",
"Authorize": "Authorise", "Authorize": "Authorise",
"EnableAutoCast": "Set as Default" "EnableAutoCast": "Set as Default",
"LabelCreateHttpPortMap": "Enable automatic port mapping for http traffic as well as https.",
"LabelCreateHttpPortMapHelp": "Permit automatic port mapping to create a rule for http traffic in addition to https traffic.",
"HeaderAutoDiscovery": "Network Discovery",
"LabelAutomaticDiscovery": "Enable Auto Discovery:",
"LabelAutomaticDiscoveryHelp": "Enable applications to automatically detect Jellyfin by using udp port 7359.",
"LabelAutoDiscoveryTracing": "Enable Auto Discovery tracing.",
"LabelAutoDiscoveryTracingHelp": "When enabled, packets received on the auto discovery port will be logged.",
"HeaderPortRanges": "Firewall and Proxy Settings",
"LabelUDPPortRange": "UDP Communication Range:",
"LabelUDPPortRangeHelp": "Restrict Jellyfin to use this port range when making UDP connections. (Default is 1024 - 645535).<br/> Note: Certain function require fixed ports that may be outside of this range.",
"LabelHDHomerunPortRange": "HD Homerun Range:",
"LabelHDHomerunPortRangeHelp": "Restricts the HD Homerun UDP port range to this value. (Default is 1024 - 645535).",
"LabelPublishedServerUri": "Published Server URIs:",
"LabelPublishedServerUriHelp": "Override the URI used by Jellyfin, based on the interface, or client IP address.",
"HeaderDebugging": "Debugging and Tracing",
"LabelEnableSSDPTracing": "Enable SSDP Tracing:",
"LabelEnableSSDPTracingHelp": "Enable details SSDP network tracing to be logged.<br/><b>WARNING:</b> This will cause serious performance degradation.",
"LabelSSDPTracingFilter": "SSDP Filter:",
"LabelSSDPTracingFilterHelp": "Optional IP address upon which to filter the logged SSDP traffic.",
"LabelEnableIP6Help": "Enables IPv6 functionality.",
"LabelEnableIP6": "Enable IPv6:",
"LabelEnableIP4Help": "Enables IPv4 functionality.",
"LabelEnableIP4": "Enable IPv4:",
"HeaderNetworking": "IP Protocols"
} }

File diff suppressed because it is too large Load diff