mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-23 06:35:24 -07:00
Select log levels by default visually
Fixes bug where the first time visiting Execution Log view all log levels are deselected but log items with all levels are still displayed.
This commit is contained in:
parent
3ec645674a
commit
d2d089618b
1 changed files with 2 additions and 6 deletions
|
@ -188,12 +188,8 @@
|
||||||
let selectedLogLevels = JSON.parse(LocalPreferences.get("qbt_selected_log_levels")) || ["1", "2", "4", "8"];
|
let selectedLogLevels = JSON.parse(LocalPreferences.get("qbt_selected_log_levels")) || ["1", "2", "4", "8"];
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
$("logLevelSelect").getElements("option").each((x) => {
|
for (const option of $("logLevelSelect").options)
|
||||||
if (selectedLogLevels.indexOf(x.value.toString()) !== -1)
|
option.setAttribute("selected", selectedLogLevels.includes(option.value));
|
||||||
x.selected = true;
|
|
||||||
else
|
|
||||||
x.selected = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
selectBox = new vanillaSelectBox("#logLevelSelect", {
|
selectBox = new vanillaSelectBox("#logLevelSelect", {
|
||||||
maxHeight: 200,
|
maxHeight: 200,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue