Add status bar
MODIFY
HiddenWallet/HiddenWallet.GUI/HiddenWallet.GUI.njsproj
HiddenWallet/HiddenWallet.GUI/HiddenWallet.GUI.njsproj
</PropertyGroup>
<ItemGroup>
<Compile Include="app\js\decryption-phase.js" />
+ <Compile Include="app\js\status.js" />
<Compile Include="app\js\wallet-phase.js" />
<Compile Include="main.js" />
<Content Include="app\css\justified-nav.css" />

MODIFY
HiddenWallet/HiddenWallet.GUI/app/js/decryption-phase.js
HiddenWallet/HiddenWallet.GUI/app/js/decryption-phase.js
var walletExists;
function decryptionPhaseShow(menuItem = "") {
+ statusShow(0, "walletDecryption");
if (menuItem === "") {
walletExists = httpGetWallet("wallet-exists").Value;
if (walletExists === true) {
@@ -128,7 +129,7 @@ function decryptWallet() {
alert(result.Message, "Could not decrypt wallet");
}
else {
- alert("Wallet is successfully decrypted!", "Success");
+ statusShow(100, "Decrypted");
walletPhaseShow("alice");
}
}
\ No newline at end of file

ADD
HiddenWallet/HiddenWallet.GUI/app/js/status.js
+function statusShow(progress, text) {
+ document.getElementById("status").innerHTML = '<div class="progress" style="margin:0"><div class="progress-bar" role="progressbar" style="width:' + progress + '%;"><span><strong>' + text + '</strong></span></div></div>';
+}
\ No newline at end of file

MODIFY
HiddenWallet/HiddenWallet.GUI/index.html
HiddenWallet/HiddenWallet.GUI/index.html
<hr />
<div id="content"> </div>
</div>
- <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
+ <div id="status" style="position:absolute; bottom:0px; width: 100%;"></div>
+ <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="app/js/decryption-phase.js"></script>
<script type="text/javascript" src="app/js/wallet-phase.js"></script>
+ <script type="text/javascript" src="app/js/status.js"></script>
</body>
</html>
\ No newline at end of file

Add status bar