mirror of
https://github.com/transmission/transmission
synced 2025-01-30 10:52:00 +00:00
fix: remove extra checkbox from webui peers preferences (#5223)
This commit is contained in:
parent
02fea61145
commit
e527cd4e9b
1 changed files with 11 additions and 17 deletions
|
@ -523,32 +523,28 @@ export class PrefsDialog extends EventTarget {
|
||||||
label.classList.add('section-label');
|
label.classList.add('section-label');
|
||||||
root.append(label);
|
root.append(label);
|
||||||
|
|
||||||
let cal = PrefsDialog._createCheckAndLabel(
|
label = document.createElement('label');
|
||||||
'max-peers-per-torrent-div',
|
label.textContent = 'Max peers per torrent:';
|
||||||
'Max peers per torrent:'
|
root.append(label);
|
||||||
);
|
|
||||||
root.append(cal.root);
|
|
||||||
const max_peers_per_torrent_check = cal.check;
|
|
||||||
|
|
||||||
let input = document.createElement('input');
|
let input = document.createElement('input');
|
||||||
input.type = 'number';
|
input.type = 'number';
|
||||||
input.dataset.key = 'peer-limit-per-torrent';
|
input.dataset.key = 'peer-limit-per-torrent';
|
||||||
|
input.id = makeUUID();
|
||||||
|
label.setAttribute('for', input.id);
|
||||||
root.append(input);
|
root.append(input);
|
||||||
PrefsDialog._enableIfChecked(input, cal.check);
|
|
||||||
const max_peers_per_torrent_input = input;
|
const max_peers_per_torrent_input = input;
|
||||||
|
|
||||||
cal = PrefsDialog._createCheckAndLabel(
|
label = document.createElement('label');
|
||||||
'max-peers-overall-div',
|
label.textContent = 'Max peers overall:';
|
||||||
'Max peers overall:'
|
root.append(label);
|
||||||
);
|
|
||||||
root.append(cal.root);
|
|
||||||
const max_peers_overall_check = cal.check;
|
|
||||||
|
|
||||||
input = document.createElement('input');
|
input = document.createElement('input');
|
||||||
input.type = 'number';
|
input.type = 'number';
|
||||||
input.dataset.key = 'peer-limit-global';
|
input.dataset.key = 'peer-limit-global';
|
||||||
|
input.id = makeUUID();
|
||||||
|
label.setAttribute('for', input.id);
|
||||||
root.append(input);
|
root.append(input);
|
||||||
PrefsDialog._enableIfChecked(input, cal.check);
|
|
||||||
const max_peers_overall_input = input;
|
const max_peers_overall_input = input;
|
||||||
|
|
||||||
label = document.createElement('div');
|
label = document.createElement('div');
|
||||||
|
@ -569,7 +565,7 @@ export class PrefsDialog extends EventTarget {
|
||||||
root.append(select);
|
root.append(select);
|
||||||
const encryption_select = select;
|
const encryption_select = select;
|
||||||
|
|
||||||
cal = PrefsDialog._createCheckAndLabel(
|
let cal = PrefsDialog._createCheckAndLabel(
|
||||||
'use-pex-div',
|
'use-pex-div',
|
||||||
'Use PEX to find more peers'
|
'Use PEX to find more peers'
|
||||||
);
|
);
|
||||||
|
@ -642,9 +638,7 @@ export class PrefsDialog extends EventTarget {
|
||||||
dht_check,
|
dht_check,
|
||||||
encryption_select,
|
encryption_select,
|
||||||
lpd_check,
|
lpd_check,
|
||||||
max_peers_overall_check,
|
|
||||||
max_peers_overall_input,
|
max_peers_overall_input,
|
||||||
max_peers_per_torrent_check,
|
|
||||||
max_peers_per_torrent_input,
|
max_peers_per_torrent_input,
|
||||||
pex_check,
|
pex_check,
|
||||||
root,
|
root,
|
||||||
|
|
Loading…
Reference in a new issue