mirror of https://github.com/BTCPrivate/copay.git
Fix URI-payment for mobile
This commit is contained in:
parent
014390665a
commit
c2f2ad95ca
|
@ -81,7 +81,7 @@ if [ ! -d $PROJECT ]; then
|
|||
|
||||
echo "${OpenColor}${Green}* Installing plugins... ${CloseColor}"
|
||||
|
||||
cordova plugin add https://github.com/Initsogar/cordova-webintent.git
|
||||
cordova plugin add https://github.com/florentvaldelievre/virtualartifacts-webIntent.git
|
||||
checkOK
|
||||
|
||||
cordova plugin add https://github.com/wildabeast/BarcodeScanner.git
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
<div class="row m20t" ng-controller="paymentUriController as payment">
|
||||
<div class="row m20t payment-uri" ng-controller="paymentUriController as payment">
|
||||
<div class="large-12 columns" ng-init="uri = payment.checkBitcoinUri()">
|
||||
<div class="panel text-center" ng-show="!uri">
|
||||
<h1 translate>Bitcoin URI is NOT valid!</h1>
|
||||
</div>
|
||||
<div ng-show="uri">
|
||||
<h1 translate>Make a payment to</h1>
|
||||
<div class="panel size-14">
|
||||
<div class="ellipsis"><b translate>Address</b>: {{uri.address.toString()}}</div>
|
||||
<div ng-show="uri.amount"><b translate>Amount</b>: {{uri.amount}}</div>
|
||||
<div ng-show="uri.message"><b translate>Message</b>: {{uri.message}}</div>
|
||||
</div>
|
||||
<h1 translate>Select a wallet</h1>
|
||||
<h2 translate>Select a wallet</h2>
|
||||
<ul class="no-bullet" ng-init="wallets = payment.getWallets()">
|
||||
<li class="panel" ng-repeat="w in wallets">
|
||||
<a ng-click="payment.selectWallet(w.id)">
|
||||
<div class="avatar-wallet"
|
||||
ng-style="{'background-color':w.color}">{{(w.name || w.id) | limitTo: 1}}</div>
|
||||
<div class="ellipsis">{{w.name || w.id}}</div>
|
||||
<div class="size-12">{{w.m}} of {{w.n}}</div>
|
||||
</a>
|
||||
|
|
|
@ -288,8 +288,8 @@ a.missing-copayers {
|
|||
box-shadow: inset -1px 0px 1px 0px rgba(0,0,0,0.20);
|
||||
}
|
||||
|
||||
.sidebar .avatar-wallet {
|
||||
background-color: #1ABC9C;
|
||||
.sidebar .avatar-wallet, .payment-uri .avatar-wallet {
|
||||
background-color: #2C3E50;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
|
|
|
@ -36,12 +36,15 @@ angular.module('copayApp.controllers').controller('paymentUriController',
|
|||
|
||||
this.getWallets = function() {
|
||||
if (!profileService.profile) return;
|
||||
var config = configService.getSync();
|
||||
config.colorFor = config.colorFor || {};
|
||||
var ret = lodash.map(profileService.profile.credentials, function(c) {
|
||||
return {
|
||||
m: c.m,
|
||||
n: c.n,
|
||||
name: c.walletName,
|
||||
id: c.walletId,
|
||||
color: config.colorFor[c.walletId] || '#2C3E50'
|
||||
};
|
||||
});
|
||||
return lodash.sortBy(ret, 'walletName');
|
||||
|
|
|
@ -57,7 +57,9 @@ angular.element(document).ready(function() {
|
|||
|
||||
function handleBitcoinURI(url) {
|
||||
if (!url) return;
|
||||
setTimeout(function() {
|
||||
window.location = '#/uri-payment/' + url;
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
window.plugins.webintent.getUri(handleBitcoinURI);
|
||||
|
|
Loading…
Reference in New Issue