Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Commit

Permalink
Light wallet auth now displays on initial setup for custom hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
bmavity committed Jul 10, 2017
1 parent a6c1c16 commit bc9c8da
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ var UI = (function(UI, undefined) {
select.addEventListener("change", function(e) {
e.preventDefault();
if (this.value == "custom") {
document.getElementById("server_config_host").style.display = "block";
document.getElementById("server_config_host").style.display = "none";
} else {
document.getElementById("server_config_host").style.display = "none";
}
Expand Down
12 changes: 4 additions & 8 deletions app/windows/js/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ var UI = (function(UI, undefined) {
document.getElementById("host-select").addEventListener("change", function(e) {
e.preventDefault();
if (this.value == "custom") {
document.getElementById("host").style.display = "block";
document.getElementById("host-format-example").style.display = "block";
document.getElementById("custom_light_wallet").style.display = "block";
} else {
document.getElementById("host").style.display = "none";
document.getElementById("host-format-example").style.display = "none";
document.getElementById("custom_light_wallet").style.display = "none";
}
UI.updateContentSize();
});
Expand Down Expand Up @@ -142,8 +140,7 @@ var UI = (function(UI, undefined) {

if (_lightWalletHosts && _lightWalletHosts.length) {
document.getElementById("host-select").style.display = "block";
document.getElementById("host").style.display = "none";
document.getElementById("host-format-example").style.display = "none";
document.getElementById("custom_light_wallet").style.display = "none";
document.getElementById("host-select").innerHTML = "";

var content = "<option value='' data-i18n='select_your_host'>" + UI.t("select_your_host") + "</option>";
Expand All @@ -157,8 +154,7 @@ var UI = (function(UI, undefined) {
document.getElementById("host-select").innerHTML = content;
} else {
document.getElementById("host-select").style.display = "none";
document.getElementById("host").style.display = "block";
document.getElementById("host-format-example").style.display = "block";
document.getElementById("custom_light_wallet").style.display = "block";
}

UI.updateContentSize();
Expand Down
18 changes: 16 additions & 2 deletions app/windows/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,22 @@ <h1 id="title" data-i18n="choose_wallet_type"></h1>
<div id="light-node-section">
<p class="label"><span data-i18n="host"></span>: <span id="host-error" class="error"></span></p>
<p><select name="host_select" id="host-select" style="width:100%;font-size:110%"></select></p>
<p><input type="text" name="host" id="host" placeholder="" value="" style="width:100%;font-size:110%" data-i18n="[placeholder]custom_host" /></p>
<p class="note" id="host-format-example" data-i18n="add_in_following_format_example"></p>
<div id="custom_light_wallet">
<p>
<input type="text" name="host" id="host" style="width:100%;font-size:110%" data-i18n="[placeholder]custom_host" />

<div class="input-group">
<label for="light_wallet_user" data-i18n="light_wallet_user"></label>
<input type="text" name="light_wallet_user" id="light_wallet_user" />
</div>

<div class="input-group">
<label form="light_wallet_password" data-i18n="light_wallet_password"></label>
<input type="password" name="light_wallet_password" id="light_wallet_password" />
</div>
</p>
<p class="note" id="host-format-example" data-i18n="add_in_following_format_example"></p>
</div>
</div>
<div id="full-node-section">
<p class="label"><span data-i18n="server_port"></span>: <span id="port-error" class="error"></span></p>
Expand Down
4 changes: 3 additions & 1 deletion locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,5 +312,7 @@
"invalid_transaction_hash": "Invalid Transaction Hash",
"seed_character_set": "Only uppercase latin letters and the number 9 are allowed.",
"double_spend_warning": "Double Spend Warning",
"double_spend_attempt": "You are attempting to spend an already used input. You should wait for your transaction to be confirmed first before attempting to make a conflicting transaction. Do you want to continue anyway?"
"double_spend_attempt": "You are attempting to spend an already used input. You should wait for your transaction to be confirmed first before attempting to make a conflicting transaction. Do you want to continue anyway?",
"light_wallet_user":"Username",
"light_wallet_password": "Password"
}

0 comments on commit bc9c8da

Please sign in to comment.