From bf4e0df386c28246ce66afbe6f777e1665f20405 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 7 Jun 2024 02:22:57 +0800 Subject: [PATCH] WebUI: unify curly bracket usage --- src/webui/www/eslint.config.mjs | 1 + src/webui/www/private/rename_feed.html | 3 +- src/webui/www/private/rename_files.html | 43 +++++------ src/webui/www/private/scripts/client.js | 24 +++---- src/webui/www/private/scripts/contextmenu.js | 27 +++---- src/webui/www/private/scripts/download.js | 21 ++---- src/webui/www/private/scripts/dynamicTable.js | 72 +++++++++---------- src/webui/www/private/scripts/file-tree.js | 6 +- src/webui/www/private/scripts/filesystem.js | 3 +- .../www/private/scripts/localpreferences.js | 3 +- src/webui/www/private/scripts/misc.js | 6 +- src/webui/www/private/scripts/mocha-init.js | 15 ++-- src/webui/www/private/scripts/piecesbar.js | 16 ++--- src/webui/www/private/scripts/progressbar.js | 3 +- src/webui/www/private/scripts/prop-files.js | 15 ++-- src/webui/www/private/scripts/prop-general.js | 10 ++- src/webui/www/private/scripts/prop-peers.js | 3 +- .../www/private/scripts/prop-trackers.js | 3 +- .../www/private/scripts/prop-webseeds.js | 6 +- src/webui/www/private/scripts/rename-files.js | 37 +++++----- src/webui/www/private/scripts/search.js | 42 ++++++----- src/webui/www/private/scripts/speedslider.js | 6 +- src/webui/www/private/shareratio.html | 6 +- src/webui/www/private/upload.html | 3 +- src/webui/www/private/views/filters.html | 3 +- .../private/views/installsearchplugin.html | 6 +- src/webui/www/private/views/log.html | 13 ++-- src/webui/www/private/views/preferences.html | 9 +-- src/webui/www/private/views/rss.html | 9 +-- .../www/private/views/rssDownloader.html | 3 +- .../www/private/views/searchplugins.html | 9 +-- src/webui/www/private/views/transferlist.html | 3 +- 32 files changed, 177 insertions(+), 252 deletions(-) diff --git a/src/webui/www/eslint.config.mjs b/src/webui/www/eslint.config.mjs index e23d11b87..520c4e3e6 100644 --- a/src/webui/www/eslint.config.mjs +++ b/src/webui/www/eslint.config.mjs @@ -26,6 +26,7 @@ export default [ Stylistic }, rules: { + "curly": ["error", "multi-or-nest", "consistent"], "eqeqeq": "error", "guard-for-in": "error", "no-undef": "off", diff --git a/src/webui/www/private/rename_feed.html b/src/webui/www/private/rename_feed.html index 5ca63f70b..4002286d7 100644 --- a/src/webui/www/private/rename_feed.html +++ b/src/webui/www/private/rename_feed.html @@ -63,9 +63,8 @@ window.parent.qBittorrent.Client.closeWindows(); }, onFailure: (response) => { - if (response.status === 409) { + if (response.status === 409) alert(response.responseText); - } $("renameButton").disabled = false; } }).send(); diff --git a/src/webui/www/private/rename_files.html b/src/webui/www/private/rename_files.html index 6371245fa..86ecc6712 100644 --- a/src/webui/www/private/rename_files.html +++ b/src/webui/www/private/rename_files.html @@ -14,9 +14,8 @@ diff --git a/src/webui/www/private/views/filters.html b/src/webui/www/private/views/filters.html index f0ad436e5..cf73c2ba3 100644 --- a/src/webui/www/private/views/filters.html +++ b/src/webui/www/private/views/filters.html @@ -44,9 +44,8 @@