WebUI: Improve torrent deletion

* Added 'Confirm when deleting torrents' option to the WebUI
* Confirm deletion dialog now uses MUI.Modal

PR #21289.
Closes #18345.
This commit is contained in:
skomerko 2024-09-13 16:28:02 +02:00 committed by GitHub
parent a0c32110f1
commit 0ea35c54a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 202 additions and 99 deletions

View file

@ -127,6 +127,8 @@ void AppController::preferencesAction()
// Language
data[u"locale"_s] = pref->getLocale();
data[u"performance_warning"_s] = session->isPerformanceWarningEnabled();
// Transfer List
data[u"confirm_torrent_deletion"_s] = pref->confirmTorrentDeletion();
// Log file
data[u"file_log_enabled"_s] = app()->isFileLoggerEnabled();
data[u"file_log_path"_s] = app()->fileLoggerPath().toString();
@ -504,6 +506,9 @@ void AppController::setPreferencesAction()
}
if (hasKey(u"performance_warning"_s))
session->setPerformanceWarningEnabled(it.value().toBool());
// Transfer List
if (hasKey(u"confirm_torrent_deletion"_s))
pref->setConfirmTorrentDeletion(it.value().toBool());
// Log file
if (hasKey(u"file_log_enabled"_s))
app()->setFileLoggerEnabled(it.value().toBool());