diff --git a/abort.html b/abort.html
new file mode 100644
index 0000000..a136425
--- /dev/null
+++ b/abort.html
@@ -0,0 +1,40 @@
+
+
+
+
+ Aborting...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Daemon exited...
+
+
+
+
+
+
diff --git a/network.html b/network.html
index eafb023..ecde17c 100644
--- a/network.html
+++ b/network.html
@@ -83,6 +83,11 @@
00.00.00.00
+
+
+
+
+
Detailed information
diff --git a/tmobile.html b/tmobile.html
index ea7327c..12dc101 100644
--- a/tmobile.html
+++ b/tmobile.html
@@ -478,7 +478,8 @@
-
+
+
Detailed information
-
diff --git a/twister_network.js b/twister_network.js
index 2974209..cfecab1 100644
--- a/twister_network.js
+++ b/twister_network.js
@@ -223,6 +223,27 @@ function setSpamMsg() {
}, {});
}
+function exitDaemon() {
+ if (confirm('Are you sure you want to exit the daemon?\nThe Twister client will stop working.')) {
+ $( ".terminate-daemon").text("Exiting...");
+ $( ".terminate-daemon").addClass("disabled");
+ $.MAL.disableButton( $( ".terminate-daemon") );
+
+ twisterRpc("stop", undefined,
+ function(args, ret) {
+ console.log("daemon exiting");
+
+ setTimeout(function _reload_after_exit() {
+ window.location.href = '/abort.html';
+ }, 2000);
+ }, {},
+ function(args, ret) {
+ console.log("error while exiting daemon");
+ }, {});
+
+ }
+}
+
// handlers common to both desktop and mobile
function interfaceNetworkHandlers() {
$( ".new-peer-addr" ).keyup( peerKeypress );
@@ -231,6 +252,7 @@ function interfaceNetworkHandlers() {
$( ".add-dns").bind( "click", addDNSClick );
$( "select.genblock").change( setGenerate );
$( ".update-spam-msg").bind( "click", setSpamMsg );
+ $( ".terminate-daemon").bind( "click", exitDaemon )
}