WebUI: migrate away from outdated config in ESLint

The following message appears when using the outdated value:
>[@stylistic/eslint-plugin]: You are using deprecated value(boolean) for "allowTemplateLiterals"
>in "quotes", please use "always"/"never" instead.

Also prefer using double quotes over backticks for strings.

PR #23038.
This commit is contained in:
Chocobo1
2025-07-28 04:33:50 +08:00
committed by GitHub
parent eb84e99866
commit 2c6c61cc79
5 changed files with 13 additions and 13 deletions

View File

@@ -1856,15 +1856,15 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
const pos = document.getElementById("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length;
const myinput = `<input id='text_watch_${pos}' type='text' value='${folder}'>`;
const disableInput = (sel !== "other");
const mycb = `<div class='select-watched-folder-editable'>`
const mycb = "<div class='select-watched-folder-editable'>"
+ `<select id ='cb_watch_${pos}' onchange='qBittorrent.Preferences.changeWatchFolderSelect(this);'>`
+ `<option value='watch_folder'>QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]</option>`
+ `<option value='default_folder'>QBT_TR(Default save location)QBT_TR[CONTEXT=ScanFoldersModel]</option>`
+ `<option value='other'>QBT_TR(Other...)QBT_TR[CONTEXT=ScanFoldersModel]</option>`
+ `</select>`
+ "<option value='watch_folder'>QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
+ "<option value='default_folder'>QBT_TR(Default save location)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
+ "<option value='other'>QBT_TR(Other...)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
+ "</select>"
+ `<input id='cb_watch_txt_${pos}' type='text' ${disableInput ? "hidden " : ""}/>`
+ `<img src='images/list-add.svg' id='addFolderImg_${pos}' alt='Add' style='padding-left:170px;width:16px;cursor:pointer;' onclick='qBittorrent.Preferences.addWatchFolder();'>`
+ `</div>`;
+ "</div>";
watchedFoldersTable.push([myinput, mycb]);
document.getElementById(`cb_watch_${pos}`).value = sel;