mirror of
https://github.com/transmission/transmission.git
synced 2025-12-27 13:41:17 +00:00
refactor: Qt, GTK, web client UI consistency
This commit is contained in:
2
web/public_html/transmission-app.js
generated
2
web/public_html/transmission-app.js
generated
File diff suppressed because one or more lines are too long
@@ -122,15 +122,6 @@ export class PrefsDialog extends EventTarget {
|
||||
const n = Formatter.number(value);
|
||||
element.innerHTML = `Blocklist has <span class="blocklist-size-number">${n}</span> rules`;
|
||||
setTextContent(this.elements.peers.blocklist_update_button, 'Update');
|
||||
} else if (element.tagName === 'TEXTAREA') {
|
||||
if (
|
||||
// eslint-disable-next-line eqeqeq
|
||||
element.value != value &&
|
||||
element !== document.activeElement
|
||||
) {
|
||||
element.value = value;
|
||||
element.dispatchEvent(new Event('change'));
|
||||
}
|
||||
} else {
|
||||
switch (element.type) {
|
||||
case 'checkbox':
|
||||
@@ -141,6 +132,7 @@ export class PrefsDialog extends EventTarget {
|
||||
}
|
||||
break;
|
||||
case 'text':
|
||||
case 'textarea':
|
||||
case 'url':
|
||||
case 'email':
|
||||
case 'number':
|
||||
@@ -163,6 +155,7 @@ export class PrefsDialog extends EventTarget {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
console.log(element.type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -660,19 +653,26 @@ export class PrefsDialog extends EventTarget {
|
||||
const utp_check = cal.check;
|
||||
|
||||
label = document.createElement('div');
|
||||
label.textContent = 'Default trackers';
|
||||
label.textContent = 'Default Public Trackers';
|
||||
label.classList.add('section-label');
|
||||
root.append(label);
|
||||
|
||||
label = document.createElement('label');
|
||||
label.textContent =
|
||||
'(added to new public torrents and to existing ones on reload):';
|
||||
root.append(label);
|
||||
const tracker_labels = [
|
||||
'Trackers to use on all public torrents.',
|
||||
'To add a backup URL, add it on the next line after a primary URL.',
|
||||
'To add a new primary URL, add it after a blank line.',
|
||||
];
|
||||
for (const text of tracker_labels) {
|
||||
label = document.createElement('label');
|
||||
label.classList.add('default-trackers-label');
|
||||
label.textContent = text;
|
||||
label.setAttribute('for', 'default-trackers');
|
||||
root.append(label);
|
||||
}
|
||||
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.dataset.key = 'default-trackers';
|
||||
textarea.id = 'default-trackers';
|
||||
label.setAttribute('for', textarea.id);
|
||||
root.append(textarea);
|
||||
const default_trackers_textarea = textarea;
|
||||
|
||||
|
||||
@@ -791,6 +791,11 @@ $popup-top: 61px; // TODO: ugly that this is hardcoded
|
||||
}
|
||||
}
|
||||
|
||||
#default-trackers,
|
||||
.default-trackers-label {
|
||||
grid-column: 1 / 3;
|
||||
}
|
||||
|
||||
.alt-speed-label {
|
||||
font-size: smaller;
|
||||
font-style: lighter;
|
||||
|
||||
Reference in New Issue
Block a user