Skip to content

Commit

Permalink
Align with web wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenandrews committed Nov 27, 2018
1 parent 187edfc commit cd6b995
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 25 deletions.
9 changes: 7 additions & 2 deletions app/app/services/lang.js
Expand Up @@ -9,6 +9,7 @@ app.service('Lang', ["$sce", function($sce) {
],
_translations = {
"english" : {
"first_operation" : "This account hasn't been revealed yet, which means your next operation will incur an additional fee of 0.001150XTZ",
"error_please_enter_your_seed_words" : "Please enter your seed words",
"error_seed_words_not_valid" : "Your seed words are not valid - please check to ensure you are not missing a word/letter, and you haven't included an extra space/line break. All words must be seperated by a space.",
"error_enter_passphrase" : "Please enter your passphrase",
Expand Down Expand Up @@ -125,7 +126,8 @@ app.service('Lang', ["$sce", function($sce) {
"ledger_verify_address" : "Please verify the address on your Ledger Nano S Device",
"trezor_verify_address" : "Please verify the address on your Trezor T Device",
"ledger_retreived_address" : "We have retreived the following address from your hardware wallet",
"ledger_error_connect" : "There was an issue connecting to your hardware wallet. Please ensure your device is connected, and the Tezos Wallet app is selected.",
"ledger_error_connect" : "There was an issue connecting to your Ledger device. Please ensure your device is connected, and the Tezos Wallet app is selected.",
"trezor_error_connect" : "There was an issue connecting to your hardware wallet. Please ensure your device is connected, and you are running the latest firmware.",
"ledger_error_signing" : "There was an error signing this operation with your Ledger",
"details_dont_match" : "Sorry, those details do not match - please try again, or go back and create a new account again",
"please_enter_password" : "Please enter your password",
Expand Down Expand Up @@ -192,12 +194,13 @@ app.service('Lang', ["$sce", function($sce) {
"not_connected" : "Not Connected",
"remove_account_warning" : "You are about to remove this account from your wallet! (You can always restore this account in future by going to Options > Import)",
"yes_remove_it" : "Yes, remove it!",
"originate_warning" : "Creating a new account incurs an origination fee of ~0.257 XTZ. Do you want to continue?)",
"originate_warning" : "Creating a new account incurs a fee of ~0.260XTZ. Do you want to continue?)",
"yes_continue" : "Yes, continue!",
"new_account_originated" : "Your new account has been originated - this may take a few minutes to be included on the blockchain",
"origination_error" : "There was an error adding account. Please ensure your main account has funds available",
"loading" : "Loading...",
"copy_clipboard" : "The address has been copied to your clipboard",
"confirm" : "Confirm",
"yes_send_it" : "Yes, send it!",
"transaction_sent" : "Transaction has been sent - this may take a few minutes to be included on the blockchain",
"operation_failed" : "Operation Failed!",
Expand All @@ -209,6 +212,8 @@ app.service('Lang', ["$sce", function($sce) {
"yes_import_them" : "Yes, import them!",
"ico_restore_success" : "You have successfully restored your ICO wallet. If you have just activated your account, please note that this may take some time to show.",
"transaction_confirm_info" : "You are about to send $$XTZ to $$ - this transaction is irreversible",
"transaction_confirm_lowtz" : "You are sending to an empty implicity (tz) account - this will incur an additional fee of 0.257XTZ. Do you want to continue?",
"extra_fee" : "Additional fees!",
}

},
Expand Down
38 changes: 19 additions & 19 deletions app/app/views/main.html
Expand Up @@ -18,7 +18,7 @@
<h3 style="">{{translate("my_accounts")}}</h3>
<div class="accountsContainer">
<ul class="myAccounts">
<li class="account" ng-repeat="a in accounts track by a.address"><a ng-click="loadAccount($index)"><blocky class="avatar" seed='{{a.address}}' size='8' scale='16'></blocky> {{a.title}}<span>{{a.address}}</span></a></li>
<li class="account" ng-repeat="a in accounts track by a.address"><a ng-click="loadAccount($index)"><blocky class="avatar" seed='{{getBlocky(a.address)}}' size='8' scale='16'></blocky> {{a.title}}<span>{{a.address}}</span></a></li>
<li class="add" ><a style="padding-top: 8px!important;" ng-click="add()">{{translate("add_account")}} <i class="fa fa-plus" ></i></a></li>
</ul>
</div>
Expand All @@ -37,7 +37,7 @@ <h3 style="">{{translate("my_accounts")}}</h3>
<div class="col-md-6">
<div class="addressDetails">
<div class="blocky-container">
<blocky class="avatar" seed='{{accounts[account].address}}' size='8' scale='16'></blocky>
<blocky class="avatar" seed='{{getBlocky(accounts[account].address)}}' size='8' scale='16'></blocky>
</div>
<div class="accountOffline" ng-hide="accountLive"><i class="leftIcon fas fa-exclamation-circle"></i></div>
<h1 class="mb-20">{{accounts[account].title}}</h1>
Expand Down Expand Up @@ -75,10 +75,10 @@ <h1 class="balance">{{accountDetails.balance}} <a ng-click="refresh()"><i class=
<div class="row">
<div class="col-md-4 text-center txLeft {{(tx.source != accounts[account].address ? 'received' : 'sent')}}">
<div ng-show="tx.source != accounts[account].address">
<blocky class="avatar" seed='{{tx.source}}' size='8' scale='16'></blocky>
<blocky class="avatar" seed='{{getBlocky(tx.source)}}' size='8' scale='16'></blocky>
</div>
<div ng-show="tx.source == accounts[account].address">
<blocky class="avatar" seed='{{tx.destination}}' size='8' scale='16'></blocky>
<blocky class="avatar" seed='{{getBlocky(tx.destination)}}' size='8' scale='16'></blocky>
</div>
<span ng-show="tx.source != accounts[account].address"><strong>{{translate("received")}}</strong></span>
<span ng-show="tx.source == accounts[account].address"><strong>{{translate("sent")}}</strong></span>
Expand All @@ -103,6 +103,11 @@ <h1 class="balance">{{accountDetails.balance}} <a ng-click="refresh()"><i class=
</div>
</div>
<div role="tabpanel" class="tab-pane" id="send">
<div class="row">
<div class="col-md-12" ng-show="account == 0 && !isRevealed">
<p class="alert alert-info"><i class="leftIcon fas fa-exclamation-circle"></i><strong>{{translate("first_operation")}}</strong></p>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-md-12">
<div class="form-group">
Expand All @@ -123,13 +128,12 @@ <h1 class="balance">{{accountDetails.balance}} <a ng-click="refresh()"><i class=
</div>
<div class="col-lg-4 col-md-6">
<div class="form-group">
<label>{{translate("fee")}} mꜩ <span style="color:red;">*</span> <i class="leftIcon fas fa-question-circle" data-toggle="tooltip" data-placement="right" title="{{translate('fee_tooltip')}}" tooltip></i><a ng-show="!showCustom" style="position: absolute;right: 15px;cursor:pointer;" ng-click="customFee = fee; showCustom = true">{{translate("custom_fee")}}</a><a ng-show="showCustom" style="position: absolute;right: 15px;cursor:pointer;" ng-click="customFee = 0; showCustom = false">{{translate("fee_options")}}</a></label>
<label>{{translate("fee")}} μꜩ <span style="color:red;">*</span> <i class="leftIcon fas fa-question-circle" data-toggle="tooltip" data-placement="right" title="{{translate('fee_tooltip')}}" tooltip></i><a ng-show="!showCustom" style="position: absolute;right: 15px;cursor:pointer;" ng-click="customFee = fee; showCustom = true">{{translate("custom_fee")}}</a><a ng-show="showCustom" style="position: absolute;right: 15px;cursor:pointer;" ng-click="customFee = 0; showCustom = false">{{translate("fee_options")}}</a></label>
<input ng-show="showCustom" type="number" class="form-control" ng-model="customFee">
<select ng-show="!showCustom" class="form-control" ng-model="fee" number-select>
<option value="0">{{translate("no_fee")}} - 0ꜩ</option>
<option value="1">{{translate("low")}} - 1mꜩ</option>
<option value="5">{{translate("medium")}} - 5mꜩ</option>
<option value="50">{{translate("high")}} - 50mꜩ</option>
<option value="1420">{{translate("low")}} - 1420μꜩ</option>
<option value="2000">{{translate("medium")}} - 1500μꜩ</option>
<option value="5000">{{translate("high")}} - 30000μꜩ</option>
</select>
</div>
</div>
Expand Down Expand Up @@ -198,23 +202,19 @@ <h1 class="balance">{{accountDetails.balance}} <a ng-click="refresh()"><i class=
<select class="form-control" ng-model="delegateType">
<option value="undelegated">Undelegated</option>
<option value="">Custom</option>
<option value="tz1Tnjaxk6tbAeC2TmMApPh8UsrEVQvhHvx5">CryptoDelegate</option>
<option value="tz1iZEKy4LaAjnTmn2RuGDf2iqdAQKnRi8kY">Tezzigator</option>
<option value="tz1TDSmoZXwVevLTEvKCTHWpomG76oC9S2fJ">Tezos.Community</option>
<option value="tz1WCd2jm4uSt4vntk4vSuUWoZQGhLcDuR9q">HappyTezos</option>
<option ng-repeat="d in delegates.keys" value="{{d}}" ng-show="$index">{{delegates.names[$index]}}</option>
</select>
</div>
</div>
<div class="col-lg-4 col-md-6">
<div class="form-group">
<label>{{translate("fee")}} <span style="color:red;">*</span> <i class="leftIcon fas fa-question-circle" data-toggle="tooltip" data-placement="right" title="{{translate('fee_tooltip')}}" tooltip></i><a ng-show="!showCustom" style="position: absolute;right: 15px;cursor:pointer;" ng-click="customFee = fee; showCustom = true">{{translate("custom_fee")}}</a><a ng-show="showCustom" style="position: absolute;right: 15px;cursor:pointer;" ng-click="customFee = 0; showCustom = false">{{translate("fee_options")}}</a></label>
<label>{{translate("fee")}} μꜩ<span style="color:red;">*</span> <i class="leftIcon fas fa-question-circle" data-toggle="tooltip" data-placement="right" title="{{translate('fee_tooltip')}}" tooltip></i><a ng-show="!showCustom" style="position: absolute;right: 15px;cursor:pointer;" ng-click="customFee = fee; showCustom = true">{{translate("custom_fee")}}</a><a ng-show="showCustom" style="position: absolute;right: 15px;cursor:pointer;" ng-click="customFee = 0; showCustom = false">{{translate("fee_options")}}</a></label>
<input ng-show="showCustom" type="number" class="form-control" ng-model="customFee">
<select ng-show="!showCustom" class="form-control" ng-model="fee" number-select>
<option value="0">{{translate("no_fee")}} - 0ꜩ</option>
<option value="1">{{translate("low")}} - 1mꜩ</option>
<option value="5">{{translate("medium")}} - 5mꜩ</option>
<option value="50">{{translate("high")}} - 50mꜩ</option>
</select>
<option value="1420">{{translate("low")}} - 1420μꜩ</option>
<option value="2000">{{translate("medium")}} - 1500μꜩ</option>
<option value="5000">{{translate("high")}} - 30000μꜩ</option>
</select>
</div>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion app/app/views/new.html
Expand Up @@ -24,7 +24,11 @@ <h2>{{translate("secure_tezos_wallet")}}</h2>
</div>
<div class="row text-center mt-20">
<div class="col-md-10 col-md-offset-1">
<p>{{translate("link_hardware_wallet")}}<br /> <a ng-click="link()" class="">{{translate("link")}}</a></p>
<p>{{translate("link_hardware_wallet")}}<br /> <a ng-click="link()" class="">{{translate("link")}}</a> or <a target="_blank" href="https://tezbox.com/buy-hardware-wallet.html" class="">Get yours Today!</a></p>
<p>
<img style="height: 20px;margin-right:40px;" src="skin/images/ledger-logo.svg">
<img style="height: 20px;" src="skin/images/trezor-logo.svg">
</p>
</div>
</div>
<div class="row text-center mt-50">
Expand Down
2 changes: 1 addition & 1 deletion app/skin/js/eztz.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/skin/js/sweet-alert.min.js
Expand Up @@ -161,7 +161,7 @@
*/

function initialize() {
var sweetHTML = '<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert" tabIndex="-1"><img class="logoSmall" src="skin/images/logo.png"><div class="icon error"><span class="x-mark"><span class="line left"></span><span class="line right"></span></span></div><div class="icon warning"> <span class="body"></span> <span class="dot"></span> </div> <div class="icon info"></div> <div class="icon success"> <span class="line tip"></span> <span class="line long"></span> <div class="placeholder"></div> <div class="fix"></div> </div> <div class="icon custom"></div> <h2>Title</h2><p>Text</p><div class="buttons"><button class="cancel btn-secondary btn" tabIndex="2">Cancel</button><button class="confirm btn-primary btn" tabIndex="1">Continue</button></div></div>',
var sweetHTML = '<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert" tabIndex="-1"><img class="logoSmall" src="skin/images/logo.png"><div class="icon error"><span class="x-mark"><span class="line left"></span><span class="line right"></span></span></div><div class="icon warning"> <span class="body"></span> <span class="dot"></span> </div> <div class="icon info"></div> <div class="icon success"> <span class="line tip"></span> <span class="line long"></span> <div class="placeholder"></div> <div class="fix"></div> </div> <div class="icon custom"></div> <h2>Title</h2><p style="overflow: hidden;text-overflow: ellipsis;">Text</p><div class="buttons"><button class="cancel btn-secondary btn" tabIndex="2">Cancel</button><button class="confirm btn-primary btn" tabIndex="1">Continue</button></div></div>',
sweetWrap = document.createElement('div');

sweetWrap.innerHTML = sweetHTML;
Expand Down
10 changes: 9 additions & 1 deletion app/skin/js/tezbox.js
Expand Up @@ -23,4 +23,12 @@ if (window.clipboardData && window.clipboardData.setData) {
} finally {
document.body.removeChild(textarea);
}
}}
}}
function isJsonString(str) {
try {
j = JSON.parse(str);
} catch (e) {
return false;
}
return true;
}

0 comments on commit cd6b995

Please sign in to comment.