mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Allow to set custom suffix to window title
This is to allow users to differentiate qbt instances when there are multiple running. PR #20429. Closes #17905.
This commit is contained in:
@@ -1157,7 +1157,8 @@ const initializeWindows = function() {
|
||||
url: 'api/v2/app/shutdown',
|
||||
method: 'post',
|
||||
onSuccess: function() {
|
||||
document.write('<!doctype html><html lang="${LANG}"><head> <meta charset="UTF-8"> <meta name="color-scheme" content="light dark" /> <title>QBT_TR(qBittorrent has been shutdown)QBT_TR[CONTEXT=HttpServer]</title></head><body> <h1 style="text-align: center;">QBT_TR(qBittorrent has been shutdown)QBT_TR[CONTEXT=HttpServer]</h1></body></html>');
|
||||
const shutdownMessage = 'QBT_TR(%1 has been shutdown)QBT_TR[CONTEXT=HttpServer]'.replace("%1", window.qBittorrent.Client.mainTitle());
|
||||
document.write(`<!doctype html><html lang="${LANG}"><head> <meta charset="UTF-8"> <meta name="color-scheme" content="light dark"> <title>${shutdownMessage}</title> <style>* {font-family: Arial, Helvetica, sans-serif;}</style></head><body> <h1 style="text-align: center;">${shutdownMessage}</h1></body></html>`);
|
||||
document.close();
|
||||
window.stop();
|
||||
window.qBittorrent.Client.stop();
|
||||
|
||||
Reference in New Issue
Block a user