Merge pull request #2754 from cmgustavo/feat/ux-wallets-1-1
Feat/ux wallets 1-1
This commit is contained in:
commit
31b8cfb253
6 changed files with 34 additions and 21 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="content p20v" ng-controller="createController as create">
|
<div class="content p20v" ng-controller="createController as create" ng-init="create.setTotalCopayers(1)">
|
||||||
|
|
||||||
<div class="onGoingProcess" ng-show="create.loading">
|
<div class="onGoingProcess" ng-show="create.loading">
|
||||||
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
|
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
|
||||||
|
|
@ -21,6 +21,16 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row m20b">
|
||||||
|
<a href
|
||||||
|
class="small-6 medium-6 large-6 columns text-center"
|
||||||
|
ng-class="{'text-gray': totalCopayers == 1}"
|
||||||
|
ng-click="create.setTotalCopayers(1)">Personal</a>
|
||||||
|
<a href
|
||||||
|
class="small-6 medium-6 large-6 columns text-center"
|
||||||
|
ng-class="{'text-gray': totalCopayers != 1}"
|
||||||
|
ng-click="create.setTotalCopayers(3)">Multisignature</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form name="setupForm" ng-submit="create.create(setupForm)" novalidate>
|
<form name="setupForm" ng-submit="create.create(setupForm)" novalidate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -47,10 +57,12 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row" ng-show="totalCopayers != 1">
|
||||||
<div class="large-6 medium-6 columns">
|
<div class="large-6 medium-6 columns">
|
||||||
<label><span translate>Select total number of copayers</span>
|
<label><span translate>Select total number of copayers</span>
|
||||||
<select class="m10t" ng-model="totalCopayers" ng-options="totalCopayers as totalCopayers for totalCopayers in create.TCValues">
|
<select class="m10t" ng-model="totalCopayers"
|
||||||
|
ng-options="totalCopayers as totalCopayers for totalCopayers in create.TCValues"
|
||||||
|
ng-change="create.setTotalCopayers(totalCopayers)">
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,15 @@
|
||||||
ng-repeat="item in sidebar.wallets track by $index"
|
ng-repeat="item in sidebar.wallets track by $index"
|
||||||
ng-class="{'selected': item.id == index.walletId}"
|
ng-class="{'selected': item.id == index.walletId}"
|
||||||
class="nav-item">
|
class="nav-item">
|
||||||
<a ng-click="sidebar.switchWallet(item.id)">
|
<a ng-click="sidebar.switchWallet(item.id)" class="oh">
|
||||||
<div class="avatar-wallet"
|
<div class="avatar-wallet"
|
||||||
ng-style="{'background-color':item.color}">{{(item.name || item.id) | limitTo: 1}}</div>
|
ng-style="{'background-color':item.color}">{{(item.name || item.id) | limitTo: 1}}</div>
|
||||||
<div class="ellipsis name-wallet">{{item.name || item.id}}</div>
|
<div class="name-wallet" ng-class="{'m8t':item.n == 1}">{{item.name || item.id}}</div>
|
||||||
<div class="size-12">{{item.m}} <span translate>of</span> {{item.n}}</div>
|
<div class="size-12" ng-show="item.n > 1">{{item.m}} <span translate>of</span> {{item.n}}</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a ng-click="$root.go('add')">
|
<a ng-click="$root.go('add')" class="oh">
|
||||||
<i class="icon-arrow-right3 size-18 right m10t"></i>
|
<i class="icon-arrow-right3 size-18 right m10t"></i>
|
||||||
<i class="fi-plus size-24 db left m20r m5t"></i>
|
<i class="fi-plus size-24 db left m20r m5t"></i>
|
||||||
<div class="tu text-bold">
|
<div class="tu text-bold">
|
||||||
|
|
|
||||||
|
|
@ -113,18 +113,19 @@
|
||||||
<div class="wallet-info">
|
<div class="wallet-info">
|
||||||
<div ng-show="index.isShared" ng-click="openCopayersModal(index.copayers, index.copayerId)">
|
<div ng-show="index.isShared" ng-click="openCopayersModal(index.copayers, index.copayerId)">
|
||||||
<p class="m0">
|
<p class="m0">
|
||||||
{{index.m}} <span translate>of</span> {{index.n}}
|
{{(index.alias || index.walletName)}}
|
||||||
</p>
|
</p>
|
||||||
<div class="size-12 text-gray">
|
<div class="size-12 text-gray">
|
||||||
<span translate>Multisignature wallet</span> <span ng-if="index.network != 'livenet'">- Testnet</span>
|
<span translate>Multisignature wallet</span> ({{index.m}} <span translate>of</span> {{index.n}})
|
||||||
|
<span ng-if="index.network != 'livenet'">- Testnet</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-show="!index.isShared">
|
<div ng-show="!index.isShared">
|
||||||
<p class="m0">
|
<p class="m0">
|
||||||
{{index.m}} <span translate>of</span> {{index.n}}
|
{{(index.alias || index.walletName)}}
|
||||||
</p>
|
</p>
|
||||||
<div class="size-12 text-gray">
|
<div class="size-12 text-gray" ng-if="index.network != 'livenet'">
|
||||||
<span translate>Personal Wallet</span> <span ng-if="index.network != 'livenet'">- Testnet</span>
|
Testnet
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -338,6 +338,7 @@ ul.manage li {
|
||||||
.size-72 { font-size: 72px; }
|
.size-72 { font-size: 72px; }
|
||||||
.m5 {margin: 5px;}
|
.m5 {margin: 5px;}
|
||||||
.m5t {margin-top: 5px;}
|
.m5t {margin-top: 5px;}
|
||||||
|
.m8t {margin-top: 8px;}
|
||||||
.m5b {margin-bottom: 5px;}
|
.m5b {margin-bottom: 5px;}
|
||||||
.m5r {margin-right: 5px;}
|
.m5r {margin-right: 5px;}
|
||||||
.m10 {margin: 10px;}
|
.m10 {margin: 10px;}
|
||||||
|
|
|
||||||
|
|
@ -205,8 +205,8 @@ _:-ms-fullscreen, :root .main {
|
||||||
.walletHome .wallet-info {
|
.walletHome .wallet-info {
|
||||||
margin-left: 85px;
|
margin-left: 85px;
|
||||||
line-height: 110%;
|
line-height: 110%;
|
||||||
float: left;
|
height: 60px;
|
||||||
margin-bottom: 20px;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.copayers {
|
.copayers {
|
||||||
|
|
@ -303,9 +303,7 @@ a.missing-copayers {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar header {
|
.sidebar header {
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 7rem;
|
|
||||||
padding: 1.7rem;
|
padding: 1.7rem;
|
||||||
border-bottom: 1px solid #384B5F;
|
border-bottom: 1px solid #384B5F;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,18 +29,19 @@ angular.module('copayApp.controllers').controller('createController',
|
||||||
}
|
}
|
||||||
|
|
||||||
var updateRCSelect = function(n) {
|
var updateRCSelect = function(n) {
|
||||||
|
$scope.totalCopayers = n;
|
||||||
var maxReq = COPAYER_PAIR_LIMITS[n];
|
var maxReq = COPAYER_PAIR_LIMITS[n];
|
||||||
self.RCValues = lodash.range(1, maxReq + 1);
|
self.RCValues = lodash.range(1, maxReq + 1);
|
||||||
$scope.requiredCopayers = Math.min(parseInt(n / 2 + 1), maxReq);
|
$scope.requiredCopayers = Math.min(parseInt(n / 2 + 1), maxReq);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$watch('totalCopayers', function(tc) {
|
this.TCValues = lodash.range(2, defaults.limits.totalCopayers + 1);
|
||||||
updateRCSelect(tc);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.TCValues = lodash.range(1, defaults.limits.totalCopayers + 1);
|
|
||||||
$scope.totalCopayers = defaults.wallet.totalCopayers;
|
$scope.totalCopayers = defaults.wallet.totalCopayers;
|
||||||
|
|
||||||
|
this.setTotalCopayers = function(tc) {
|
||||||
|
updateRCSelect(tc);
|
||||||
|
};
|
||||||
|
|
||||||
this.create = function(form) {
|
this.create = function(form) {
|
||||||
if (form && form.$invalid) {
|
if (form && form.$invalid) {
|
||||||
this.error = gettext('Please enter the required fields');
|
this.error = gettext('Please enter the required fields');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue