Don't let decrypting until Tor is estabilished
MODIFY
HiddenWallet/HiddenWallet.GUI/app/html/decryption-phase-content.html
HiddenWallet/HiddenWallet.GUI/app/html/decryption-phase-content.html
<div class="jumbotron" id="decrypt-content">
<input type="password" id="inputPassword" class="form-control" placeholder="Password" />
<br />
- <button id="decrypt-wallet-button" class="btn btn-lg btn-primary btn-block" onclick="decryptWallet()">Decrypt</button>
+ <button id="decrypt-wallet-button" disabled class="btn btn-lg btn-primary btn-block" onclick="decryptWallet()">Decrypt</button>
</div>
<div class="jumbotron" id="generate-content">

MODIFY
HiddenWallet/HiddenWallet.GUI/app/js/status.js
HiddenWallet/HiddenWallet.GUI/app/js/status.js
@@ -81,12 +81,22 @@ function periodicUpdate() {
if (torState.toUpperCase() === "CircuitEstabilished".toUpperCase()) {
statusShow(100, text, progressType);
+ if (document.getElementById("decrypt-wallet-button").innerText === "Waiting for Tor...") {
+ document.getElementById("decrypt-wallet-button").innerText = "Decrypt";
+ }
+ if (document.getElementById("decrypt-wallet-button").hasAttribute("disabled")) {
+ document.getElementById("decrypt-wallet-button").removeAttribute("disabled");
+ }
}
if (torState.toUpperCase() === "EstabilishingCircuit".toUpperCase()) {
statusShow(100, "Estabilishing Tor circuit...", progressType);
+ document.getElementById("decrypt-wallet-button").innerText = "Waiting for Tor...";
+ document.getElementById("decrypt-wallet-button").setAttribute("disabled");
}
if (torState.toUpperCase() === "NotStarted".toUpperCase()) {
- statusShow(100, "Tor is not running", "danger")
+ statusShow(100, "Tor is not running", "danger");
+ document.getElementById("decrypt-wallet-button").innerText = "Waiting for Tor...";
+ document.getElementById("decrypt-wallet-button").setAttribute("disabled");
}

Don't let decrypting until Tor is estabilished