diff --git a/TODO.txt b/TODO.txt index 38bff9f0..82941d66 100644 --- a/TODO.txt +++ b/TODO.txt @@ -7,5 +7,4 @@ * ensure accessibility for Onionr web UI * make forward secrecy compatible with multiple devices * make uptime timer be human meaningful -* add confirm for shutdown/restart * add way to mark key as dead diff --git a/static-data/www/shared/panel.js b/static-data/www/shared/panel.js index 88e02c40..c88cf552 100755 --- a/static-data/www/shared/panel.js +++ b/static-data/www/shared/panel.js @@ -22,18 +22,22 @@ restartBtn = document.getElementById('restartNode') shutdownBtn.onclick = function(){ if (! nowebpass){ - httpGet('shutdownclean') - overlay('shutdownNotice') + if (confirm("Really shutdown Onionr?")){ + httpGet('shutdownclean') + overlay('shutdownNotice') + } } } restartBtn.onclick = function(){ if (! nowebpass){ - fetch('/restartclean', { - headers: { - "token": webpass - }}) - PNotify.notice('Node is restarting') + if (confirm("Really restart Onionr?")){ + fetch('/restartclean', { + headers: { + "token": webpass + }}) + PNotify.notice('Node is restarting') + } } }