Browse Source

WebUI: Add "Add to top of queue" option

PR #18660.
adaptive-webui-19844
thalieht 2 years ago committed by GitHub
parent
commit
f630d84858
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/webui/www/private/download.html
  2. 1
      src/webui/www/private/scripts/download.js
  3. 8
      src/webui/www/private/upload.html
  4. 6
      src/webui/www/private/views/preferences.html

8
src/webui/www/private/download.html

@ -79,6 +79,14 @@
<input type="checkbox" id="startTorrent" /> <input type="checkbox" id="startTorrent" />
</td> </td>
</tr> </tr>
<tr>
<td>
<label for="addToTopOfQueue">QBT_TR(Add to top of queue)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
</td>
<td>
<input type="checkbox" id="addToTopOfQueue" name="addToTopOfQueue" value="true" />
</td>
</tr>
<tr> <tr>
<td> <td>
<label for="stopCondition">QBT_TR(Stop condition:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label> <label for="stopCondition">QBT_TR(Stop condition:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>

1
src/webui/www/private/scripts/download.js

@ -73,6 +73,7 @@ window.qBittorrent.Download = (function() {
defaultSavePath = pref.save_path; defaultSavePath = pref.save_path;
$('savepath').setProperty('value', defaultSavePath); $('savepath').setProperty('value', defaultSavePath);
$('startTorrent').checked = !pref.start_paused_enabled; $('startTorrent').checked = !pref.start_paused_enabled;
$('addToTopOfQueue').checked = pref.add_to_top_of_queue;
if (pref.auto_tmm_enabled == 1) { if (pref.auto_tmm_enabled == 1) {
$('autoTMM').selectedIndex = 1; $('autoTMM').selectedIndex = 1;

8
src/webui/www/private/upload.html

@ -67,6 +67,14 @@
<input type="checkbox" id="startTorrent" /> <input type="checkbox" id="startTorrent" />
</td> </td>
</tr> </tr>
<tr>
<td>
<label for="addToTopOfQueue">QBT_TR(Add to top of queue)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>
</td>
<td>
<input type="checkbox" id="addToTopOfQueue" name="addToTopOfQueue" value="true" />
</td>
</tr>
<tr> <tr>
<td> <td>
<label for="stopCondition">QBT_TR(Stop condition:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label> <label for="stopCondition">QBT_TR(Stop condition:)QBT_TR[CONTEXT=AddNewTorrentDialog]</label>

6
src/webui/www/private/views/preferences.html

@ -54,6 +54,10 @@
<option value="NoSubfolder">QBT_TR(Don't create subfolder)QBT_TR[CONTEXT=OptionsDialog]</option> <option value="NoSubfolder">QBT_TR(Don't create subfolder)QBT_TR[CONTEXT=OptionsDialog]</option>
</select> </select>
</div> </div>
<div class="formRow">
<input type="checkbox" id="addToTopOfQueueCheckbox" />
<label for="addToTopOfQueueCheckbox">QBT_TR(Add to top of queue)QBT_TR[CONTEXT=OptionsDialog]</label>
</div>
<div class="formRow"> <div class="formRow">
<input type="checkbox" id="dontstartdownloads_checkbox" /> <input type="checkbox" id="dontstartdownloads_checkbox" />
<label for="dontstartdownloads_checkbox">QBT_TR(Do not start the download automatically)QBT_TR[CONTEXT=OptionsDialog]</label> <label for="dontstartdownloads_checkbox">QBT_TR(Do not start the download automatically)QBT_TR[CONTEXT=OptionsDialog]</label>
@ -1816,6 +1820,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
break; break;
} }
$('contentlayout_select').getChildren('option')[index].setAttribute('selected', ''); $('contentlayout_select').getChildren('option')[index].setAttribute('selected', '');
$('addToTopOfQueueCheckbox').setProperty('checked', pref.add_to_top_of_queue);
$('dontstartdownloads_checkbox').setProperty('checked', pref.start_paused_enabled); $('dontstartdownloads_checkbox').setProperty('checked', pref.start_paused_enabled);
switch (pref.torrent_stop_condition) { switch (pref.torrent_stop_condition) {
case "None": case "None":
@ -2181,6 +2186,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
// Downloads tab // Downloads tab
// When adding a torrent // When adding a torrent
settings.set('torrent_content_layout', $('contentlayout_select').getSelected()[0].getProperty('value')); settings.set('torrent_content_layout', $('contentlayout_select').getSelected()[0].getProperty('value'));
settings.set('add_to_top_of_queue', $('addToTopOfQueueCheckbox').getProperty('checked'));
settings.set('start_paused_enabled', $('dontstartdownloads_checkbox').getProperty('checked')); settings.set('start_paused_enabled', $('dontstartdownloads_checkbox').getProperty('checked'));
settings.set('torrent_stop_condition', $('stopConditionSelect').getSelected()[0].getProperty('value')); settings.set('torrent_stop_condition', $('stopConditionSelect').getSelected()[0].getProperty('value'));
settings.set('auto_delete_mode', $('deletetorrentfileafter_checkbox').getProperty('checked')); settings.set('auto_delete_mode', $('deletetorrentfileafter_checkbox').getProperty('checked'));

Loading…
Cancel
Save