mirror of https://github.com/BTCPrivate/copay.git
Ref tab-receive. Fix UI standar alignment
This commit is contained in:
parent
270a7e3373
commit
6eedcd01a6
|
@ -98,6 +98,8 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
var selectedWallet = checkSelectedWallet($scope.wallet, $scope.wallets);
|
||||
$scope.onWalletSelect(selectedWallet);
|
||||
|
||||
$scope.showShareButton = platformInfo.isCordova ? (platformInfo.isIOS ? 'iOS' : 'Android') : null;
|
||||
|
||||
listeners = [
|
||||
$rootScope.$on('bwsEvent', function(e, walletId, type, n) {
|
||||
// Update current address
|
||||
|
@ -132,8 +134,8 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
|||
$scope.showWallets = true;
|
||||
};
|
||||
|
||||
$scope.copyToClipboard = function() {
|
||||
if ($scope.isCordova) return 'bitcoin:' + $scope.addr;
|
||||
else return $scope.addr;
|
||||
$scope.shareAddress = function() {
|
||||
if (!$scope.isCordova) return;
|
||||
window.plugins.socialsharing.share('bitcoin:' + $scope.addr, null, null, null);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -21,18 +21,18 @@ angular.module('copayApp.directives')
|
|||
if (!data) return;
|
||||
|
||||
if (isCordova) {
|
||||
window.plugins.socialsharing.share(data, null, null, null);
|
||||
cordova.plugins.clipboard.copy(data);
|
||||
} else if (isNW) {
|
||||
nodeWebkitService.writeToClipboard(data);
|
||||
scope.$apply(function() {
|
||||
ionicToast.show(msg, 'bottom', false, 1000);
|
||||
});
|
||||
} else if (clipboard.supported) {
|
||||
clipboard.copyText(data);
|
||||
} else {
|
||||
// No supported
|
||||
return;
|
||||
}
|
||||
scope.$apply(function() {
|
||||
ionicToast.show(msg, 'bottom', false, 1000);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,26 @@
|
|||
#tab-receive {
|
||||
@extend .deflash-blue;
|
||||
.button-share {
|
||||
color: #fff;
|
||||
box-shadow: none;
|
||||
border-color: transparent;
|
||||
background: transparent;
|
||||
padding: 0 10px;
|
||||
.icon:before {
|
||||
font-size: 26px;
|
||||
}
|
||||
}
|
||||
.button-request {
|
||||
margin-top: 15px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 12px;
|
||||
color: $v-text-accent-color;
|
||||
i.icon {
|
||||
vertical-align: middle;
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
.address {
|
||||
background: #fff;
|
||||
overflow: auto;
|
||||
|
@ -21,9 +42,6 @@
|
|||
margin-top: 5%;
|
||||
font-size: 13px;
|
||||
}
|
||||
.request-button {
|
||||
padding-top: 20px;
|
||||
}
|
||||
}
|
||||
.incomplete {
|
||||
.title {
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
<ion-view id="tab-receive">
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-title>{{'Receive' | translate}}</ion-nav-title>
|
||||
<ion-nav-buttons side="secondary">
|
||||
<button class="button-share ng-hide" ng-show="showShareButton" ng-click="shareAddress()">
|
||||
<i class="icon"
|
||||
ng-class="{
|
||||
'ion-ios-upload-outline': showShareButton == 'iOS',
|
||||
'ion-android-share-alt': showShareButton != 'iOS'
|
||||
}"></i>
|
||||
</button>
|
||||
</ion-nav-buttons>
|
||||
</ion-nav-bar>
|
||||
<ion-content scroll="false">
|
||||
<article class="list card padding text-center" ng-if="!wallets[0]">
|
||||
|
@ -19,7 +28,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="address-info" ng-if="wallet && wallet.isComplete()">
|
||||
<div copy-to-clipboard="copyToClipboard()">
|
||||
<div copy-to-clipboard="addr">
|
||||
<span ng-show="shouldShowReceiveAddressFromHardware()">
|
||||
<button class="button button-standard button-primary" ng-click="showReceiveAddressFromHardware()">
|
||||
<span translate>Show address</span>
|
||||
|
@ -31,9 +40,10 @@
|
|||
<ion-spinner ng-show="!addr" class="spinner-dark" icon="crescent"></ion-spinner>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="addr" class="request-button">
|
||||
<button class="button button-standard button-primary button-outline button-small" ng-click="requestSpecificAmount()" translate>Request Specific amount</button>
|
||||
</div>
|
||||
<button ng-show="addr" class="button-request" ng-click="requestSpecificAmount()">
|
||||
<span translate>Request Specific amount</span>
|
||||
<i class="icon ion-ios-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
|
Loading…
Reference in New Issue