mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-22 01:06:03 +03:00
parent
d87533bf4c
commit
b52fa98a02
2 changed files with 42 additions and 0 deletions
|
@ -1536,6 +1536,20 @@ window.qBittorrent.DynamicTable = (function() {
|
||||||
this._this.selectRow(this.rowId);
|
this._this.selectRow(this.rowId);
|
||||||
const row = this._this.rows.get(this.rowId);
|
const row = this._this.rows.get(this.rowId);
|
||||||
const state = row["full_data"].state;
|
const state = row["full_data"].state;
|
||||||
|
|
||||||
|
const prefKey =
|
||||||
|
(state !== "uploading")
|
||||||
|
&& (state !== "stoppedUP")
|
||||||
|
&& (state !== "forcedUP")
|
||||||
|
&& (state !== "stalledUP")
|
||||||
|
&& (state !== "queuedUP")
|
||||||
|
&& (state !== "checkingUP")
|
||||||
|
? "dblclick_download"
|
||||||
|
: "dblclick_complete";
|
||||||
|
|
||||||
|
if (LocalPreferences.get(prefKey, "1") !== "1")
|
||||||
|
return true;
|
||||||
|
|
||||||
if (state.includes("stopped"))
|
if (state.includes("stopped"))
|
||||||
startFN();
|
startFN();
|
||||||
else
|
else
|
||||||
|
|
|
@ -7,6 +7,30 @@
|
||||||
</select>
|
</select>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset class="settings">
|
||||||
|
<legend>QBT_TR(Action on double-click)QBT_TR[CONTEXT=OptionsDialog]</legend>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><label for="dblclickDownloadSelect">QBT_TR(Downloading torrents:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
|
||||||
|
<td>
|
||||||
|
<select id="dblclickDownloadSelect">
|
||||||
|
<option value="1" selected>QBT_TR(Start / Stop Torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||||
|
<option value="0">QBT_TR(No action)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label for="dblclickCompleteSelect">QBT_TR(Completed torrents:)QBT_TR[CONTEXT=OptionsDialog]</label></td>
|
||||||
|
<td>
|
||||||
|
<select id="dblclickCompleteSelect">
|
||||||
|
<option value="1" selected>QBT_TR(Start / Stop Torrent)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||||
|
<option value="0">QBT_TR(No action)QBT_TR[CONTEXT=OptionsDialog]</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<fieldset class="settings">
|
<fieldset class="settings">
|
||||||
<legend>
|
<legend>
|
||||||
<input type="checkbox" id="filelog_checkbox" onclick="qBittorrent.Preferences.updateFileLogEnabled();" />
|
<input type="checkbox" id="filelog_checkbox" onclick="qBittorrent.Preferences.updateFileLogEnabled();" />
|
||||||
|
@ -1995,6 +2019,8 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||||
window.parent.qBittorrent.Cache.preferences.init({
|
window.parent.qBittorrent.Cache.preferences.init({
|
||||||
onSuccess: (pref) => {
|
onSuccess: (pref) => {
|
||||||
// Behavior tab
|
// Behavior tab
|
||||||
|
$("dblclickDownloadSelect").value = LocalPreferences.get("dblclick_download", "1");
|
||||||
|
$("dblclickCompleteSelect").value = LocalPreferences.get("dblclick_complete", "1");
|
||||||
$("filelog_checkbox").setProperty("checked", pref.file_log_enabled);
|
$("filelog_checkbox").setProperty("checked", pref.file_log_enabled);
|
||||||
$("filelog_save_path_input").setProperty("value", pref.file_log_path);
|
$("filelog_save_path_input").setProperty("value", pref.file_log_path);
|
||||||
$("filelog_backup_checkbox").setProperty("checked", pref.file_log_backup_enabled);
|
$("filelog_backup_checkbox").setProperty("checked", pref.file_log_backup_enabled);
|
||||||
|
@ -2403,6 +2429,8 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||||
// Validate form data
|
// Validate form data
|
||||||
|
|
||||||
// Behavior tab
|
// Behavior tab
|
||||||
|
LocalPreferences.set("dblclick_download", $("dblclickDownloadSelect").value);
|
||||||
|
LocalPreferences.set("dblclick_complete", $("dblclickCompleteSelect").value);
|
||||||
settings["file_log_enabled"] = $("filelog_checkbox").getProperty("checked");
|
settings["file_log_enabled"] = $("filelog_checkbox").getProperty("checked");
|
||||||
settings["file_log_path"] = $("filelog_save_path_input").getProperty("value");
|
settings["file_log_path"] = $("filelog_save_path_input").getProperty("value");
|
||||||
settings["file_log_backup_enabled"] = $("filelog_backup_checkbox").getProperty("checked");
|
settings["file_log_backup_enabled"] = $("filelog_backup_checkbox").getProperty("checked");
|
||||||
|
|
Loading…
Reference in a new issue