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);
|
var selectedWallet = checkSelectedWallet($scope.wallet, $scope.wallets);
|
||||||
$scope.onWalletSelect(selectedWallet);
|
$scope.onWalletSelect(selectedWallet);
|
||||||
|
|
||||||
|
$scope.showShareButton = platformInfo.isCordova ? (platformInfo.isIOS ? 'iOS' : 'Android') : null;
|
||||||
|
|
||||||
listeners = [
|
listeners = [
|
||||||
$rootScope.$on('bwsEvent', function(e, walletId, type, n) {
|
$rootScope.$on('bwsEvent', function(e, walletId, type, n) {
|
||||||
// Update current address
|
// Update current address
|
||||||
|
@ -132,8 +134,8 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
$scope.showWallets = true;
|
$scope.showWallets = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.copyToClipboard = function() {
|
$scope.shareAddress = function() {
|
||||||
if ($scope.isCordova) return 'bitcoin:' + $scope.addr;
|
if (!$scope.isCordova) return;
|
||||||
else return $scope.addr;
|
window.plugins.socialsharing.share('bitcoin:' + $scope.addr, null, null, null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,18 +21,18 @@ angular.module('copayApp.directives')
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
|
|
||||||
if (isCordova) {
|
if (isCordova) {
|
||||||
window.plugins.socialsharing.share(data, null, null, null);
|
cordova.plugins.clipboard.copy(data);
|
||||||
} else if (isNW) {
|
} else if (isNW) {
|
||||||
nodeWebkitService.writeToClipboard(data);
|
nodeWebkitService.writeToClipboard(data);
|
||||||
scope.$apply(function() {
|
|
||||||
ionicToast.show(msg, 'bottom', false, 1000);
|
|
||||||
});
|
|
||||||
} else if (clipboard.supported) {
|
} else if (clipboard.supported) {
|
||||||
clipboard.copyText(data);
|
clipboard.copyText(data);
|
||||||
scope.$apply(function() {
|
} else {
|
||||||
ionicToast.show(msg, 'bottom', false, 1000);
|
// No supported
|
||||||
});
|
return;
|
||||||
}
|
}
|
||||||
|
scope.$apply(function() {
|
||||||
|
ionicToast.show(msg, 'bottom', false, 1000);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,26 @@
|
||||||
#tab-receive {
|
#tab-receive {
|
||||||
@extend .deflash-blue;
|
@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 {
|
.address {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
@ -21,9 +42,6 @@
|
||||||
margin-top: 5%;
|
margin-top: 5%;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
.request-button {
|
|
||||||
padding-top: 20px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.incomplete {
|
.incomplete {
|
||||||
.title {
|
.title {
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
<ion-view id="tab-receive">
|
<ion-view id="tab-receive">
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-title>{{'Receive' | translate}}</ion-nav-title>
|
<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-nav-bar>
|
||||||
<ion-content scroll="false">
|
<ion-content scroll="false">
|
||||||
<article class="list card padding text-center" ng-if="!wallets[0]">
|
<article class="list card padding text-center" ng-if="!wallets[0]">
|
||||||
|
@ -19,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="address-info" ng-if="wallet && wallet.isComplete()">
|
<div class="address-info" ng-if="wallet && wallet.isComplete()">
|
||||||
<div copy-to-clipboard="copyToClipboard()">
|
<div copy-to-clipboard="addr">
|
||||||
<span ng-show="shouldShowReceiveAddressFromHardware()">
|
<span ng-show="shouldShowReceiveAddressFromHardware()">
|
||||||
<button class="button button-standard button-primary" ng-click="showReceiveAddressFromHardware()">
|
<button class="button button-standard button-primary" ng-click="showReceiveAddressFromHardware()">
|
||||||
<span translate>Show address</span>
|
<span translate>Show address</span>
|
||||||
|
@ -31,9 +40,10 @@
|
||||||
<ion-spinner ng-show="!addr" class="spinner-dark" icon="crescent"></ion-spinner>
|
<ion-spinner ng-show="!addr" class="spinner-dark" icon="crescent"></ion-spinner>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-show="addr" class="request-button">
|
<button ng-show="addr" class="button-request" ng-click="requestSpecificAmount()">
|
||||||
<button class="button button-standard button-primary button-outline button-small" ng-click="requestSpecificAmount()" translate>Request Specific amount</button>
|
<span translate>Request Specific amount</span>
|
||||||
</div>
|
<i class="icon ion-ios-arrow-right"></i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue