mirror of https://github.com/BTCPrivate/copay.git
homogenized modals - add addressbook modal
This commit is contained in:
parent
9fa24c9d3d
commit
df2811eeba
|
@ -0,0 +1,135 @@
|
|||
<ion-modal-view ng-controller="addressbookController as addressbookC">
|
||||
<div ng-init="wallets[0] ? selectedWalletsOpt = true : selectedWalletsOpt = false; checkClipboard()">
|
||||
<ion-content>
|
||||
<nav class="tab-bar" ng-style="{'background-color':color}">
|
||||
<section class="left-small">
|
||||
<a ng-show="!editAddressbook && !addAddressbookEntry" ng-click="cancel()" class="p10">
|
||||
<span class="text-close" translate>Close</span>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section class="middle tab-bar-section">
|
||||
<h1 class="title ellipsis">
|
||||
{{walletName}}
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<section class="right-small" ng-show="!selectedWalletsOpt" ng-click="toggleEditAddressbook()">
|
||||
<a ng-show="!editAddressbook && !addAddressbookEntry" href class="p10">
|
||||
<span class="text-close" translate>Edit</span>
|
||||
</a>
|
||||
<a ng-show="editAddressbook && !addAddressbookEntry" href class="p10">
|
||||
<span class="text-close" translate>Done</span>
|
||||
</a>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<div class="modal-content p20b">
|
||||
<div class="create-tab small-only-text-center" ng-show="!editAddressbook && !addAddressbookEntry">
|
||||
<div class="row">
|
||||
<div class="tab-container small-6 medium-3 large-2"
|
||||
ng-class="{'selected':selectedWalletsOpt}"
|
||||
ng-style="{'border-color':selectedWalletsOpt ? color : 'inherit'}"
|
||||
ng-click="selectedWalletsOpt = true">
|
||||
<a href ng-style="{'color':selectedWalletsOpt ? color : 'inherit'}" translate> My wallets</a>
|
||||
</div>
|
||||
<div class="tab-container small-6 medium-3 large-2"
|
||||
ng-class="{'selected':!selectedWalletsOpt}"
|
||||
ng-style="{'border-color':!selectedWalletsOpt ? color : 'inherit'}"
|
||||
ng-click="selectedWalletsOpt = false">
|
||||
<a href ng-style="{'color':!selectedWalletsOpt ? color : 'inherit'}" translate>My contacts</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="selectedWalletsOpt">
|
||||
<div class="onGoingProcess" ng-if="gettingAddress">
|
||||
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
|
||||
<ion-spinner class="spinner-stable" icon="lines"></ion-spinner>
|
||||
<span translate> Getting address for wallet {{selectedWalletName}} ...</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="!gettingAddress">
|
||||
<ul class="no-bullet">
|
||||
<li class="line-b" ng-repeat="w in wallets">
|
||||
<a ng-click="selectWallet(w.id, w.name)" class="db oh">
|
||||
<div class="avatar-wallet"
|
||||
ng-style="{'background-color':w.color}">
|
||||
<i class="icon-wallet size-21"></i>
|
||||
</div>
|
||||
<div class="ellipsis name-wallet text-bold">{{w.name || w.id}}
|
||||
<span class="has-error right text-light size-12" ng-show="errorSelectedWallet[w.id]">
|
||||
<i class="icon-close-circle size-14"></i>
|
||||
<span class="vm">{{errorSelectedWallet[w.id] }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="size-12">{{w.m}} of {{w.n}}
|
||||
<span ng-show="w.network=='testnet'">[Testnet]</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="!selectedWalletsOpt" class="m20b">
|
||||
<ul ng-show="!addAddressbookEntry" class="no-bullet m0" ng-init="list()">
|
||||
<li class="p10 line-b" ng-repeat="(addr, label) in list">
|
||||
<a ng-show="selectedAddressbook[addr]" class="removeAddressbook" ng-click="remove(addr)" translate>Remove</a>
|
||||
<a ng-show="editAddressbook" class="selectAddressbook" ng-click="toggleSelectAddressbook(addr)">
|
||||
<i class="fi-trash"></i></a>
|
||||
<div ng-click="selectAddressbook(addr)">
|
||||
<i class="icon-contact left size-42 m10r text-gray"></i>
|
||||
<div class="">
|
||||
<span>{{label}}</span>
|
||||
<div class="size-12 text-gray ellipsis">{{addr}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="p10" ng-show="!editAddressbook">
|
||||
<a ng-click="toggleAddAddressbookEntry()" class="p0i">
|
||||
<i class="fi-plus size-24 m20r lh icon"></i>
|
||||
<span class="size-12 tu text-bold" translate>Add a new entry</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div ng-show="addAddressbookEntry">
|
||||
<h4 translate>Add a new entry</h4>
|
||||
<form name="addressbookForm" class="p10" no-validate>
|
||||
<div class="text-warning size-12 m10b" ng-show="error" translate>{{error}}</div>
|
||||
<span ng-hide="addressbookForm.address.$pristine">
|
||||
<span class="has-error right size-12" ng-show="addressbookForm.address.$invalid && addressbook.address">
|
||||
<i class="icon-close-circle size-14"></i>
|
||||
<span class="vm" translate>Not valid</span>
|
||||
</span>
|
||||
<small class="right text-primary" ng-show="!addressbookForm.address.$invalid">
|
||||
<i class="icon-checkmark-circle size-14"></i>
|
||||
</small>
|
||||
</span>
|
||||
|
||||
<label translate>Address</label>
|
||||
<div class="input">
|
||||
<input type="text" id="address" name="address" ng-model="addressbook.address" valid-address required>
|
||||
<div class="qr-scanner-input">
|
||||
<qr-scanner on-scan="onQrCodeScanned(data, addressbookForm)" before-scan="beforeQrCodeScann()"></qr-scanner>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label translate>Label</label>
|
||||
<input type="text" id="label" name="label" ng-model="addressbook.label" required>
|
||||
<div class="row">
|
||||
<div class="columns large-6 medium-6 small-6">
|
||||
<input type="button" class="button expand outline dark-gray round" ng-click="toggleAddAddressbookEntry()" value="{{'Cancel'|translate}}">
|
||||
</div>
|
||||
<div class="columns large-6 medium-6 small-6">
|
||||
<input type="submit" class="button expand round black" ng-click="add(addressbook)" value="{{'Save'|translate}}" ng-disabled="!addressbookForm.$valid">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
</div>
|
||||
</ion-modal-view>
|
|
@ -1,150 +0,0 @@
|
|||
<div ng-init="wallets[0] ? selectedWalletsOpt = true : selectedWalletsOpt = false; checkClipboard()">
|
||||
<nav class="tab-bar" ng-style="{'background-color':color}">
|
||||
<section class="left-small">
|
||||
<a ng-show="!editAddressbook && !addAddressbookEntry" ng-click="cancel()" class="p10">
|
||||
<span class="text-close" translate>Close</span>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section class="middle tab-bar-section">
|
||||
<h1 class="title ellipsis">
|
||||
{{walletName}}
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<section class="right-small" ng-show="!selectedWalletsOpt" ng-click="toggleEditAddressbook()">
|
||||
<a ng-show="!editAddressbook && !addAddressbookEntry" href class="p10">
|
||||
<span class="text-close" translate>Edit</span>
|
||||
</a>
|
||||
<a ng-show="editAddressbook && !addAddressbookEntry" href class="p10">
|
||||
<span class="text-close" translate>Done</span>
|
||||
</a>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<div class="modal-content fix-modals-touch p20b">
|
||||
<div class="create-tab small-only-text-center" ng-show="!editAddressbook && !addAddressbookEntry">
|
||||
<div class="row">
|
||||
<div class="tab-container small-6 medium-3 large-2"
|
||||
ng-class="{'selected':selectedWalletsOpt}"
|
||||
ng-style="{'border-color':selectedWalletsOpt ? color : 'inherit'}"
|
||||
ng-click="selectedWalletsOpt = true">
|
||||
<a href
|
||||
ng-style="{'color':selectedWalletsOpt ? color : 'inherit'}" translate> My wallets</a>
|
||||
</div>
|
||||
<div class="tab-container small-6 medium-3 large-2"
|
||||
ng-class="{'selected':!selectedWalletsOpt}"
|
||||
ng-style="{'border-color':!selectedWalletsOpt ? color : 'inherit'}"
|
||||
ng-click="selectedWalletsOpt = false">
|
||||
<a href
|
||||
ng-style="{'color':!selectedWalletsOpt ? color : 'inherit'}" translate>My contacts</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="selectedWalletsOpt">
|
||||
<div class="onGoingProcess" ng-if="gettingAddress">
|
||||
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
|
||||
<ion-spinner class="spinner-stable" icon="lines"></ion-spinner>
|
||||
<span translate> Getting address for wallet {{selectedWalletName}} ...</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="!gettingAddress">
|
||||
<ul class="no-bullet">
|
||||
<li class="line-b" ng-repeat="w in wallets">
|
||||
<a ng-click="selectWallet(w.id, w.name)" class="db oh">
|
||||
<div class="avatar-wallet"
|
||||
ng-style="{'background-color':w.color}">
|
||||
<i class="icon-wallet size-21"></i>
|
||||
</div>
|
||||
<div class="ellipsis name-wallet text-bold">{{w.name || w.id}}
|
||||
<span class="has-error right text-light size-12" ng-show="errorSelectedWallet[w.id]">
|
||||
<i class="icon-close-circle size-14"></i>
|
||||
<span class="vm">{{errorSelectedWallet[w.id] }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="size-12">{{w.m}} of {{w.n}}
|
||||
<span ng-show="w.network=='testnet'">[Testnet]</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="!selectedWalletsOpt" class="m20b">
|
||||
<ul ng-show="!addAddressbookEntry" class="no-bullet m0" ng-init="list()">
|
||||
<li class="p10 line-b" ng-repeat="(addr, label) in list">
|
||||
<a ng-show="selectedAddressbook[addr]"
|
||||
class="removeAddressbook"
|
||||
ng-click="remove(addr)" translate>Remove</a>
|
||||
<a class="selectAddressbook"
|
||||
ng-show="editAddressbook"
|
||||
ng-click="toggleSelectAddressbook(addr)">
|
||||
<i class="fi-trash"></i></a>
|
||||
<div ng-click="selectAddressbook(addr)">
|
||||
|
||||
<i class="icon-contact left size-42 m10r text-gray"></i>
|
||||
<div class="">
|
||||
<span>{{label}}</span>
|
||||
<div class="size-12 text-gray ellipsis">{{addr}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="p10" ng-show="!editAddressbook">
|
||||
<a ng-click="toggleAddAddressbookEntry()" class="p0i">
|
||||
<i class="fi-plus size-24 m20r lh icon"></i>
|
||||
<span class="size-12 tu text-bold" translate>Add a new entry</span>
|
||||
<span class="size-10" ng-show="!list[newAddress] && newAddress">({{newAddress}})</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div ng-show="addAddressbookEntry">
|
||||
<h4 translate>Add a new entry</h4>
|
||||
<form name="addressbookForm" class="p10" no-validate>
|
||||
<div class="text-warning size-12 m10b" ng-show="error">{{error|translate}}</div>
|
||||
<span ng-hide="addressbookForm.address.$pristine">
|
||||
<span class="has-error right size-12" ng-show="addressbookForm.address.$invalid && addressbook.address">
|
||||
<i class="icon-close-circle size-14"></i>
|
||||
<span class="vm" translate>Not valid</span>
|
||||
</span>
|
||||
<small class="right text-primary" ng-show="!addressbookForm.address.$invalid">
|
||||
<i class="icon-checkmark-circle size-14"></i>
|
||||
</small>
|
||||
</span>
|
||||
|
||||
<label translate>Address</label>
|
||||
<div class="input">
|
||||
<input type="text" id="address" name="address" ng-model="addressbook.address" valid-address required>
|
||||
<div class="qr-scanner-input">
|
||||
<qr-scanner on-scan="onQrCodeScanned(data, addressbookForm)" before-scan="beforeQrCodeScann()"></qr-scanner>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label translate>Label</label>
|
||||
<input type="text" id="label" name="label" ng-model="addressbook.label" required>
|
||||
<div class="row">
|
||||
<div class="columns large-6 medium-6 small-6">
|
||||
<input type="button"
|
||||
class="button expand outline dark-gray round"
|
||||
ng-click="newAddress = ''; toggleAddAddressbookEntry()"
|
||||
value="{{'Cancel'|translate}}">
|
||||
</div>
|
||||
<div class="columns large-6 medium-6 small-6">
|
||||
<input type="submit"
|
||||
class="button expand round black"
|
||||
value="{{'Save'|translate}}"
|
||||
ng-disabled="!addressbookForm.$valid"
|
||||
ng-click="newAddress = ''; add(addressbook)">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="extra-margin-bottom"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,10 +1,15 @@
|
|||
<ion-modal-view ng-controller="payproController as payproC">
|
||||
<ion-header-bar align-title="center" class="bar-stable">
|
||||
<a class="m5t" ng-click="payproModal.hide()">
|
||||
<span class="text-close">{{'Close'|translate}}</span>
|
||||
</a>
|
||||
<h1 class="title" translate>Payment request</h1>
|
||||
</ion-header-bar>
|
||||
<nav class="tab-bar" ng-style="{'background-color':color}">
|
||||
<section class="left-small">
|
||||
<a ng-click="cancel()" class="p10">
|
||||
<span class="text-close" translate>Close</span>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section class="middle tab-bar-section">
|
||||
<h1 class="title" translate>Payment request</h1>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<ion-content>
|
||||
<div class="header-modal text-center">
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
<ion-modal-view>
|
||||
<ion-header-bar align-title="center" class="bar-stable">
|
||||
<a class="m5t" ng-click="modal.hide(); index.cancelSearch()">
|
||||
<span class="text-close">{{'Close'|translate}}</span>
|
||||
</a>
|
||||
<h1 class="title" translate>Search Transactions</h1>
|
||||
</ion-header-bar>
|
||||
|
||||
<ion-modal-view ng-controller="searchController">
|
||||
<ion-content>
|
||||
<nav class="tab-bar" ng-style="{'background-color':color}">
|
||||
<section class="left-small">
|
||||
<a ng-click="cancel(); index.cancelSearch()" class="p10">
|
||||
<span class="text-close" translate>Close</span>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<section class="middle tab-bar-section">
|
||||
<h1 class="title ellipsis" translate>Search Transactions</h1>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<div class="row searchBar searchLabel">
|
||||
<i class="fi-magnifying-glass size-14"></i>
|
||||
<form>
|
|
@ -1,158 +1,164 @@
|
|||
<ion-modal-view ng-controller="txDetailsController">
|
||||
<ion-header-bar align-title="center" class="bar-stable">
|
||||
<a class="m5t" ng-click="cancel()">
|
||||
<span class="text-close">{{'Close'|translate}}</span>
|
||||
</a>
|
||||
<h1 class="title ellipsis" translate>Transaction</h1>
|
||||
</ion-header-bar>
|
||||
<ion-content>
|
||||
<nav class="tab-bar" ng-style="{'background-color':color}">
|
||||
<section class="left-small">
|
||||
<a ng-click="cancel()" class="p10">
|
||||
<span class="text-close" translate>Close</span>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<ion-content class="modal-content"
|
||||
ng-class="{'status-bar-content':index.useViewManagedStatusBar}" ng-style="{'background':skin.view.viewBackground}">
|
||||
<div class="header-modal text-center" ng-init="getAlternativeAmount()"
|
||||
ng-style="{'background':skin.view.viewSectionHeaderBackground}">
|
||||
<div ng-show="btx.action != 'invalid'">
|
||||
<div ng-show="btx.action == 'received'">
|
||||
<img src="img/icon-receive-history.svg" alt="sync" width="50">
|
||||
<p class="m0 text-gray size-14" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Received</p>
|
||||
</div>
|
||||
<div ng-show="btx.action == 'sent'">
|
||||
<img src="img/icon-sent-history.svg" alt="sync" width="50">
|
||||
<p class="m0 text-gray size-14" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Sent</p>
|
||||
</div>
|
||||
<div ng-show="btx.action == 'moved'">
|
||||
<img src="img/icon-moved.svg" alt="sync" width="50">
|
||||
<p class="m0 text-gray size-14" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Moved</p>
|
||||
</div>
|
||||
<section class="middle tab-bar-section">
|
||||
<h1 class="title ellipsis" translate>Transaction</h1>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<div class="size-36" ng-style="{'color':skin.view.viewPrimaryTextColor}">
|
||||
<span ng-if="btx.action == 'received'">+</span><span ng-if="btx.action == 'sent'">-</span>{{btx.amountStr}}
|
||||
<div class="modal-content" ng-class="{'status-bar-content':index.useViewManagedStatusBar}" ng-style="{'background':skin.view.viewBackground}">
|
||||
<div class="header-modal text-center" ng-init="getAlternativeAmount()"
|
||||
ng-style="{'background':skin.view.viewSectionHeaderBackground}">
|
||||
<div ng-show="btx.action != 'invalid'">
|
||||
<div ng-show="btx.action == 'received'">
|
||||
<img src="img/icon-receive-history.svg" alt="sync" width="50">
|
||||
<p class="m0 text-gray size-14" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Received</p>
|
||||
</div>
|
||||
<div ng-show="btx.action == 'sent'">
|
||||
<img src="img/icon-sent-history.svg" alt="sync" width="50">
|
||||
<p class="m0 text-gray size-14" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Sent</p>
|
||||
</div>
|
||||
<div ng-show="btx.action == 'moved'">
|
||||
<img src="img/icon-moved.svg" alt="sync" width="50">
|
||||
<p class="m0 text-gray size-14" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Moved</p>
|
||||
</div>
|
||||
|
||||
<div class="size-36" ng-style="{'color':skin.view.viewPrimaryTextColor}">
|
||||
<span ng-if="btx.action == 'received'">+</span><span ng-if="btx.action == 'sent'">-</span>{{btx.amountStr}}
|
||||
</div>
|
||||
<div class="alternative-amount" ng-click="showRate=!showRate" ng-init="showRate = false">
|
||||
<span class="label gray radius" ng-show="!showRate && alternativeAmountStr"
|
||||
ng-style="{'color':skin.view.complementaryColor, 'background-color':skin.view.primaryColor}">
|
||||
{{alternativeAmountStr}}
|
||||
</span>
|
||||
<span class="size-12" ng-show="showRate && alternativeAmountStr"
|
||||
ng-style="{'color':skin.view.complementaryColor, 'background-color':skin.view.primaryColor}">
|
||||
{{rateStr}} ({{rateDate | amDateFormat:'MM/DD/YYYY HH:mm a'}})
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alternative-amount" ng-click="showRate=!showRate" ng-init="showRate = false">
|
||||
<span class="label gray radius" ng-show="!showRate && alternativeAmountStr"
|
||||
ng-style="{'color':skin.view.complementaryColor, 'background-color':skin.view.primaryColor}">
|
||||
{{alternativeAmountStr}}
|
||||
</span>
|
||||
<span class="size-12" ng-show="showRate && alternativeAmountStr"
|
||||
ng-style="{'color':skin.view.complementaryColor, 'background-color':skin.view.primaryColor}">
|
||||
{{rateStr}} ({{rateDate | amDateFormat:'MM/DD/YYYY HH:mm a'}})
|
||||
</span>
|
||||
<div ng-style="{'color':skin.view.viewPrimaryTextColor}" ng-show="btx.action == 'invalid'">
|
||||
-
|
||||
</div>
|
||||
</div>
|
||||
<div ng-style="{'color':skin.view.viewPrimaryTextColor}" ng-show="btx.action == 'invalid'">
|
||||
-
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="title m0" ng-style="{'color':skin.view.viewSectionHeaderColor, 'background':skin.view.viewSectionHeaderBackground}" translate>Details</h4>
|
||||
<h4 class="title m0" ng-style="{'color':skin.view.viewSectionHeaderColor, 'background':skin.view.viewSectionHeaderBackground}" translate>Details</h4>
|
||||
|
||||
<ul class="no-bullet size-14 m0">
|
||||
|
||||
<li ng-if="!btx.hasMultiplesOutputs && btx.addressTo && btx.addressTo != 'N/A'" class="line-b p10 oh" ng-click="copyToClipboard(btx.addressTo)"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>To</span>
|
||||
<span class="right" ng-style="{'color':skin.view.viewSecondaryTextColor}">
|
||||
<span ng-if="btx.merchant">
|
||||
<span ng-show="btx.merchant.pr.ca"><i class="fi-lock color-greeni"></i> {{btx.merchant.domain}}</span>
|
||||
<span ng-show="!btx.merchant.pr.ca"><i class="fi-unlock color-yellowi"></i> {{btx.merchant.domain}}</span>
|
||||
</span>
|
||||
<span ng-if="!btx.merchant">
|
||||
<span ng-show="btx.labelTo">{{btx.labelTo}}</span>
|
||||
<contact ng-show="!btx.labelTo" class="enable_text_select" address="{{btx.addressTo}}"></contact>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li ng-show="btx.hasMultiplesOutputs" class="line-b p10 oh"
|
||||
ng-click="showMultiplesOutputs = !showMultiplesOutputs"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Recipients</span>
|
||||
<span class="right" ng-style="{'color':skin.view.viewSecondaryTextColor}">{{btx.recipientCount}}
|
||||
<i ng-show="showMultiplesOutputs" class="icon-arrow-up3 size-24"></i>
|
||||
<i ng-show="!showMultiplesOutputs" class="icon-arrow-down3 size-24"></i>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<div class="line-b" ng-show="btx.hasMultiplesOutputs && showMultiplesOutputs"
|
||||
ng-repeat="output in btx.outputs"
|
||||
ng-include="'views/includes/output.html'">
|
||||
</div>
|
||||
|
||||
<li ng-if="btx.action == 'invalid'" class="line-b p10 oh"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="right" ng-style="{'color':skin.view.viewSecondaryTextColor}" translate>
|
||||
This transaction has become invalid; possibly due to a double spend attempt.
|
||||
</span>
|
||||
</li>
|
||||
<li ng-if="btx.time" class="line-b p10 oh"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Date</span>
|
||||
<span class="right enable_text_select" ng-style="{'color':skin.view.viewSecondaryTextColor}">
|
||||
<time>{{ btx.time * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time>
|
||||
<time>({{ btx.time * 1000 | amTimeAgo}})</time>
|
||||
</span>
|
||||
</li>
|
||||
<li class="line-b p10" ng-show="btx.action != 'received'" ng-click="copyToClipboard(btx.feeStr)"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Fee</span>
|
||||
<span class="right enable_text_select" ng-style="{'color':skin.view.viewSecondaryTextColor}">{{btx.feeStr}}</span>
|
||||
</li>
|
||||
<li class="line-b p10 oh" ng-show="btx.message && btx.action != 'received'" ng-click="copyToClipboard(btx.message)"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Note</span>
|
||||
<span class="right enable_text_select" ng-style="{'color':skin.view.viewSecondaryTextColor}">{{btx.message}}</span>
|
||||
</li>
|
||||
<li ng-if="btx.merchant" class="line-b p10 oh" ng-click="copyToClipboard(btx.merchant.pr.pd.memo)"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Merchant message</span>
|
||||
<span class="right enable_text_select" ng-style="{'color':skin.view.viewSecondaryTextColor}">
|
||||
{{btx.merchant.pr.pd.memo}}
|
||||
</span>
|
||||
</li>
|
||||
<li ng-if="btx.time" class="line-b p10 oh"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Confirmations</span>
|
||||
<span class="right" ng-style="{'color':skin.view.viewAlertTextColor}">
|
||||
<span ng-style="{'color':skin.view.viewAlertTextColor}" ng-show="!btx.confirmations || btx.confirmations == 0" translate>
|
||||
Unconfirmed
|
||||
</span>
|
||||
<span class="label gray radius" ng-show="btx.confirmations>0 && !btx.safeConfirmed"
|
||||
ng-style="{'color':skin.view.complementaryColor, 'background-color':skin.view.primaryColor}">
|
||||
{{btx.confirmations}}
|
||||
</span>
|
||||
<span class="label gray radius" ng-show="btx.safeConfirmed"
|
||||
ng-style="{'color':skin.view.complementaryColor, 'background-color':skin.view.primaryColor}">
|
||||
{{btx.safeConfirmed}}
|
||||
</span>
|
||||
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div ng-if="btx.actions[0] && isShared">
|
||||
<h4 class="title m0" ng-style="{'color':skin.view.viewSectionHeaderColor, 'background':skin.view.viewSectionHeaderBackground}" translate>Participants</h4>
|
||||
<ul class="no-bullet size-14 m0">
|
||||
<li class="line-b p10 text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" ng-repeat="c in btx.actions"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<i class="icon-contact size-24"></i>
|
||||
<span class="right" ng-style="{'color':skin.view.viewSecondaryTextColor}">
|
||||
<i ng-if="c.type == 'reject'" class="fi-x icon-sign x db"></i>
|
||||
<i ng-if="c.type == 'accept'" class="fi-check icon-sign check db"></i>
|
||||
|
||||
<li ng-if="!btx.hasMultiplesOutputs && btx.addressTo && btx.addressTo != 'N/A'" class="line-b p10 oh" ng-click="copyToClipboard(btx.addressTo)"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>To</span>
|
||||
<span class="right" ng-style="{'color':skin.view.viewSecondaryTextColor}">
|
||||
<span ng-if="btx.merchant">
|
||||
<span ng-show="btx.merchant.pr.ca"><i class="fi-lock color-greeni"></i> {{btx.merchant.domain}}</span>
|
||||
<span ng-show="!btx.merchant.pr.ca"><i class="fi-unlock color-yellowi"></i> {{btx.merchant.domain}}</span>
|
||||
</span>
|
||||
{{c.copayerName}} <span ng-if="c.copayerId == copayerId">({{'Me'|translate}})</span>
|
||||
<span ng-if="!btx.merchant">
|
||||
<span ng-show="btx.labelTo">{{btx.labelTo}}</span>
|
||||
<contact ng-show="!btx.labelTo" class="enable_text_select" address="{{btx.addressTo}}"></contact>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li ng-show="btx.hasMultiplesOutputs" class="line-b p10 oh"
|
||||
ng-click="showMultiplesOutputs = !showMultiplesOutputs"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Recipients</span>
|
||||
<span class="right" ng-style="{'color':skin.view.viewSecondaryTextColor}">{{btx.recipientCount}}
|
||||
<i ng-show="showMultiplesOutputs" class="icon-arrow-up3 size-24"></i>
|
||||
<i ng-show="!showMultiplesOutputs" class="icon-arrow-down3 size-24"></i>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<div class="line-b" ng-show="btx.hasMultiplesOutputs && showMultiplesOutputs"
|
||||
ng-repeat="output in btx.outputs"
|
||||
ng-include="'views/includes/output.html'">
|
||||
</div>
|
||||
|
||||
<li ng-if="btx.action == 'invalid'" class="line-b p10 oh"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="right" ng-style="{'color':skin.view.viewSecondaryTextColor}" translate>
|
||||
This transaction has become invalid; possibly due to a double spend attempt.
|
||||
</span>
|
||||
</li>
|
||||
<li ng-if="btx.time" class="line-b p10 oh"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Date</span>
|
||||
<span class="right enable_text_select" ng-style="{'color':skin.view.viewSecondaryTextColor}">
|
||||
<time>{{ btx.time * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time>
|
||||
<time>({{ btx.time * 1000 | amTimeAgo}})</time>
|
||||
</span>
|
||||
</li>
|
||||
<li class="line-b p10" ng-show="btx.action != 'received'" ng-click="copyToClipboard(btx.feeStr)"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Fee</span>
|
||||
<span class="right enable_text_select" ng-style="{'color':skin.view.viewSecondaryTextColor}">{{btx.feeStr}}</span>
|
||||
</li>
|
||||
<li class="line-b p10 oh" ng-show="btx.message && btx.action != 'received'" ng-click="copyToClipboard(btx.message)"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Note</span>
|
||||
<span class="right enable_text_select" ng-style="{'color':skin.view.viewSecondaryTextColor}">{{btx.message}}</span>
|
||||
</li>
|
||||
<li ng-if="btx.merchant" class="line-b p10 oh" ng-click="copyToClipboard(btx.merchant.pr.pd.memo)"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Merchant message</span>
|
||||
<span class="right enable_text_select" ng-style="{'color':skin.view.viewSecondaryTextColor}">
|
||||
{{btx.merchant.pr.pd.memo}}
|
||||
</span>
|
||||
</li>
|
||||
<li ng-if="btx.time" class="line-b p10 oh"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" translate>Confirmations</span>
|
||||
<span class="right" ng-style="{'color':skin.view.viewAlertTextColor}">
|
||||
<span ng-style="{'color':skin.view.viewAlertTextColor}" ng-show="!btx.confirmations || btx.confirmations == 0" translate>
|
||||
Unconfirmed
|
||||
</span>
|
||||
<span class="label gray radius" ng-show="btx.confirmations>0 && !btx.safeConfirmed"
|
||||
ng-style="{'color':skin.view.complementaryColor, 'background-color':skin.view.primaryColor}">
|
||||
{{btx.confirmations}}
|
||||
</span>
|
||||
<span class="label gray radius" ng-show="btx.safeConfirmed"
|
||||
ng-style="{'color':skin.view.complementaryColor, 'background-color':skin.view.primaryColor}">
|
||||
{{btx.safeConfirmed}}
|
||||
</span>
|
||||
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div ng-show="btx.txid" class="tx-details-blockchain">
|
||||
<div class="text-center m20t">
|
||||
<button class="button outline round dark-gray tiny"
|
||||
ng-style="{'background':skin.view.secondaryButtonBackground, 'border':skin.view.secondaryButtonBorder, 'color':skin.view.secondaryButtonTextColor}"
|
||||
ng-click="$root.openExternalLink('https://' + (getShortNetworkName() == 'test' ? 'test-' : '') + 'insight.bitpay.com/tx/' + btx.txid)">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewSecondaryTextColor}" translate>See it on the blockchain</span>
|
||||
</button>
|
||||
<div ng-if="btx.actions[0] && isShared">
|
||||
<h4 class="title m0" ng-style="{'color':skin.view.viewSectionHeaderColor, 'background':skin.view.viewSectionHeaderBackground}" translate>Participants</h4>
|
||||
<ul class="no-bullet size-14 m0">
|
||||
<li class="line-b p10 text-gray" ng-style="{'color':skin.view.viewPrimaryTextColor}" ng-repeat="c in btx.actions"
|
||||
ng-style="{'background':skin.view.viewListItemBackground, 'border-bottom-color':skin.view.viewListItemSeparatorColor}">
|
||||
<i class="icon-contact size-24"></i>
|
||||
<span class="right" ng-style="{'color':skin.view.viewSecondaryTextColor}">
|
||||
<i ng-if="c.type == 'reject'" class="fi-x icon-sign x db"></i>
|
||||
<i ng-if="c.type == 'accept'" class="fi-check icon-sign check db"></i>
|
||||
</span>
|
||||
{{c.copayerName}} <span ng-if="c.copayerId == copayerId">({{'Me'|translate}})</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="extra-margin-bottom"></div>
|
||||
<div ng-show="btx.txid" class="tx-details-blockchain">
|
||||
<div class="text-center m20t">
|
||||
<button class="button outline round dark-gray tiny"
|
||||
ng-style="{'background':skin.view.secondaryButtonBackground, 'border':skin.view.secondaryButtonBorder, 'color':skin.view.secondaryButtonTextColor}"
|
||||
ng-click="$root.openExternalLink('https://' + (getShortNetworkName() == 'test' ? 'test-' : '') + 'insight.bitpay.com/tx/' + btx.txid)">
|
||||
<span class="text-gray" ng-style="{'color':skin.view.viewSecondaryTextColor}" translate>See it on the blockchain</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="extra-margin-bottom"></div>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-modal-view>
|
|
@ -391,7 +391,7 @@
|
|||
</div>
|
||||
<a class="postfix size-12 m0 text-gray"
|
||||
ng-style="{'color':index.backgroundColor}"
|
||||
ng-click="home.openDestinationAddressModal(index.otherWallets, _address)">
|
||||
ng-click="home.openAddressbookModal(index.otherWallets, _address)">
|
||||
<i class="icon-wallet text-bold size-18"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
z-index: -1;
|
||||
}
|
||||
|
||||
.scroll {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.bct {
|
||||
background-color: transparent !important;
|
||||
margin-top: -25px;
|
||||
|
|
|
@ -0,0 +1,153 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('addressbookController', function($rootScope, $scope, $timeout, profileService, walletService, addressService, addressbookService) {
|
||||
var self = $scope.self;
|
||||
|
||||
var fc = profileService.focusedClient;
|
||||
self.lockAddress = false;
|
||||
self._address = null;
|
||||
$scope.editAddressbook = false;
|
||||
$scope.addAddressbookEntry = false;
|
||||
$scope.selectedAddressbook = {};
|
||||
$scope.newAddress = address;
|
||||
$scope.walletName = fc.credentials.walletName;
|
||||
$scope.color = fc.backgroundColor;
|
||||
$scope.addressbook = {
|
||||
'address': ($scope.newAddress || ''),
|
||||
'label': ''
|
||||
};
|
||||
|
||||
$scope.checkClipboard = function() {
|
||||
if (!$scope.newAddress) {
|
||||
getClipboard(function(value) {
|
||||
$scope.newAddress = value;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.beforeQrCodeScann = function() {
|
||||
$scope.error = null;
|
||||
$scope.addAddressbookEntry = true;
|
||||
$scope.editAddressbook = false;
|
||||
};
|
||||
|
||||
$scope.onQrCodeScanned = function(data, addressbookForm) {
|
||||
$timeout(function() {
|
||||
var form = addressbookForm;
|
||||
if (data && form) {
|
||||
data = data.replace('bitcoin:', '');
|
||||
form.address.$setViewValue(data);
|
||||
form.address.$isValid = true;
|
||||
form.address.$render();
|
||||
}
|
||||
$scope.$digest();
|
||||
}, 100);
|
||||
};
|
||||
|
||||
$scope.toggleEditAddressbook = function() {
|
||||
$scope.editAddressbook = !$scope.editAddressbook;
|
||||
$scope.selectedAddressbook = {};
|
||||
$scope.addAddressbookEntry = false;
|
||||
};
|
||||
|
||||
$scope.selectAddressbook = function(addr) {
|
||||
self.setForm(addr);
|
||||
$scope.cancel();
|
||||
};
|
||||
|
||||
$scope.toggleSelectAddressbook = function(addr) {
|
||||
$scope.selectedAddressbook[addr] = $scope.selectedAddressbook[addr] ? false : true;
|
||||
};
|
||||
|
||||
$scope.toggleAddAddressbookEntry = function() {
|
||||
$scope.error = null;
|
||||
$scope.addressbook = {
|
||||
'address': '',
|
||||
'label': ''
|
||||
};
|
||||
$scope.addAddressbookEntry = !$scope.addAddressbookEntry;
|
||||
};
|
||||
|
||||
$scope.list = function() {
|
||||
$scope.error = null;
|
||||
addressbookService.list(function(err, ab) {
|
||||
if (err) {
|
||||
$scope.error = err;
|
||||
return;
|
||||
}
|
||||
$scope.list = ab;
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.add = function(addressbook) {
|
||||
$scope.error = null;
|
||||
$timeout(function() {
|
||||
addressbookService.add(addressbook, function(err, ab) {
|
||||
if (err) {
|
||||
$scope.error = err;
|
||||
return;
|
||||
}
|
||||
$rootScope.$emit('Local/AddressbookUpdated', ab);
|
||||
$scope.list = ab;
|
||||
$scope.editAddressbook = true;
|
||||
$scope.toggleEditAddressbook();
|
||||
$scope.$digest();
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
$scope.remove = function(addr) {
|
||||
$scope.error = null;
|
||||
$timeout(function() {
|
||||
addressbookService.remove(addr, function(err, ab) {
|
||||
if (err) {
|
||||
$scope.error = err;
|
||||
return;
|
||||
}
|
||||
$rootScope.$emit('Local/AddressbookUpdated', ab);
|
||||
$scope.list = ab;
|
||||
$scope.$digest();
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
$scope.selectWallet = function(walletId, walletName) {
|
||||
var client = profileService.getClient(walletId);
|
||||
$scope.errorSelectedWallet = {};
|
||||
|
||||
walletService.isReady(client, function(err) {
|
||||
if (err) $scope.errorSelectedWallet[walletId] = err;
|
||||
else {
|
||||
$scope.gettingAddress = true;
|
||||
$scope.selectedWalletName = walletName;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
|
||||
addressService.getAddress(walletId, false, function(err, addr) {
|
||||
$scope.gettingAddress = false;
|
||||
if (err) {
|
||||
self.error = err;
|
||||
$scope.cancelAddress();
|
||||
return;
|
||||
}
|
||||
|
||||
self.setForm(addr);
|
||||
$scope.cancel();
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.cancelAddress = function() {
|
||||
self.resetForm();
|
||||
$scope.cancel();
|
||||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$scope.addressbookModal.hide();
|
||||
};
|
||||
});
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('payproController', function($scope, profileService) {
|
||||
angular.module('copayApp.controllers').controller('payproController', function($scope) {
|
||||
var self = $scope.self;
|
||||
|
||||
$scope.alternative = self.alternativeAmount;
|
||||
|
@ -11,6 +11,5 @@ angular.module('copayApp.controllers').controller('payproController', function($
|
|||
|
||||
$scope.cancel = function() {
|
||||
$scope.payproModal.hide();
|
||||
$scope.payproModal.remove();
|
||||
};
|
||||
});
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('searchController', function($scope) {
|
||||
var self = $scope.self;
|
||||
$scope.search = '';
|
||||
|
||||
$scope.cancel = function() {
|
||||
$scope.searchModal.hide();
|
||||
};
|
||||
});
|
|
@ -49,7 +49,5 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
|
||||
$scope.cancel = function() {
|
||||
$scope.txDetailsModal.hide();
|
||||
$scope.txDetailsModal.remove();
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
@ -158,178 +158,16 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
var cancel_msg = gettextCatalog.getString('Cancel');
|
||||
var confirm_msg = gettextCatalog.getString('Confirm');
|
||||
|
||||
this.openDestinationAddressModal = function(wallets, address) {
|
||||
$rootScope.modalOpened = true;
|
||||
var fc = profileService.focusedClient;
|
||||
self.lockAddress = false;
|
||||
self._address = null;
|
||||
this.openAddressbookModal = function(wallets, address) {
|
||||
$scope.wallets = wallets;
|
||||
$scope.address = address;
|
||||
$scope.self = self;
|
||||
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||
$scope.wallets = wallets;
|
||||
$scope.editAddressbook = false;
|
||||
$scope.addAddressbookEntry = false;
|
||||
$scope.selectedAddressbook = {};
|
||||
$scope.newAddress = address;
|
||||
$scope.walletName = fc.credentials.walletName;
|
||||
$scope.color = fc.backgroundColor;
|
||||
$scope.addressbook = {
|
||||
'address': ($scope.newAddress || ''),
|
||||
'label': ''
|
||||
};
|
||||
|
||||
$scope.checkClipboard = function() {
|
||||
if (!$scope.newAddress) {
|
||||
getClipboard(function(value) {
|
||||
$scope.newAddress = value;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.beforeQrCodeScann = function() {
|
||||
$scope.error = null;
|
||||
$scope.addAddressbookEntry = true;
|
||||
$scope.editAddressbook = false;
|
||||
};
|
||||
|
||||
$scope.onQrCodeScanned = function(data, addressbookForm) {
|
||||
$timeout(function() {
|
||||
var form = addressbookForm;
|
||||
if (data && form) {
|
||||
data = data.replace('bitcoin:', '');
|
||||
form.address.$setViewValue(data);
|
||||
form.address.$isValid = true;
|
||||
form.address.$render();
|
||||
}
|
||||
$scope.$digest();
|
||||
}, 100);
|
||||
};
|
||||
|
||||
$scope.selectAddressbook = function(addr) {
|
||||
$modalInstance.close(addr);
|
||||
};
|
||||
|
||||
$scope.toggleEditAddressbook = function() {
|
||||
$scope.editAddressbook = !$scope.editAddressbook;
|
||||
$scope.selectedAddressbook = {};
|
||||
$scope.addAddressbookEntry = false;
|
||||
};
|
||||
|
||||
$scope.toggleSelectAddressbook = function(addr) {
|
||||
$scope.selectedAddressbook[addr] = $scope.selectedAddressbook[addr] ? false : true;
|
||||
};
|
||||
|
||||
$scope.toggleAddAddressbookEntry = function() {
|
||||
$scope.error = null;
|
||||
$scope.addressbook = {
|
||||
'address': ($scope.newAddress || ''),
|
||||
'label': ''
|
||||
};
|
||||
$scope.addAddressbookEntry = !$scope.addAddressbookEntry;
|
||||
};
|
||||
|
||||
$scope.list = function() {
|
||||
$scope.error = null;
|
||||
addressbookService.list(function(err, ab) {
|
||||
if (err) {
|
||||
$scope.error = err;
|
||||
return;
|
||||
}
|
||||
$scope.list = ab;
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.add = function(addressbook) {
|
||||
$scope.error = null;
|
||||
$timeout(function() {
|
||||
addressbookService.add(addressbook, function(err, ab) {
|
||||
if (err) {
|
||||
$scope.error = err;
|
||||
return;
|
||||
}
|
||||
$rootScope.$emit('Local/AddressbookUpdated', ab);
|
||||
$scope.list = ab;
|
||||
$scope.editAddressbook = true;
|
||||
$scope.toggleEditAddressbook();
|
||||
$scope.$digest();
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
$scope.remove = function(addr) {
|
||||
$scope.error = null;
|
||||
$timeout(function() {
|
||||
addressbookService.remove(addr, function(err, ab) {
|
||||
if (err) {
|
||||
$scope.error = err;
|
||||
return;
|
||||
}
|
||||
$rootScope.$emit('Local/AddressbookUpdated', ab);
|
||||
$scope.list = ab;
|
||||
$scope.$digest();
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
|
||||
$scope.selectWallet = function(walletId, walletName) {
|
||||
var client = profileService.getClient(walletId);
|
||||
$scope.errorSelectedWallet = {};
|
||||
|
||||
walletService.isReady(client, function(err) {
|
||||
if (err) $scope.errorSelectedWallet[walletId] = err;
|
||||
else {
|
||||
$scope.gettingAddress = true;
|
||||
$scope.selectedWalletName = walletName;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
|
||||
addressService.getAddress(walletId, false, function(err, addr) {
|
||||
$scope.gettingAddress = false;
|
||||
|
||||
if (err) {
|
||||
self.error = err;
|
||||
$modalInstance.dismiss('cancel');
|
||||
return;
|
||||
}
|
||||
|
||||
$modalInstance.close(addr);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'views/modals/destination-address.html',
|
||||
windowClass: animationService.modalAnimated.slideUp,
|
||||
controller: ModalInstanceCtrl,
|
||||
});
|
||||
|
||||
var disableCloseModal = $rootScope.$on('closeModal', function() {
|
||||
modalInstance.dismiss('cancel');
|
||||
});
|
||||
|
||||
modalInstance.result.finally(function() {
|
||||
$rootScope.modalOpened = false;
|
||||
disableCloseModal();
|
||||
var m = angular.element(document.getElementsByClassName('reveal-modal'));
|
||||
m.addClass(animationService.modalAnimated.slideOutDown);
|
||||
});
|
||||
|
||||
modalInstance.result.then(function(addr) {
|
||||
if (addr) {
|
||||
self.setForm(addr);
|
||||
}
|
||||
}, function() {
|
||||
// onRejected
|
||||
self.resetForm();
|
||||
$ionicModal.fromTemplateUrl('views/modals/addressbook.html', {
|
||||
scope: $scope
|
||||
}).then(function(modal) {
|
||||
$scope.addressbookModal = modal;
|
||||
$scope.addressbookModal.show();
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -1063,20 +901,18 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
});
|
||||
};
|
||||
|
||||
$ionicModal.fromTemplateUrl('views/modals/searchTransactions.html', {
|
||||
scope: $scope,
|
||||
focusFirstInput: true,
|
||||
animation: 'slide-in-up'
|
||||
}).then(function(modal) {
|
||||
$scope.modal = modal;
|
||||
});
|
||||
|
||||
$scope.openSearchModal = function() {
|
||||
$scope.modal.show();
|
||||
};
|
||||
var fc = profileService.focusedClient;
|
||||
$scope.color = fc.backgroundColor;
|
||||
$scope.self = self;
|
||||
|
||||
$scope.closeModal = function() {
|
||||
$scope.modal.hide();
|
||||
$ionicModal.fromTemplateUrl('views/modals/search.html', {
|
||||
scope: $scope,
|
||||
focusFirstInput: true
|
||||
}).then(function(modal) {
|
||||
$scope.searchModal = modal;
|
||||
$scope.searchModal.show();
|
||||
});
|
||||
};
|
||||
|
||||
this.setForm = function(to, amount, comment) {
|
||||
|
@ -1136,8 +972,10 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
};
|
||||
|
||||
this.openPPModal = function(paypro) {
|
||||
$scope.paypro = paypro;
|
||||
var fc = profileService.focusedClient;
|
||||
$scope.color = fc.backgroundColor;
|
||||
$scope.self = self;
|
||||
$scope.paypro = paypro;
|
||||
|
||||
$ionicModal.fromTemplateUrl('views/modals/paypro.html', {
|
||||
scope: $scope
|
||||
|
|
|
@ -863,7 +863,7 @@ ul.manage li {
|
|||
.header-modal {
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
padding: 0.8rem;
|
||||
padding-top: 60px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
@ -1974,11 +1974,10 @@ to prevent collapsing during animation*/
|
|||
}
|
||||
|
||||
.modal-content {
|
||||
position: fixed;
|
||||
position: relative;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
top: 45px;
|
||||
padding-bottom: 50px;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
background: #f6f7f9;
|
||||
|
|
Loading…
Reference in New Issue