mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-03-13 05:51:03 +00:00
Added confirmation popup.
This commit is contained in:
parent
5323072be7
commit
beb80b6606
@ -224,21 +224,24 @@ function setSpamMsg() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function exitDaemon() {
|
function exitDaemon() {
|
||||||
$( ".terminate-daemon").text("Exiting...");
|
if (confirm('Are you sure you want to exit the daemon?\nThe Twister client will stop working.')) {
|
||||||
$( ".terminate-daemon").addClass("disabled");
|
$( ".terminate-daemon").text("Exiting...");
|
||||||
$.MAL.disableButton( $( ".terminate-daemon") );
|
$( ".terminate-daemon").addClass("disabled");
|
||||||
|
$.MAL.disableButton( $( ".terminate-daemon") );
|
||||||
|
|
||||||
twisterRpc("stop", undefined,
|
twisterRpc("stop", undefined,
|
||||||
function(args, ret) {
|
function(args, ret) {
|
||||||
console.log("daemon exiting");
|
console.log("daemon exiting");
|
||||||
|
|
||||||
setTimeout(function _reload_after_exit() {
|
setTimeout(function _reload_after_exit() {
|
||||||
window.location.href = '/abort.html';
|
window.location.href = '/abort.html';
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}, {},
|
}, {},
|
||||||
function(args, ret) {
|
function(args, ret) {
|
||||||
console.log("error while exiting daemon");
|
console.log("error while exiting daemon");
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// handlers common to both desktop and mobile
|
// handlers common to both desktop and mobile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user