Improved bitpay account pairing and management of paired state and data.

This commit is contained in:
Andy Phillipson 2017-01-06 12:11:47 -05:00
commit 63bc3d8f63
23 changed files with 691 additions and 208 deletions

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="1200px" height="1200px" viewBox="0 0 1200 1200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>Untitled</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group" transform="translate(196.000000, 110.000000)" fill="#FFFFFF">
<path d="M412.2,529.7 C266.2,529.7 147.3,410.9 147.3,264.8 C147.3,118.8 266.1,5.68434189e-14 412.2,5.68434189e-14 C558.2,0 677,118.8 677,264.8 C677,410.9 558.2,529.7 412.2,529.7 Z M412.2,59 C298.7,59 206.4,151.3 206.4,264.8 C206.4,378.3 298.7,470.6 412.2,470.6 C525.7,470.6 618,378.3 618,264.8 C618,151.4 525.7,59 412.2,59 Z" id="Shape"></path>
<path d="M151.9,976.1 C131.7,976.1 73.9,972.9 38.3,939.7 C-2.2,902 -0.4,839.9 1.1,821.7 C16.3,640.2 202.7,486.9 408.1,486.9 C492.4,486.9 573.6,512.1 642.8,559.6 C652.1,566 661.2,572.8 670,579.9 C682.6,590.2 684.5,608.8 674.3,621.4 C664,634 645.4,635.9 632.8,625.7 C625.3,619.6 617.4,613.7 609.5,608.2 C550.1,567.4 480.5,545.8 408.2,545.8 C232.2,545.8 72.8,674.4 60,826.5 C58,850.8 62.9,881.9 78.6,896.4 C98.7,915.2 143.4,917.5 157.3,916.8 L647,916.8 C663.3,916.8 676.5,930 676.5,946.3 C676.5,962.6 663.2,976 646.9,976 L158.6,976 C157.7,976.1 155.3,976.1 151.9,976.1 Z" id="Shape"></path>
<path d="M773.3,949.6 C773.3,962.3 763,972.7 750.2,972.7 L750.2,972.7 C737.5,972.7 727.1,962.4 727.1,949.6 L727.1,635.9 C727.1,623.2 737.4,612.8 750.2,612.8 L750.2,612.8 C762.9,612.8 773.3,623.1 773.3,635.9 L773.3,949.6 Z" id="Shape"></path>
<path d="M750.2,980 C733.4,980 719.8,966.3 719.8,949.6 L719.8,635.9 C719.8,619.1 733.5,605.5 750.2,605.5 C767,605.5 780.6,619.2 780.6,635.9 L780.6,949.6 C780.7,966.3 767,980 750.2,980 Z M750.2,620.2 C741.5,620.2 734.5,627.2 734.5,635.9 L734.5,949.6 C734.5,958.2 741.5,965.3 750.2,965.3 C758.8,965.3 765.9,958.3 765.9,949.6 L765.9,635.9 C765.9,627.2 758.9,620.2 750.2,620.2 Z" id="Shape"></path>
<path d="M907.1,769.7 C919.8,769.7 930.2,780 930.2,792.8 L930.2,792.8 C930.2,805.5 919.9,815.9 907.1,815.9 L593.4,815.9 C580.7,815.9 570.3,805.6 570.3,792.8 L570.3,792.8 C570.3,780.1 580.6,769.7 593.4,769.7 L907.1,769.7 Z" id="Shape"></path>
<path d="M907.1,823.2 L593.4,823.2 C576.6,823.2 563,809.5 563,792.8 C563,776 576.7,762.4 593.4,762.4 L907.1,762.4 C923.9,762.4 937.5,776.1 937.5,792.8 C937.5,809.5 923.9,823.2 907.1,823.2 Z M593.4,777 C584.8,777 577.7,784 577.7,792.7 C577.7,801.3 584.7,808.4 593.4,808.4 L907.1,808.4 C915.7,808.4 922.8,801.4 922.8,792.7 C922.8,784 915.8,777 907.1,777 L593.4,777 Z" id="Shape"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

14
www/img/icon-account.svg Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="1200px" height="1200px" viewBox="0 0 1200 1200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>Untitled</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group" transform="translate(196.000000, 110.000000)" fill="#FFFFFF">
<path d="M412.2,529.7 C266.2,529.7 147.3,410.9 147.3,264.8 C147.3,118.8 266.1,5.68434189e-14 412.2,5.68434189e-14 C558.2,0 677,118.8 677,264.8 C677,410.9 558.2,529.7 412.2,529.7 Z M412.2,59 C298.7,59 206.4,151.3 206.4,264.8 C206.4,378.3 298.7,470.6 412.2,470.6 C525.7,470.6 618,378.3 618,264.8 C618,151.4 525.7,59 412.2,59 Z" id="Shape"></path>
<path d="M151.9,976.1 C131.7,976.1 73.9,972.9 38.3,939.7 C-2.2,902 -0.4,839.9 1.1,821.7 C16.3,640.2 202.7,486.9 408.1,486.9 C492.4,486.9 573.6,512.1 642.8,559.6 C652.1,566 661.2,572.8 670,579.9 C682.6,590.2 684.5,608.8 674.3,621.4 C664,634 645.4,635.9 632.8,625.7 C625.3,619.6 617.4,613.7 609.5,608.2 C550.1,567.4 480.5,545.8 408.2,545.8 C232.2,545.8 72.8,674.4 60,826.5 C58,850.8 62.9,881.9 78.6,896.4 C98.7,915.2 143.4,917.5 157.3,916.8 L647,916.8 C663.3,916.8 676.5,930 676.5,946.3 C676.5,962.6 663.2,976 646.9,976 L158.6,976 C157.7,976.1 155.3,976.1 151.9,976.1 Z" id="Shape"></path>
<path d="M280.9,976.1 C260.7,976.1 202.9,972.9 167.3,939.7 C126.8,902 128.6,839.9 130.1,821.7 C145.3,640.2 331.7,486.9 537.1,486.9 C621.4,486.9 702.6,512.1 771.8,559.6 C781.1,566 790.2,572.8 799,579.9 C811.6,590.2 813.5,608.8 803.3,621.4 C793,634 774.4,635.9 761.8,625.7 C754.3,619.6 746.4,613.7 738.5,608.2 C679.1,567.4 609.5,545.8 537.2,545.8 C361.2,545.8 201.8,674.4 189,826.5 C187,850.8 191.9,881.9 207.6,896.4 C227.7,915.2 272.4,917.5 286.3,916.8 L776,916.8 C792.3,916.8 805.5,930 805.5,946.3 C805.5,962.6 792.2,976 775.9,976 L287.6,976 C286.7,976.1 284.3,976.1 280.9,976.1 Z" id="Shape-Copy" transform="translate(469.680886, 731.500000) scale(-1, 1) translate(-469.680886, -731.500000) "></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

26
www/img/icon-unlink.svg Normal file
View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>icon-link</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon-link" transform="translate(1.000000, 1.000000)" stroke="#666677">
<g id="Page-1">
<g id="Icons">
<g id="ui-24px-outline-2_link-69" transform="translate(0.384615, 0.000000)">
<g id="Group-2" transform="translate(12.000000, 12.000000)">
<path d="M0.3,5.7 L5.7,0.3" id="Shape" transform="translate(3.000000, 3.000000) scale(-1, 1) translate(-3.000000, -3.000000) "></path>
<path d="M0.3,5.7 L5.7,0.3" id="Shape"></path>
</g>
<g id="Group">
<path d="M8.1,3.6 L10.35,1.35 C12.06,-0.36 14.94,-0.36 16.65,1.35 L16.65,1.35 C18.36,3.06 18.36,5.94 16.65,7.65 L14.4,9.9" id="Shape"></path>
<path d="M9.9,14.4 L7.65,16.65 C5.94,18.36 3.06,18.36 1.35,16.65 L1.35,16.65 C-0.36,14.94 -0.36,12.06 1.35,10.35 L3.6,8.1" id="Shape"></path>
<path d="M6.3,11.7 L11.7,6.3" id="Shape"></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -39,4 +39,11 @@
</button>
</div>
</ion-content>
<account-selector
account-selector-title="accountSelectorTitle"
account-selector-accounts="accounts"
account-selector-selected-account="account"
account-selector-show="showAccounts"
account-selector-on-select="onAccountSelect">
</account-selector>
</ion-view>

View file

@ -0,0 +1,34 @@
<action-sheet action-sheet-show="show" class="account-selector">
<img class="back-arrow" src="img/icon-back-arrow.svg" ng-click="hide()">
<div class="header">{{title}}</div>
<a ng-repeat="a in accounts track by $index"
class="item item-icon-left item-big-icon-left item-icon-right account" ng-click="selectAccount(a)">
<i class="icon big-icon-svg">
<img src="img/icon-account.svg" class="bg">
</i>
<div class="account-inner">
<div class="account-details">
<div class="account-name">
{{a.firstName}} {{a.lastName}}
</div>
<p class="account-email" ng-if="a.email">
<span>{{a.email}}</span>
&nbsp;
</p>
</div>
</div>
</a>
<a class="item item-icon-left item-big-icon-left item-icon-right account" ng-click="selectAccount()">
<i class="icon big-icon-svg">
<img src="img/icon-account-add.svg" class="bg icon-add">
</i>
<div class="account-inner">
<div class="account-details">
<div class="account-add" translate>
Add account
</div>
</div>
</div>
</a>
</action-sheet>

View file

@ -1,24 +0,0 @@
<ion-view id="bitpayCardPreferences">
<ion-nav-bar class="bar-royal">
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-title>BitPay Visa&reg; Cards</ion-nav-title>
</ion-nav-bar>
<ion-content>
<div class="list">
<div class="item item-divider" translate>
Cards
</div>
<div class="item item-icon-right" ng-repeat="card in bitpayCards">
<span class="item-title">
xxxx-xxxx-xxxx-{{card.lastFourDigits}}
</span>
<span class="item-subtitle">
{{card.email}}
</span>
<i class="icon ion-trash-b icon-hotspot assertive" ng-click="remove(card)"></i>
</div>
</div>
</ion-content>
</ion-view>

View file

@ -0,0 +1,37 @@
<ion-view id="bitpayServicesPreferences">
<ion-nav-bar class="bar-royal">
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-title>BitPay</ion-nav-title>
</ion-nav-bar>
<ion-content>
<div class="list" ng-if="bitpayCards.length > 0">
<div class="item item-divider" translate>
BitPay Visa&reg; Cards
</div>
<div class="item item-icon-right" ng-repeat="card in bitpayCards">
<span class="item-title">
xxxx-xxxx-xxxx-{{card.lastFourDigits}}
</span>
<span class="item-subtitle">
{{card.email}}
</span>
<div class="icon icon-unlink icon-hotspot" ng-click="removeCard(card)"></div>
</div>
</div>
<div class="list">
<div class="item item-divider" translate>
Accounts
</div>
<div class="item item-icon-right" ng-repeat="account in bitpayAccounts">
<span class="item-title">
{{account.firstName}} {{account.lastName}}
</span>
<span class="item-subtitle">
{{account.email}}
</span>
<div class="icon icon-unlink icon-hotspot" ng-click="removeAccount(account)"></div>
</div>
</div>
</ion-content>
</ion-view>

View file

@ -117,12 +117,12 @@
</a>
<a class=" item item-icon-left item-icon-right"
ng-if="bitpayCards"
ui-sref="tabs.preferences.bitpayCard">
ng-if="bitpayAccounts || (bitpayCardEnabled && bitpayCards)"
ui-sref="tabs.preferences.bitpayServices">
<i class="icon big-icon-svg circle">
<div class="bg icon-bitpay-card"></div>
<div class="bg icon-bitpay"></div>
</i>
<span>BitPay Visa&reg; Card</span>
<span>BitPay</span>
<i class="icon bp-arrow-right"></i>
</a>