From ef198858b1492ca423cce4baba0e8b989fa239c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kelemen?= Date: Thu, 27 Jan 2022 05:31:02 +0100 Subject: [PATCH] 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. --- web/src/prefs-dialog.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/web/src/prefs-dialog.js b/web/src/prefs-dialog.js index 34d4f7ad9..56ee22e58 100644 --- a/web/src/prefs-dialog.js +++ b/web/src/prefs-dialog.js @@ -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,