mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 17:23:07 -07: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:
parent
364bcf73ee
commit
46e8ee50c8
13 changed files with 98 additions and 27 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue