diff --git a/src/webui/api/appcontroller.cpp b/src/webui/api/appcontroller.cpp index 4f917409a..49070f5ee 100644 --- a/src/webui/api/appcontroller.cpp +++ b/src/webui/api/appcontroller.cpp @@ -119,6 +119,8 @@ void AppController::preferencesAction() data[u"file_log_delete_old"_s] = app()->isFileLoggerDeleteOld(); data[u"file_log_age"_s] = app()->fileLoggerAge(); data[u"file_log_age_type"_s] = app()->fileLoggerAgeType(); + // Delete torrent contents files on torrent removal + data[u"delete_torrent_content_files"_s] = pref->deleteTorrentFilesAsDefault(); // Downloads // When adding a torrent @@ -494,6 +496,9 @@ void AppController::setPreferencesAction() app()->setFileLoggerAge(it.value().toInt()); if (hasKey(u"file_log_age_type"_s)) app()->setFileLoggerAgeType(it.value().toInt()); + // Delete torrent content files on torrent removal + if (hasKey(u"delete_torrent_content_files"_s)) + pref->setDeleteTorrentFilesAsDefault(it.value().toBool()); // Downloads // When adding a torrent diff --git a/src/webui/webapplication.h b/src/webui/webapplication.h index 15549eb5c..bdbe78e8d 100644 --- a/src/webui/webapplication.h +++ b/src/webui/webapplication.h @@ -53,7 +53,7 @@ #include "base/utils/version.h" #include "api/isessionmanager.h" -inline const Utils::Version<3, 2> API_VERSION {2, 10, 1}; +inline const Utils::Version<3, 2> API_VERSION {2, 10, 2}; class QTimer; diff --git a/src/webui/www/.eslintrc.json b/src/webui/www/.eslintrc.json index 92f607d69..315a4f82f 100644 --- a/src/webui/www/.eslintrc.json +++ b/src/webui/www/.eslintrc.json @@ -1,7 +1,7 @@ { "env": { "browser": true, - "es2020": true + "es2021": true }, "extends": "eslint:recommended", "plugins": [ diff --git a/src/webui/www/private/confirmdeletion.html b/src/webui/www/private/confirmdeletion.html index 6ce0174e8..2170d9b51 100644 --- a/src/webui/www/private/confirmdeletion.html +++ b/src/webui/www/private/confirmdeletion.html @@ -10,10 +10,67 @@