Wallet/www/views/tab-send.html
2018-08-14 11:41:31 +09:00

161 lines
7.7 KiB
HTML

<ion-view id="tab-send" show-tabs>
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Send' | translate}}</ion-nav-title>
</ion-nav-bar>
<ion-content>
<div id="tab-send-header" ng-if="hasFunds">
<div class="content-frame" ng-if="fromWallet">
<div class="card card-gutter-compact">
<div class="item item-compact"><span translate>From</span>:</div>
<div class="item item-gutterless item-complex item-avatar">
<div class="item-content item-content-avatar">
<i class="icon big-icon-svg theme-circle theme-circle-services">
<div class="bg icon-wallet"
style="background-color: {{fromWallet.color}}"
></div>
</i>
<h2>{{fromWallet.name}}</h2>
<wallet-balance
display-as-fiat="{{displayBalanceAsFiat}}"
wallet-status="{{fromWallet.status}}"
wallet-cached-balance="{{fromWallet.cachedBalance}}"
wallet-cached-balance-updated-on="{{fromWallet.cachedBalanceUpdatedOn}}"
wallet-cached-status="{{fromWallet.cachedStatus}}"
total-balance-sat="{{fromWallet.status.totalBalanceSat}}"></wallet-balance>
<!--<p ng-show="vm.origin.balanceAmount">{{vm.origin.balanceAmount}} {{vm.origin.balanceCurrency}}</p>-->
<!--<formatted-amount value="{{fromWallet.status.totalBalanceStr ? fromWallet.status.totalBalanceStr : ( fromWallet.cachedBalance ? fromWallet.cachedBalance + (fromWallet.cachedBalanceUpdatedOn ? ' &middot; ' + ( fromWallet.cachedBalanceUpdatedOn * 1000 | amTimeAgo) : '') : '' ) }}"></formatted-amount>-->
</div>
</div>
</div>
</div>
<div class="send-wrapper item">
<div class="row">
<div class="input" ng-class="{'focus': searchFocus}">
<input type="text" class="search-input" placeholder="{{'Search or enter bitcoin address' | translate}}"
ng-model="formData.search" ng-change="findContact(formData.search)" ng-model-onblur
ng-focus="searchInFocus()" ng-blur="searchBlurred()">
</div>
</div>
<div class="buttons">
<div class="row">
<div class="col-40">
<button class="button button-standard button-primary button-outline button-clipboard-paste" ng-click="pasteClipboard()" ng-class="{'contains-address': clipboardHasAddress}">
<span class="icon"></span><br/>
<span class="non-address" translate>Paste Clipboard</span>
<span class="address" translate>Paste Address</span>
</button>
</div>
<div class="col-60">
<button class="button button-standard button-primary button-outline" ng-click="startWalletToWalletTransfer()">
<img src="img/icon-w2w.svg"/><br/>
<span translate>Transfer between wallets</span>
</button>
</div>
</div>
<div class="row">
<button class="button button-standard button-green button-qr" ui-sref="tabs.scan">
<span>
<img src="img/icon-scan-qr.svg"/>
<span translate>Scan QR Code</span>
</span>
</button>
</div>
</div>
</div>
</div>
<div ng-if="hasWallets && hasFunds && !hasContacts">
<div class="list sendTip">
<div class="title" translate>
Send Bitcoin faster!
</div>
<div class="subtitle">
<div ng-show="hasWallets">
<p translate>Save frequently used addresses and send them Bitcoin in just one tap</p>
</div>
<div class="padding buttons">
<a class="button-first-contact" ng-click="addContact()">
<img src="img/icon-contact-add.svg"/>
<span translate>Add your first contact</span>
</a>
</div>
</div>
</div>
</div>
<div ng-if="!checkingBalance && (!hasFunds || !hasWallets)">
<div class="list card sendTip">
<div class="title" translate>
Your Bitcoin wallet is empty
</div>
<div class="subtitle">
<div ng-show="hasWallets">
<p translate>To get started, buy Bitcoin Cash (BCH) or Bitcoin Core (BTC), or share your address.</p>
<p translate>You can receive bitcoin from any wallet or service.</p>
</div>
<div ng-show="!hasWallets" translate>To get started, you'll need to create a bitcoin wallet and get some bitcoin.</div>
<div class="padding buttons">
<button class="button button-standard button-green" ng-click="buyBitcoin()" ng-show="hasWallets" translate>Buy Bitcoin now</button>
<button class="button button-standard button-green" ng-click="createWallet()" ng-show="!hasWallets" translate>Create bitcoin wallet</button>
<button class="button button-standard button-white" ui-sref="tabs.receive" ng-show="hasWallets" translate>Show my address</button>
</div>
</div>
</div>
</div>
<div id="tab-send-contacts" class="row" ng-class="{'ios':isIOS}" ng-if="hasContacts && hasWallets && hasFunds">
<div class="col">
<div class="card contacts">
<div class="item item-icon-right item-heading">
<div translate>Contacts</div>
<div class="subtitle"><span translate>Saved frequently used addresses</span></div>
<a ng-if="hasContacts" ui-sref="tabs.send.addressbook">
<i class="icon ion-ios-plus-empty list-add-button"></i>
</a>
</div>
<div class="list">
<a class="item item-icon-left item-icon-right" ng-repeat="item in list"
ng-if="!item.isWallet && item.recipientType != 'wallet'" ng-click="sendToContact(item)">
<i class="icon big-icon-svg">
<gravatar class="send-gravatar" name="{{item.name}}" width="120" email="{{item.email}}"></gravatar>
</i>
{{item.name}}
<p>
<span>{{item.displayCoin}}</span>
</p>
<i class="icon bp-arrow-right"></i>
</a>
</div>
</div>
</div>
</div>
</ion-content>
<!--<wallet-selector-->
<!--wallet-selector-title="walletSelectorTitleFrom"-->
<!--wallet-selector-force-title="walletSelectorTitleForce"-->
<!--wallet-selector-wallets="walletsWithFunds"-->
<!--wallet-selector-selected-wallet="wallet"-->
<!--wallet-selector-show="showWallets"-->
<!--wallet-selector-on-select="onWalletSelect"-->
<!--wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">-->
<!--</wallet-selector>-->
<!--<wallet-selector-->
<!--wallet-selector-on-hide=""-->
<!--wallet-selector-title="walletSelectorTitleTo"-->
<!--wallet-selector-wallets="walletsBch"-->
<!--wallet-selector-selected-wallet="wallet"-->
<!--wallet-selector-show="showWalletsBch"-->
<!--wallet-selector-on-select="onWalletSelect"-->
<!--wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">-->
<!--</wallet-selector>-->
<!--<wallet-selector-->
<!--wallet-selector-on-hide=""-->
<!--wallet-selector-title="walletSelectorTitleTo"-->
<!--wallet-selector-wallets="walletsBtc"-->
<!--wallet-selector-selected-wallet="wallet"-->
<!--wallet-selector-show="showWalletsBtc"-->
<!--wallet-selector-on-select="onWalletSelect"-->
<!--wallet-selector-display-balance-as-fiat="displayBalanceAsFiat">-->
<!--</wallet-selector>-->
</ion-view>