add proposal timeline

This commit is contained in:
Marty Alcala 2016-10-21 18:06:51 -04:00
parent 16c4fb3b0a
commit e5742e82f7
2 changed files with 56 additions and 28 deletions

View File

@ -70,7 +70,37 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
});
});
});
};
}
// function initActionList() {
// $scope.actionList = [];
// var tx = $scope.btx;
//
// if (!$scope.isShared) return;
//
// var actionDescriptions = {
// created: gettextCatalog.getString('Proposal Created'),
// accept: gettextCatalog.getString('Accepted'),
// reject: gettextCatalog.getString('Rejected'),
// broadcasted: gettextCatalog.getString('Broadcasted'),
// };
//
// $scope.actionList.push({
// type: 'created',
// time: tx.createdOn,
// description: actionDescriptions['created'],
// by: tx.creatorName
// });
//
// lodash.each(tx.actions, function(action) {
// $scope.actionList.push({
// type: action.type,
// time: action.createdOn,
// description: actionDescriptions[action.type],
// by: action.copayerName
// });
// });
// }
function initActionList() {
$scope.actionList = [];

View File

@ -69,36 +69,34 @@
{{btx.feeStr}}
</span>
</div>
<div ng-if="actionList[0]">
<div class="item item-divider" translate>Timeline</div>
<div class="item timeline-item" ng-class="{'action-created' : a.type == 'created' || a.type == 'accept', 'action-rejected' : a.type == 'reject'}" ng-repeat="a in actionList | orderBy: 'time' :true track by $index">
<div class="timeline-content">
<div class="timeline-content__icon">
<div class="rejected" ng-if="a.type === 'reject'">!</div>
<div ng-if="a.type !== 'reject'">{{actionList.length - $index}}</div>
</div>
<div class="timeline-content__label">
<div class="action">{{a.description}}</div>
<div class="name">{{a.by}}</div>
</div>
<div>
<span class="item-note">
<time>{{ a.time * 1000 | amDateFormat:'hh:mm a'}}</time>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<click-to-accept
ng-click="approve(statusChangeHandler)"
ng-if="hasClick && wallets[0]"
click-send-status="sendStatus">
Click to pay
</click-to-accept>
</ion-content>
<slide-to-accept
ng-if="!hasClick && wallets[0]"
slide-on-confirm="onConfirm()"
slide-send-status="sendStatus">
Slide to pay
</slide-to-accept>
<slide-to-accept-success
slide-success-show="sendStatus === 'success'"
slide-success-on-confirm="onSuccessConfirm()"
slide-success-hide-on-confirm="true">
<span ng-hide="wallet.m > 1">Payment Sent</span>
<span ng-show="wallet.m > 1">Proposal Created</span>
</slide-to-accept-success>
<wallet-selector
wallet-selector-wallets="wallets"
wallet-selector-selected-wallet="wallet"
wallet-selector-show="showWallets"
wallet-selector-on-select="onWalletSelect">
</wallet-selector>
</ion-view>