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> <option value="blacklist">${Blacklist}</option>
</select> </select>
</div> </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"> <div class="inputContainer fldPublicHttpPort hide">
<input is="emby-input" type="number" label="${LabelPublicHttpPort}" id="txtPublicHttpPort" pattern="[0-9]*" required="required" min="1" max="65535" /> <input is="emby-input" type="number" label="${LabelPublicHttpPort}" id="txtPublicHttpPort" pattern="[0-9]*" required="required" min="1" max="65535" />
<div class="fieldDescription">${LabelPublicHttpPortHelp}</div> <div class="fieldDescription">${LabelPublicHttpPortHelp}</div>

View file

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

View file

@ -11,13 +11,6 @@
</label> </label>
<div class="fieldDescription checkboxFieldDescription">${AllowRemoteAccessHelp}</div> <div class="fieldDescription checkboxFieldDescription">${AllowRemoteAccessHelp}</div>
</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 /> <br />
<div class="wizardNavigation"> <div class="wizardNavigation">
<button is="emby-button" type="button" class="raised button-cancel" onclick="history.back();"> <button is="emby-button" type="button" class="raised button-cancel" onclick="history.back();">

View file

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

View file

@ -682,8 +682,6 @@
"LabelDynamicExternalId": "{0} Id", "LabelDynamicExternalId": "{0} Id",
"LabelEnableAudioVbr": "Enable VBR audio encoding", "LabelEnableAudioVbr": "Enable VBR audio encoding",
"LabelEnableAudioVbrHelp": "Variable bitrate offers better quality to average bitrate ratio, but in some rare cases may cause buffering and compatibility issues.", "LabelEnableAudioVbrHelp": "Variable bitrate offers better quality to average bitrate ratio, but in some rare cases may cause buffering and compatibility issues.",
"LabelEnableAutomaticPortMap": "Enable automatic port mapping",
"LabelEnableAutomaticPortMapHelp": "Automatically forward public ports on your router to local ports on your server via UPnP. This may not work with some router models or network configurations. Changes will not apply until after a server restart.",
"LabelEnableHardwareDecodingFor": "Enable hardware decoding for", "LabelEnableHardwareDecodingFor": "Enable hardware decoding for",
"LabelEnableHttps": "Enable HTTPS", "LabelEnableHttps": "Enable HTTPS",
"LabelEnableHttpsHelp": "Listen on the configured HTTPS port. A valid certificate must also be supplied for this to take effect.", "LabelEnableHttpsHelp": "Listen on the configured HTTPS port. A valid certificate must also be supplied for this to take effect.",