mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
Shutdownbutton in webui
This commit is contained in:
parent
e664047c5a
commit
2b02ec3a4e
@ -66,6 +66,7 @@
|
||||
<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"><!--TODO Can someone with artistic skills put a shutdown-icon here-->_(&Shutdown)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="mochaToolbar">
|
||||
|
@ -595,6 +595,9 @@ void HttpConnection::respondCommand(const QString& command) {
|
||||
QBtSession::instance()->recheckTorrent(m_parser.post("hash"));
|
||||
return;
|
||||
}
|
||||
if (command == "shutdown") {
|
||||
qApp->exit();
|
||||
}
|
||||
}
|
||||
|
||||
void HttpConnection::decreaseTorrentsPriority(const QStringList &hashes) {
|
||||
|
@ -283,6 +283,13 @@ 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-nox has been shutdown.</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>qBittorrent-nox has been shutdown.</h1></body></html>"); //TODO Can someone with artistic skills put a pretty webpage here
|
||||
stop();
|
||||
});
|
||||
|
||||
// Deactivate menu header links
|
||||
$$('a.returnFalse').each(function(el){
|
||||
el.addEvent('click', function(e){
|
||||
|
Loading…
x
Reference in New Issue
Block a user