Fix bitpay card. Replaces the app-name in desktop
This commit is contained in:
parent
2354a46bed
commit
5e03f803de
9 changed files with 82 additions and 57 deletions
|
|
@ -13,14 +13,14 @@
|
||||||
],
|
],
|
||||||
"main": "public/index.html",
|
"main": "public/index.html",
|
||||||
"window": {
|
"window": {
|
||||||
"title": "Copay - A multisignature bitcoin wallet",
|
"title": "*NAMECASE* - *DESCRIPTION*",
|
||||||
"icon": "./public/img/icons/icon-256.png",
|
"icon": "./public/img/icons/icon-256.png",
|
||||||
"toolbar": false,
|
"toolbar": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"resizable": true,
|
"resizable": true,
|
||||||
"frame": true,
|
"frame": true,
|
||||||
"width": 800,
|
"width": 400,
|
||||||
"height": 600,
|
"height": 600,
|
||||||
"position": "center",
|
"position": "center",
|
||||||
"fullscreen": false
|
"fullscreen": false
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
<ion-view>
|
<ion-view>
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-buttons side="primary">
|
<ion-nav-buttons side="primary">
|
||||||
<button class="button back-button" ui-sref="tabs.home">
|
<button class="button button-clear" ui-sref="tabs.home">
|
||||||
<i class="icon ion-ios-arrow-thin-left"></i>
|
Close
|
||||||
</button>
|
</button>
|
||||||
</ion-nav-buttons>
|
</ion-nav-buttons>
|
||||||
<ion-nav-title>BitPay Card</ion-nav-title>
|
<ion-nav-title>BitPay Card</ion-nav-title>
|
||||||
<ion-nav-buttons side="secondary">
|
<ion-nav-buttons side="secondary">
|
||||||
<button class="button no-border" ui-sref="bitpayCard.preferences">
|
<button class="button button-clear" ui-sref="bitpayCard.preferences">
|
||||||
<i class="icon ion-gear-b"></i>
|
<i class="icon ion-gear-b"></i>
|
||||||
</button>
|
</button>
|
||||||
</ion-nav-buttons>
|
</ion-nav-buttons>
|
||||||
|
|
@ -93,8 +93,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="bitpayCard.bitpayCardAuthenticated && !bitpayCard.visaCardActivated && !addFunds">
|
<div ng-show="bitpayCard.bitpayCardAuthenticated && !bitpayCard.visaCardActivated && !addFunds">
|
||||||
<div class="oh pr">
|
<div id="bitpayCard" class="oh pr">
|
||||||
<div class="amount" ng-style="{'background-color': '#293C92'}">
|
<div class="amount">
|
||||||
<div ng-show="!loadingHistory && bitpayCard.bitpayCardCurrentBalance" ng-click="bitpayCard.update()">
|
<div ng-show="!loadingHistory && bitpayCard.bitpayCardCurrentBalance" ng-click="bitpayCard.update()">
|
||||||
<strong class="size-36">${{bitpayCard.bitpayCardCurrentBalance}}</strong>
|
<strong class="size-36">${{bitpayCard.bitpayCardCurrentBalance}}</strong>
|
||||||
<div class="size-12">Available balance</div>
|
<div class="size-12">Available balance</div>
|
||||||
|
|
@ -110,7 +110,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<select ng-model="dateRange" ng-change="bitpayCard.update(dateRange)">
|
<select class="m10" ng-model="dateRange" ng-change="bitpayCard.update(dateRange)">
|
||||||
<option value="last30Days">Recent Activity</option>
|
<option value="last30Days">Recent Activity</option>
|
||||||
<option value="lastMonth">Last Month</option>
|
<option value="lastMonth">Last Month</option>
|
||||||
<option value="all">All Activity</option>
|
<option value="all">All Activity</option>
|
||||||
|
|
@ -127,40 +127,41 @@
|
||||||
<i class="icon ion-android-sync"></i>
|
<i class="icon ion-android-sync"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div class="card list" ng-show="!loadingHistory">
|
||||||
ng-show="!loadingHistory"
|
|
||||||
ng-repeat="tx in bitpayCard.bitpayCardTransactionHistory | orderBy: ['pending','-timestamp']"
|
|
||||||
class="row"
|
|
||||||
ng-init="bitpayCard.getMerchantInfo(tx)">
|
|
||||||
<div class="col" ng-init="icon = bitpayCard.getIconName(tx)">
|
|
||||||
<img class="m5t" ng-src="img/mcc-icons/{{icon}}.svg" width="22">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col">
|
|
||||||
<div class="size-12 text-bold">
|
|
||||||
{{tx.merchant.name}}
|
|
||||||
</div>
|
|
||||||
<div class="size-12">
|
|
||||||
{{tx.merchant.city}}, {{tx.merchant.state}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
ng-init="desc = bitpayCard.processDescription(tx)"
|
ng-repeat="tx in bitpayCard.bitpayCardTransactionHistory | orderBy: ['pending','-timestamp']"
|
||||||
class="col">
|
class="item row"
|
||||||
{{desc}}
|
ng-init="bitpayCard.getMerchantInfo(tx)">
|
||||||
</div>
|
<div class="col" ng-init="icon = bitpayCard.getIconName(tx)">
|
||||||
<div class="col">
|
<img class="m5t" ng-src="img/mcc-icons/{{icon}}.svg" width="22">
|
||||||
<img ng-show="!tx.pending" ng-src="img/check.svg" width="14">
|
</div>
|
||||||
<img ng-show="tx.pending" ng-src="img/sync.svg" width="14">
|
|
||||||
</div>
|
<div class="col">
|
||||||
<div class="col text-right size-12 text-gray">
|
<div class="size-12 text-bold">
|
||||||
<div class="size-14"
|
{{tx.merchant.name}}
|
||||||
ng-class="{
|
</div>
|
||||||
'text-success': tx.amount.indexOf('-') == -1 && !tx.pending,
|
<div class="size-12">
|
||||||
'text-gray': tx.amount.indexOf('-') == -1 && tx.pending}">
|
{{tx.merchant.city}}, {{tx.merchant.state}}
|
||||||
{{tx.amount | currency:'$':2 }}
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
ng-init="desc = bitpayCard.processDescription(tx)"
|
||||||
|
class="col">
|
||||||
|
{{desc}}
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<img ng-show="!tx.pending" ng-src="img/check.svg" width="14">
|
||||||
|
<img ng-show="tx.pending" ng-src="img/sync.svg" width="14">
|
||||||
|
</div>
|
||||||
|
<div class="col text-right size-12 text-gray">
|
||||||
|
<div class="size-14"
|
||||||
|
ng-class="{
|
||||||
|
'text-success': tx.amount.indexOf('-') == -1 && !tx.pending,
|
||||||
|
'text-gray': tx.amount.indexOf('-') == -1 && tx.pending}">
|
||||||
|
{{tx.amount | currency:'$':2 }}
|
||||||
|
</div>
|
||||||
|
<time>{{tx.timestamp | amTimeAgo}}</time>
|
||||||
</div>
|
</div>
|
||||||
<time>{{tx.timestamp | amTimeAgo}}</time>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -171,7 +172,7 @@
|
||||||
ng-submit="bitpayCard.sendFunds()"
|
ng-submit="bitpayCard.sendFunds()"
|
||||||
novalidate>
|
novalidate>
|
||||||
|
|
||||||
<div class="list">
|
<div class="card list">
|
||||||
<label class="item item-input item-stacked-label">
|
<label class="item item-input item-stacked-label">
|
||||||
<span class="input-label">Amount</span>
|
<span class="input-label">Amount</span>
|
||||||
<input
|
<input
|
||||||
|
|
@ -198,14 +199,14 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<button class="button button-block button-stable"
|
<button class="button button-block button-light"
|
||||||
type="button"
|
type="button"
|
||||||
ng-click="addFunds = false">
|
ng-click="addFunds = false; fiat = null">
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<button class="button button-block"
|
<button class="button button-block button-positive"
|
||||||
ng-disabled="!fiat"
|
ng-disabled="!fiat"
|
||||||
type="submit">
|
type="submit">
|
||||||
Send
|
Send
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<span translate>Sent</span>
|
<span translate>Sent</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center m20t">
|
<div class="text-center m20t">
|
||||||
<a class="button" ng-click="cancel()" translate>OKAY</a>
|
<a class="button button-positive" ng-click="cancel()" translate>OKAY</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<span translate>Payment Proposal Created</span>
|
<span translate>Payment Proposal Created</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<a class="button" ng-click="cancel()" translate>OKAY</a>
|
<a class="button button-positive" ng-click="cancel()" translate>OKAY</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<span translate>Payment Accepted</span>
|
<span translate>Payment Accepted</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<a class="button" ng-click="cancel()" translate>OKAY</a>
|
<a class="button button-positive" ng-click="cancel()" translate>OKAY</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
<span translate>Payment Rejected</span>
|
<span translate>Payment Rejected</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<a class="button" ng-click="cancel()" translate>OKAY</a>
|
<a class="button button-positive" ng-click="cancel()" translate>OKAY</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-modal-view>
|
</ion-modal-view>
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@
|
||||||
<ion-nav-title>Preferences</ion-nav-title>
|
<ion-nav-title>Preferences</ion-nav-title>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
|
|
||||||
<ion-content ng-controller="preferencesBitpayCardController as bitpay">
|
<ion-content ng-controller="preferencesBitpayCardController">
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
<li class="item assertive" ng-click="bitpay.logout()">
|
<li class="item assertive" ng-click="logout()">
|
||||||
Log out
|
Log out
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('bitpayCardController', function($scope, $timeout, $log, lodash, bitpayCardService, configService, profileService, walletService, ongoingProcess, pbkdf2Service, moment, popupService) {
|
angular.module('copayApp.controllers').controller('bitpayCardController', function($scope, $timeout, $log, lodash, bitpayCardService, configService, profileService, walletService, ongoingProcess, pbkdf2Service, moment, popupService, gettextCatalog, bwcError) {
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var wallet;
|
var wallet;
|
||||||
|
|
@ -168,6 +168,7 @@ angular.module('copayApp.controllers').controller('bitpayCardController', functi
|
||||||
};
|
};
|
||||||
|
|
||||||
walletService.createTx(wallet, txp, function(err, createdTxp) {
|
walletService.createTx(wallet, txp, function(err, createdTxp) {
|
||||||
|
ongoingProcess.set('Processing Transaction...', false);
|
||||||
if (err) {
|
if (err) {
|
||||||
popupService.showAlert(gettextCatalog.getString('Error'), bwcError.msg(err));
|
popupService.showAlert(gettextCatalog.getString('Error'), bwcError.msg(err));
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,20 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesBitpayCardController',
|
angular.module('copayApp.controllers').controller('preferencesBitpayCardController',
|
||||||
function($scope, $ionicModal, bitpayCardService) {
|
function($scope, $state, $timeout, bitpayCardService, popupService) {
|
||||||
|
|
||||||
this.logout = function() {
|
$scope.logout = function() {
|
||||||
$ionicModal.fromTemplateUrl('views/modals/bitpay-card-confirmation.html', {
|
var title = 'Are you sure you would like to log out of your Bitpay Card account?';
|
||||||
scope: $scope,
|
popupService.showConfirm(title, null, function(res) {
|
||||||
animation: 'slide-in-up'
|
if (res) logout();
|
||||||
}).then(function(modal) {
|
});
|
||||||
$scope.bitpayCardConfirmationModal = modal;
|
};
|
||||||
$scope.bitpayCardConfirmationModal.show();
|
|
||||||
|
var logout = function() {
|
||||||
|
bitpayCardService.logout(function() {
|
||||||
|
$timeout(function() {
|
||||||
|
$state.go('bitpayCard.main');
|
||||||
|
}, 100);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -995,5 +995,6 @@ input[type=number] {
|
||||||
@import "views/add";
|
@import "views/add";
|
||||||
@import "views/tab-home";
|
@import "views/tab-home";
|
||||||
@import "views/walletDetails";
|
@import "views/walletDetails";
|
||||||
|
@import "views/bitpayCard";
|
||||||
@import 'views/onboarding/onboarding';
|
@import 'views/onboarding/onboarding';
|
||||||
@import "views/includes/walletActivity";
|
@import "views/includes/walletActivity";
|
||||||
|
|
|
||||||
16
src/sass/views/bitpayCard.scss
Normal file
16
src/sass/views/bitpayCard.scss
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#bitpayCard {
|
||||||
|
.amount {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
padding: 2rem 1rem 1.5rem 1rem;
|
||||||
|
min-height: 115px;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
border-color: #172565;
|
||||||
|
background-color: #1e3186;
|
||||||
|
background-image: linear-gradient(0deg, #172565, #172565 0%, transparent 0%);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
line-height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#walletDetails {
|
#walletDetails {
|
||||||
.bar-header {
|
.bar-header {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
background: none;
|
||||||
.title, .button {
|
.title, .button {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue