added confirm for restart/shutdown ui btns
This commit is contained in:
parent
7f60560cbe
commit
b10bbe7c52
1
TODO.txt
1
TODO.txt
@ -7,5 +7,4 @@
|
|||||||
* ensure accessibility for Onionr web UI
|
* ensure accessibility for Onionr web UI
|
||||||
* make forward secrecy compatible with multiple devices
|
* make forward secrecy compatible with multiple devices
|
||||||
* make uptime timer be human meaningful
|
* make uptime timer be human meaningful
|
||||||
* add confirm for shutdown/restart
|
|
||||||
* add way to mark key as dead
|
* add way to mark key as dead
|
||||||
|
@ -22,13 +22,16 @@ restartBtn = document.getElementById('restartNode')
|
|||||||
|
|
||||||
shutdownBtn.onclick = function(){
|
shutdownBtn.onclick = function(){
|
||||||
if (! nowebpass){
|
if (! nowebpass){
|
||||||
|
if (confirm("Really shutdown Onionr?")){
|
||||||
httpGet('shutdownclean')
|
httpGet('shutdownclean')
|
||||||
overlay('shutdownNotice')
|
overlay('shutdownNotice')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
restartBtn.onclick = function(){
|
restartBtn.onclick = function(){
|
||||||
if (! nowebpass){
|
if (! nowebpass){
|
||||||
|
if (confirm("Really restart Onionr?")){
|
||||||
fetch('/restartclean', {
|
fetch('/restartclean', {
|
||||||
headers: {
|
headers: {
|
||||||
"token": webpass
|
"token": webpass
|
||||||
@ -36,4 +39,5 @@ restartBtn.onclick = function(){
|
|||||||
PNotify.notice('Node is restarting')
|
PNotify.notice('Node is restarting')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user