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

Remove auto port forward options

This commit is contained in:
viown 2024-12-15 12:56:55 +03:00
parent e0e266d1a6
commit fb1ef7d905
5 changed files with 4 additions and 27 deletions

View file

@ -96,14 +96,6 @@
<option value="blacklist">${Blacklist}</option>
</select>
</div>
<div class="checkboxContainer checkboxContainer-withDescription fldEnableUpnp hide">
<label>
<input type="checkbox" is="emby-checkbox" id="chkEnableUpnp" />
<span>${LabelEnableAutomaticPortMap}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableAutomaticPortMapHelp}</div>
</div>
<div class="inputContainer fldPublicHttpPort hide">
<input is="emby-input" type="number" label="${LabelPublicHttpPort}" id="txtPublicHttpPort" pattern="[0-9]*" required="required" min="1" max="65535" />
<div class="fieldDescription">${LabelPublicHttpPortHelp}</div>

View file

@ -8,8 +8,7 @@ import alert from '../../components/alert';
function onSubmit(e) {
const form = this;
const localAddress = form.querySelector('#txtLocalAddress').value;
const enableUpnp = form.querySelector('#chkEnableUpnp').checked;
confirmSelections(localAddress, enableUpnp, function () {
confirmSelections(localAddress, function () {
const validationResult = getValidationAlert(form);
if (validationResult) {
@ -54,7 +53,6 @@ function onSubmit(e) {
config.InternalHttpsPort = form.querySelector('#txtHttpsPort').value;
config.EnableHttps = form.querySelector('#chkEnableHttps').checked;
config.RequireHttps = form.querySelector('#chkRequireHttps').checked;
config.EnableUPnP = enableUpnp;
config.BaseUrl = form.querySelector('#txtBaseUrl').value;
config.EnableRemoteAccess = form.querySelector('#chkRemoteAccess').checked;
config.CertificatePath = form.querySelector('#txtCertificatePath').value || null;
@ -110,8 +108,8 @@ function showAlertText(options) {
});
}
function confirmSelections(localAddress, enableUpnp, callback) {
if (localAddress || !enableUpnp) {
function confirmSelections(localAddress, callback) {
if (localAddress) {
showAlertText({
title: globalize.translate('TitleHostingSettings'),
text: globalize.translate('SettingsWarning')
@ -139,7 +137,6 @@ export default function (view) {
const txtCertificatePath = page.querySelector('#txtCertificatePath');
txtCertificatePath.value = config.CertificatePath || '';
page.querySelector('#txtCertPassword').value = config.CertificatePassword || '';
page.querySelector('#chkEnableUpnp').checked = config.EnableUPnP;
triggerChange(page.querySelector('#chkRemoteAccess'));
page.querySelector('#chkAutodiscovery').checked = config.AutoDiscovery;
page.querySelector('#chkEnableIP6').checked = config.EnableIPv6;
@ -154,13 +151,11 @@ export default function (view) {
view.querySelector('.fldExternalAddressFilterMode').classList.remove('hide');
view.querySelector('.fldPublicHttpPort').classList.remove('hide');
view.querySelector('.fldPublicHttpsPort').classList.remove('hide');
view.querySelector('.fldEnableUpnp').classList.remove('hide');
} else {
view.querySelector('.fldExternalAddressFilter').classList.add('hide');
view.querySelector('.fldExternalAddressFilterMode').classList.add('hide');
view.querySelector('.fldPublicHttpPort').classList.add('hide');
view.querySelector('.fldPublicHttpsPort').classList.add('hide');
view.querySelector('.fldEnableUpnp').classList.add('hide');
}
});
view.querySelector('#btnSelectCertPath').addEventListener('click', function () {

View file

@ -11,13 +11,6 @@
</label>
<div class="fieldDescription checkboxFieldDescription">${AllowRemoteAccessHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkEnableUpnp" />
<span>${LabelEnableAutomaticPortMap}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelEnableAutomaticPortMapHelp}</div>
</div>
<br />
<div class="wizardNavigation">
<button is="emby-button" type="button" class="raised button-cancel" onclick="history.back();">

View file

@ -8,8 +8,7 @@ function save(page) {
loading.show();
const apiClient = ApiClient;
const config = {
EnableRemoteAccess: page.querySelector('#chkRemoteAccess').checked,
EnableAutomaticPortMapping: page.querySelector('#chkEnableUpnp').checked
EnableRemoteAccess: page.querySelector('#chkRemoteAccess').checked
};
apiClient.ajax({