mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-07 12:24:21 +00:00
Fixes to Web UI shutdown button
This commit is contained in:
parent
0fe09aa088
commit
669d5a12a2
@ -1,5 +1,6 @@
|
||||
* unreleased - - Christophe Dumez <chris@qbittorrent.org> - v3.1.0
|
||||
- FEATURE: Add command line option to daemonize qbittorrent-nox (ngaro)
|
||||
- FEATURE: Add "Shutdown qBittorrent" button to Web UI (ngaro)
|
||||
- BUGFIX: Greatly improve RSS manager performance (closes #34)
|
||||
|
||||
* Thu Aug 09 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.0
|
||||
|
@ -37,7 +37,7 @@
|
||||
<ul>
|
||||
<li><a id="uploadLink"><img class="MyMenuIcon" src="theme/list-add" width="16" height="16" onload="fixPNG(this)"/>_(&Add torrent file...)</a></li>
|
||||
<li><a id="downloadLink"><img class="MyMenuIcon" src="theme/insert-link" width="16" height="16" onload="fixPNG(this)"/>_(Add &link to torrent...)</a></li>
|
||||
|
||||
<li class="divider"><a id="shutdownLink"><img class="MyMenuIcon" src="theme/application-exit" width="16" height="16" onload="fixPNG(this)"/>_(Exit qBittorrent)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
@ -66,7 +66,6 @@
|
||||
<li><a id="aboutLink"><img class="MyMenuIcon" src="theme/help-about" width="16" height="16" onload="fixPNG(this)"/>_(&About)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="returnFalse" id="shutdownLink">_(&Shutdown)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="mochaToolbar">
|
||||
|
@ -596,6 +596,7 @@ void HttpConnection::respondCommand(const QString& command) {
|
||||
return;
|
||||
}
|
||||
if (command == "shutdown") {
|
||||
qDebug() << "Shutdown request from Web UI";
|
||||
qApp->exit();
|
||||
}
|
||||
}
|
||||
|
@ -135,6 +135,7 @@ HttpServer::HttpServer(QObject* parent) : QTcpServer(parent)
|
||||
a = tr("The following parameters are supported:");
|
||||
a = tr("Torrent path");
|
||||
a = tr("Torrent name");
|
||||
a = tr("qBittorrent has been shutdown.");
|
||||
}
|
||||
|
||||
HttpServer::~HttpServer() {
|
||||
|
@ -285,9 +285,12 @@ initializeWindows = function(){
|
||||
|
||||
addClickEvent('shutdown', function(e){
|
||||
new Event(e).stop();
|
||||
new Request({url: 'command/shutdown'}).send();
|
||||
document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>_(qBittorrent has been shutdown.)</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>_(qBittorrent has been shutdown.)</h1></body></html>"); //TODO Can someone with artistic skills put a pretty webpage here
|
||||
stop();
|
||||
new Request({url: 'command/shutdown',
|
||||
onSuccess: function() {
|
||||
document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>_(qBittorrent has been shutdown.)</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>_(qBittorrent has been shutdown.)</h1></body></html>");
|
||||
}
|
||||
}
|
||||
).send();
|
||||
});
|
||||
|
||||
// Deactivate menu header links
|
||||
|
Loading…
x
Reference in New Issue
Block a user