re-adding custom network selection without interfering with other raidos
MODIFY
HiddenWallet.Gui/HiddenWallet.GUI.njsproj
HiddenWallet.Gui/HiddenWallet.GUI.njsproj
<SubType>Code</SubType>
</Content>
<Content Include="app\css\justified-nav.css" />
- <Content Include="app\css\slider.css" />
+ <Content Include="app\css\decryption-phase.css" />
<Content Include="app\html\broadcast-transaction-window.html" />
<Content Include="app\html\decryption-phase-content.html" />
<Content Include="app\html\decryption-phase-menu.html" />

ADD
HiddenWallet.Gui/app/css/decryption-phase.css
+/* hides default radiobutton style */
+input[type=radio].decryption-phase {
+ position: absolute;
+ visibility: hidden;
+ display: none;
+}
+
+label.decryption-phase {
+ display: inline-block;
+ cursor: pointer;
+ padding: 5px 10px;
+ color: #868e96;
+}
+
+input[type=radio]:checked.decryption-phase + label.decryption-phase{
+ color: #007bff;
+}
+
+label.decryption-phase + input[type=radio].decryption-phase + label.decryption-phase {
+ border-left: solid 2px #c2c6ca;
+}
+
+.radio-group.decryption-phase {
+ display: inline-block;
+ margin: 20px 0px 20px 0px;
+ overflow: hidden;
+}

DELETE
HiddenWallet.Gui/app/css/slider.css
-.switch {
- position: relative;
- display: inline-block;
- width: 160px;
- height: 34px;
-}
-
- .switch input {
- display: none;
- }
-
-.slider {
- position: absolute;
- cursor: pointer;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: #ccc;
- -webkit-transition: .4s;
- -moz-transition: .4s;
- -o-transition: .4s;
- transition: .4s;
-}
-
- .slider:before {
- position: absolute;
- content: "";
- height: 26px;
- width: 26px;
- left: 4px;
- bottom: 4px;
- background-color: white;
- -webkit-transition: .4s;
- -moz-transition: .4s;
- -o-transition: .4s;
- transition: .4s;
- }
-
-input:checked + .slider {
- background-color: #2196F3;
-}
-
-input:focus + .slider {
- box-shadow: 0 0 1px #2196F3;
-}
-
-input:checked + .slider:before {
- -webkit-transform: translateX(55px);
- -moz-transform: translateX(55px);
- -o-transform: translateX(55px);
- -ms-transform: translateX(55px);
- transform: translateX(126px);
-}
-
-/*------ ADDED CSS ---------*/
-.on {
- display: none;
-}
-
-.on, .off {
- color: white;
- position: absolute;
- transform: translate(-50%,-50%);
- top: 50%;
- left: 50%;
- font-size: 10px;
- font-family: Verdana, sans-serif;
-}
-
-input:checked + .slider .on {
- display: block;
-}
-
-input:checked + .slider .off {
- display: none;
-}
-
-/*--------- END --------*/
-
-/* Rounded sliders */
-.slider.round {
- border-radius: 34px;
-}
-
- .slider.round:before {
- border-radius: 50%;
- }

MODIFY
HiddenWallet.Gui/app/html/decryption-phase-content.html
HiddenWallet.Gui/app/html/decryption-phase-content.html
<div class="jumbotron" id="decrypt-content">
<div align="right">
- <label class="switch">
- <input type="checkbox" id="network-toggle-button">
- <span class="slider">
- <span class="on">Main Network</span>
- <span class="off">Test Network</span>
- </span>
- </label>
+ <div class="radio-group" class="decryption-phase">
+
+ <input class="decryption-phase" type="radio" id="network-radio-mainnet" name="selector" autocomplete="off">
+ <label class="decryption-phase" for="network-radio-mainnet">Main Network</label>
+
+ <input class="decryption-phase" type="radio" id="network-radio-testnet" name="selector" autocomplete="off">
+ <label class="decryption-phase" for="network-radio-testnet">Test Network</label>
+
+ </div>
</div>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" />
<br />

MODIFY
HiddenWallet.Gui/app/js/decryption-phase.ts
HiddenWallet.Gui/app/js/decryption-phase.ts
@@ -66,13 +66,18 @@ function decryptionPhaseShow(menuItem: string = "") {
}
let isMainnet: boolean = httpGetWallet("is-mainnet").Value;
- let networkToggleButton: HTMLInputElement = document.getElementById("network-toggle-button") as HTMLInputElement;
+
+ let networkRadioButtonTestnet: HTMLInputElement = document.getElementById("network-radio-testnet") as HTMLInputElement;
+ let networkRadioButtonMainnet: HTMLInputElement = document.getElementById("network-radio-mainnet") as HTMLInputElement;
+
if (isMainnet === true)
{
- networkToggleButton.checked = true;
+ networkRadioButtonMainnet.checked = true;
+ networkRadioButtonTestnet.checked = false;
}
else {
- networkToggleButton.checked = false;
+ networkRadioButtonTestnet.checked = true;
+ networkRadioButtonMainnet.checked = false;
}
}
else if (menuItem === "generate") {
@@ -215,14 +220,16 @@ function decryptWallet() {
let containerElement: Element = document.getElementsByClassName("container").item(0);
- let networkToggleButton: HTMLInputElement = document.getElementById("network-toggle-button") as HTMLInputElement;
+ let networkRadioButtonTestnet: HTMLInputElement = document.getElementById("network-radio-testnet") as HTMLInputElement;
+ let networkRadioButtonMainnet: HTMLInputElement = document.getElementById("network-radio-mainnet") as HTMLInputElement;
let network: string;
- if (networkToggleButton.checked)
+ if (networkRadioButtonMainnet.checked)
{
network = "Main";
}
- else {
+ else if (networkRadioButtonTestnet.checked)
+ {
network = "TestNet";
}

MODIFY
HiddenWallet.Gui/index.html
HiddenWallet.Gui/index.html
<link rel="stylesheet" href="app/css/justified-nav.css">
<link rel="stylesheet" href="app/css/default.css" />
- <link rel="stylesheet" href="app/css/slider.css" />
+ <link rel="stylesheet" href="app/css/decryption-phase.css" />
<link rel="stylesheet" media="all" href="node_modules/mdi/css/materialdesignicons.min.css" />
<script src="app/js/signalr-client-1.0.0-alpha2-final.min.js"></script>
<script src="app/js/status-client.js"></script>

re-adding custom network selection without interfering with other raidos