This commit is contained in:
Marty Alcala 2016-11-10 18:12:40 -05:00
parent 1153f942ac
commit 3babc0c47d
5 changed files with 38 additions and 174 deletions

View File

@ -53,7 +53,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
force: !!force,
}, function(err, status) {
$scope.updatingStatus = false;
console.log('status', status);
if (err) {
if (err === 'WALLET_NOT_REGISTERED') {
$scope.walletNotRegistered = true;
@ -150,7 +149,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.txHistory = $scope.completeTxHistory.slice(0, (currentTxHistoryPage + 1) * HISTORY_SHOW_LIMIT);
$scope.txHistoryShowMore = $scope.completeTxHistory.length > $scope.txHistory.length;
}
console.log('$scope.completeTxHistory', $scope.completeTxHistory);
};
$scope.getDate = function(txCreated) {
@ -234,7 +232,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.amountScale = 'scale3d(' + 1 + ',' + 1 + ',' + 1+ ')';
$scope.getScrollPosition = function(){
console.log($ionicScrollDelegate.getScrollPosition().top);
var pos = $ionicScrollDelegate.getScrollPosition().top;
var amountHeight = 180 - pos;
if(amountHeight < 80) {
@ -245,24 +242,22 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
contentMargin = 180;
}
var amountScale = amountHeight/180;
var amountScale = (amountHeight/180);
if(amountScale < 0.5) {
amountScale = 0.5;
}
if(amountScale > 1.1) {
amountScale = 1.1;
}
var s = amountScale;
$scope.altAmountOpacity = (amountHeight - 100)/80;
console.log('amountHeight', amountHeight);
$window.requestAnimationFrame(function() {
$scope.amountHeight = amountHeight + 'px';
$scope.contentMargin = contentMargin + 'px';
$scope.amountScale = 'scale3d(' + s + ',' + s + ',' + s+ ')';
console.log('$scope.amountScale', $scope.amountScale);
console.log('$scope.altAmountOpacity', $scope.altAmountOpacity);
$scope.$evalAsync(angular.noop);
});
};

View File

@ -17,7 +17,6 @@
font-size: 12.5px;
}
&__tx-title {
//padding-top: 10px;
flex-grow: 1;
color: $dark-gray;
overflow: hidden;
@ -116,7 +115,6 @@
margin-top: 180px;
padding-top: 0;
top: 0;
//top: 40px;
.scroll {
background: rgb(248, 248, 249);
min-height: 300px;
@ -125,7 +123,6 @@
.amount-wrapper {
position: relative;
overflow: visible;
//margin-top: 40px;
.amount-bg {
content: '';
@ -140,7 +137,6 @@
.amount {
width: 100%;
text-align: center;
//padding: 2rem 1rem 1.5rem 1rem;
color: #fff;
height: 180px;
margin-bottom: 10px;
@ -181,7 +177,6 @@
}
.wallet-not-backed-up-warning {
//margin-top: -15px;
margin-bottom: 1rem;
background: #E15061;
text-align: center;

View File

@ -1,66 +1,39 @@
<!--
<div class="wallet-activity" ng-class="{'wallet-activity-not-pending':!tx.pendingForUs}">
<div class="wallet-activity-amount">
{{tx.amountStr}}
<div class="wallet-details__item__marker"></div>
<img class="wallet-details__tx-icon" src="img/icon-proposal-pending.svg" width="40">
<div class="wallet-details__tx-content" ng-class="{'no-border': $last}">
<div class="wallet-details__tx-title">
<span ng-show="!tx.merchant">
<span ng-show="addressbook[tx.toAddress] && !tx.message">
{{addressbook[tx.toAddress].name || addressbook[tx.toAddress]}}
</span>
<span class="ellipsis" ng-show="!addressbook[tx.toAddress] && tx.message">
{{tx.message}}
</span>
<span ng-show="!addressbook[tx.toAddress] && !tx.message" translate>
Sending
</span>
</span>
<span ng-show="tx.merchant">
<span ng-show="tx.merchant.pr.ca"><i class="fi-lock"></i> {{tx.merchant.domain}}</span>
<span ng-show="!tx.merchant.pr.ca"><i class="fi-unlock"></i> {{tx.merchant.domain}}</span>
</span>
</div>
<span ng-show="!tx.merchant">
<span ng-show="addressbook[tx.toAddress] && !tx.message">
{{addressbook[tx.toAddress].name || addressbook[tx.toAddress]}}
</span>
<span class="ellipsis" ng-show="!addressbook[tx.toAddress] && tx.message">
{{tx.message}}
</span>
<span ng-show="!addressbook[tx.toAddress] && !tx.message" translate>
Sending
<span class="item-note text-right wallet-details__tx-amount">
<span class="wallet-details__tx-amount wallet-details__tx-amount--sent">
<span ng-if="tx.action == 'sent'"></span>
<span class="size-12" ng-if="tx.action == 'invalid'" translate>
(possible double spend)
</span>
<span ng-if="tx.action != 'invalid'">
{{tx.amountStr}}
</span>
</span>
<div>
<time class="wallet-details__tx-time" ng-if="tx.createdOn && createdWithinPastDay(tx.createdOn)">{{tx.createdOn * 1000 | amTimeAgo}}</time>
<time class="wallet-details__tx-time" ng-if="tx.createdOn && !createdWithinPastDay(tx.createdOn)">{{tx.createdOn * 1000 | date:'MMMM d, y'}}</time>
</div>
</span>
<span ng-show="tx.merchant">
<span ng-show="tx.merchant.pr.ca"><i class="fi-lock"></i> {{tx.merchant.domain}}</span>
<span ng-show="!tx.merchant.pr.ca"><i class="fi-unlock"></i> {{tx.merchant.domain}}</span>
</span>
<p class="wallet-activity-note">
<i class="icon ion-record wallet-activity-note-child" ng-style="{'color':tx.wallet.color}"></i>
<span class="wallet-activity-note-child">{{tx.wallet.name}}</span>
<time class="wallet-activity-note-child">{{tx.createdOn * 1000 | amTimeAgo}}</time>
</p>
</div> -->
<div class="wallet-details__item__marker"></div>
<img class="wallet-details__tx-icon" src="img/icon-proposal-pending.svg" width="40">
<div class="wallet-details__tx-content" ng-class="{'no-border': $last}">
<div class="wallet-details__tx-title">
<span ng-show="!tx.merchant">
<span ng-show="addressbook[tx.toAddress] && !tx.message">
{{addressbook[tx.toAddress].name || addressbook[tx.toAddress]}}
</span>
<span class="ellipsis" ng-show="!addressbook[tx.toAddress] && tx.message">
{{tx.message}}
</span>
<span ng-show="!addressbook[tx.toAddress] && !tx.message" translate>
Sending
</span>
</span>
<span ng-show="tx.merchant">
<span ng-show="tx.merchant.pr.ca"><i class="fi-lock"></i> {{tx.merchant.domain}}</span>
<span ng-show="!tx.merchant.pr.ca"><i class="fi-unlock"></i> {{tx.merchant.domain}}</span>
</span>
</div>
<span class="item-note text-right wallet-details__tx-amount">
<span class="wallet-details__tx-amount wallet-details__tx-amount--sent">
<span ng-if="tx.action == 'sent'"></span>
<span class="size-12" ng-if="tx.action == 'invalid'" translate>
(possible double spend)
</span>
<span ng-if="tx.action != 'invalid'">
{{tx.amountStr}}
</span>
</span>
<div>
<time class="wallet-details__tx-time" ng-if="tx.createdOn && createdWithinPastDay(tx.createdOn)">{{tx.createdOn * 1000 | amTimeAgo}}</time>
<time class="wallet-details__tx-time" ng-if="tx.createdOn && !createdWithinPastDay(tx.createdOn)">{{tx.createdOn * 1000 | date:'MMMM d, y'}}</time>
</div>
</span>
</div>
</div>

View File

@ -37,10 +37,6 @@
<span class="badge badge-assertive m5t m10r" ng-show="txpsN>3"> {{txpsN}}</span>
</a>
<!-- <a ng-repeat="tx in txps" class="item item-sub" ng-click="openTxpModal(tx)">
<span ng-include="'views/includes/txp.html'"></span>
</a> -->
<div ng-repeat="tx in txps" ng-click="openTxpModal(tx)">
<a class="wallet-details__item item item-sub" ng-include="'views/includes/txp.html'"></a>
</div>

View File

@ -83,53 +83,7 @@
spinner="ios-small"
on-refresh="onRefresh()">
</ion-refresher>
<!-- <div class="amount-wrapper" ng-show="wallet && wallet.isComplete()" ng-style="{'background-color':wallet.color}">
<div class="amount-bg" ng-style="{'background-color':wallet.color}"></div>
<div ng-style="{'background-color':wallet.color}" class="amount">
<div ng-if="!notAuthorized && !updatingStatus">
<div ng-show="updateStatusError">
<a class="button button-outline button-light button-small" ng-click='update()' translate>Tap to retry</a>
</div>
<div ng-show="walletNotRegistered">
<span class="size-12 db m10b" translate>This wallet is not registered at the given Bitcore Wallet Service (BWS). You can recreate it from the local information.</span>
<a class="button button-outline button-light button-small" ng-click='recreate()' translate>Recreate</a>
</div>
<div ng-show="wallet.walletScanStatus == 'error'" ng-click='retryScan()'>
<span translate>Scan status finished with error</span>
<br><span translate>Tap to retry</span>
</div>
<div ng-click='updateAll(true)' ng-show="!updateStatusError && wallet.walletScanStatus != 'error' && !wallet.balanceHidden" on-hold="hideToggle()">
<strong ng-if="!status.pendingAmount" class="size-36">{{status.totalBalanceStr}}</strong>
<div ng-if="!status.pendingAmount" class="size-14 amount-alternative" ng-if="status.totalBalanceAlternative">{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</div>
<div class="size-20" ng-if="status.pendingAmount">
<div style="margin-bottom:.5rem"><span translate>Available</span>: {{status.totalBalanceStr}}</div>
<div><span translate>Confirming</span>: {{status.pendingAmountStr}}</div>
</div>
</div>
<div ng-show="!updateStatusError && wallet.walletScanStatus != 'error' && wallet.balanceHidden" on-hold="hideToggle()">
<strong class="size-24" translate>[Balance Hidden]</strong>
<div class="size-14" translate>
Tap and hold to show
</div>
</div>
</div>
<div ng-if="updatingStatus">
<div class="size-36">
<strong>...</strong>
</div>
</div>
</div>
<div class="wallet-details-wallet-info">
<span ng-include="'views/includes/walletInfo.html'"></span>
</div>
</div> -->
<a class="wallet-not-backed-up-warning" ng-show="!isBackedUp" ng-click="backup()">
Wallet not backed up
</a>
@ -200,55 +154,6 @@
</div>
</div>
<!-- <div class="list" ng-show="txHistory[0]">
<div class="item" ng-repeat="btx in txHistory track by $index" ng-click="openTxModal(btx)">
<span class="item-note text-right">
<span class="wallet-details__tx-amount" ng-class="{'wallet-details__tx-amount--recent': btx.recent, 'wallet-details__tx-amount--received': btx.action == 'received', 'wallet-details__tx-amount--sent': btx.action == 'sent'}">
<span ng-if="btx.action == 'sent'"></span>
<span class="size-12" ng-if="btx.action == 'invalid'" translate>
(possible double spend)
</span>
<span ng-if="btx.action != 'invalid'">
{{btx.amountStr}}
</span>
</span>
<p>
<time class="wallet-details__tx-time" ng-if="btx.time">{{btx.time * 1000 | amTimeAgo}}</time>
<span translate class="text-warning"
ng-show="!btx.time && (!btx.confirmations || btx.confirmations == 0)">
Unconfirmed
</span>
</p>
</span>
<img class="wallet-details__tx-icon" src="img/icon-tx-received.svg" width="40" ng-if="btx.action == 'received'">
<img class="wallet-details__tx-icon" src="img/icon-tx-sent.svg" width="40" ng-if="btx.action == 'sent'">
<img class="wallet-details__tx-icon" src="img/icon-tx-moved.svg" width="40" ng-if="btx.action == 'moved'">
<div class="wallet-details__tx-title">
<div ng-show="btx.action == 'received'" class="ellipsis">
<div ng-if="btx.note.body">{{btx.note.body}}</div>
<div ng-if="!btx.note.body" translate> Received</div>
</div>
<div ng-show="btx.action == 'sent'" class="ellipsis">
<div ng-if="btx.message" class="wallet-details__tx-message ellipsis">{{btx.message}}</div>
<div ng-if="!btx.message && btx.note.body">{{btx.note.body}}</div>
<div ng-if="!btx.message && !btx.note.body && addressbook[btx.addressTo]">
{{addressbook[btx.addressTo].name || addressbook[btx.addressTo]}}
</div>
<div ng-if="!btx.message && !btx.note.body && !addressbook[btx.addressTo]" translate>Sent</div>
</div>
<div ng-show="btx.action == 'moved'" class="ellipsis">
<div ng-if="btx.note.body">{{btx.note.body}}</div>
<div ng-if="!btx.note.body" translate>Moved</div>
</div>
<span class="label tu warning radius" ng-if="btx.action == 'invalid'" translate>Invalid</span>
</div>
</div>
</div> -->
<div class="wallet-details__list" ng-show="txHistory[0]">
<div ng-repeat="btx in txHistory track by $index" ng-click="openTxModal(btx)">
<div class="wallet-details__group-label" ng-if="isFirstInGroup($index)">