web: preferences: incomplete-dir (#2183)

* web: preferences: incomplete-dir

This minor change adds an option to enable/disable/set the folder for
downloads in progress via the web interface preferences dialog.
This commit is contained in:
Tomáš Kelemen 2022-01-27 05:31:02 +01:00 committed by GitHub
parent 4fe33496c7
commit ef198858b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 0 deletions

View File

@ -212,6 +212,24 @@ export class PrefsDialog extends EventTarget {
const download_dir = input;
let cal = PrefsDialog._createCheckAndLabel(
'incomplete-dir-div',
'Use temporary folder:'
);
cal.check.title =
'Separate folder to temporarily store downloads until they are complete.';
cal.check.dataset.key = 'incomplete-dir-enabled';
cal.label.title = cal.check.title;
root.append(cal.root);
const incomplete_dir_check = cal.check;
input = document.createElement('input');
input.type = 'text';
input.dataset.key = 'incomplete-dir';
root.append(input);
PrefsDialog._enableIfChecked(input, cal.check);
const incomplete_dir_input = input;
cal = PrefsDialog._createCheckAndLabel(
'autostart-div',
'Start when added'
);
@ -282,6 +300,8 @@ export class PrefsDialog extends EventTarget {
download_dir,
download_queue_check,
download_queue_input,
incomplete_dir_check,
incomplete_dir_input,
root,
stop_idle_check,
stop_idle_input,