Fix address list from receive section. Fix response when delete a wallet.

This commit is contained in:
Gustavo Maximiliano Cortez 2015-02-19 17:02:07 -03:00
parent 1c7a48e827
commit 174c6cb3de
10 changed files with 137 additions and 134 deletions

View File

@ -616,11 +616,6 @@ ul.tx-copayers {
.ma { margin: 0 auto;} .ma { margin: 0 auto;}
.tu {text-transform: uppercase;} .tu {text-transform: uppercase;}
.small {
font-size: 60%;
line-height: inherit;
}
.line-dashed-setuph-v { .line-dashed-setuph-v {
border-left: 1px dashed #415970; border-left: 1px dashed #415970;
} }
@ -850,6 +845,7 @@ input[type=number]::-webkit-outer-spin-button {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
padding-top: 3px;
} }
ul.pagination li.current a { ul.pagination li.current a {

View File

@ -33,25 +33,24 @@ angular.module('copayApp.controllers').controller('CopayersController',
}; };
$scope.deleteWallet = function() { $scope.deleteWallet = function() {
$scope.loading = true; $rootScope.starting = true;
identityService.deleteWallet(w, function(err) { $timeout(function() {
if (err) { identityService.deleteWallet(w, function(err) {
$scope.loading = null; $rootScope.starting = false;
$scope.error = err.message || err; if (err) {
copay.logger.warn(err); $scope.error = err.message || err;
$timeout(function() { copay.logger.warn(err);
$scope.$digest(); $timeout(function () { $scope.$digest(); });
}); } else {
} else { if ($rootScope.wallet) {
$scope.loading = false; go.walletHome();
if ($rootScope.wallet) { }
go.walletHome(); $timeout(function() {
notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted');
});
} }
$timeout(function() { });
notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted'); }, 100);
});
}
});
}; };
$scope.copySecret = function(secret) { $scope.copySecret = function(secret) {

View File

@ -119,22 +119,23 @@ angular.module('copayApp.controllers').controller('MoreController',
$scope.deleteWallet = function() { $scope.deleteWallet = function() {
$scope.loading = true; $scope.loading = true;
identityService.deleteWallet(w, function(err) { $timeout(function() {
if (err) { identityService.deleteWallet(w, function(err) {
$scope.loading = null;
$scope.error = err.message || err;
copay.logger.warn(err);
$timeout(function () { $scope.$digest(); });
} else {
$scope.loading = false; $scope.loading = false;
if ($rootScope.wallet) { if (err) {
go.walletHome(); $scope.error = err.message || err;
copay.logger.warn(err);
$timeout(function () { $scope.$digest(); });
} else {
if ($rootScope.wallet) {
go.walletHome();
}
$timeout(function() {
notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted');
});
} }
$timeout(function() { });
notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted'); }, 100);
});
}
});
}; };
$scope.copyText = function(text) { $scope.copyText = function(text) {

View File

@ -60,7 +60,7 @@ angular.module('copayApp.controllers').controller('ReceiveController',
$modal.open({ $modal.open({
templateUrl: 'views/modals/qr-address.html', templateUrl: 'views/modals/qr-address.html',
windowClass: 'tiny', windowClass: 'small',
controller: ModalInstanceCtrl, controller: ModalInstanceCtrl,
resolve: { resolve: {
address: function() { address: function() {

View File

@ -1,80 +1,86 @@
<div ng-controller="CopayersController" ng-init="init()"> <div ng-controller="CopayersController" ng-init="init()">
<div class="row"> <div ng-show="$root.starting">
<div class="large-12 medium-12 small-12 columns"> <div ng-include="'views/includes/loading.html'" ng-init="title = 'Deleting'"></div>
<h1>Share this secret with your copayers</h1>
</div>
</div> </div>
<div class="row"> <div class="!$root.starting">
<div class="large-8 columns"> <div class="row">
<div class="large-12 medium-12 small-12 columns">
<div ng-if="!$root.wallet.isComplete()"> <h1>Share this secret with your copayers</h1>
<div class="panel oh">
<div class="box-notification">
<div class="box-icon error">
<i class="fi-alert size-24"></i>
</div>
<span class="text-warning size-14">
Please note the wallet creator <b>must be online</b> until all copayers have joined.
</span>
</div>
<div ng-click="copySecret(secret)">
<div class="text-center">
<qrcode size="250" data="{{secret}}"></qrcode>
</div>
<div class="secret m10t">
{{secret}}
</div>
</div>
<div class="text-center m10t" ng-if="isCordova">
<span class="button outline dark-gray tiny"
ng-click="shareSecret(secret)">
<i class="fi-share"></i> Share secret
</span>
</div>
<div class="size-10 line-t text-center">
<h2 class="m10t">{{$root.wallet.getName()}}</h2>
<span class="text-gray">
[{{$root.wallet.requiredCopayers}} of {{$root.wallet.totalCopayers}} ]
</span>
<span ng-if="$root.wallet.isTestnet()"> in TESTNET</span>
</div>
</div>
</div> </div>
</div> </div>
<div class="large-4 columns">
<div class="panel oh"> <div class="row">
<h3>Waiting for copayers</h3> <div class="large-8 columns">
<div ng-include="'views/includes/copayers.html'"></div>
<div ng-if="!$root.wallet.isComplete()" class="m15t"> <div ng-if="!$root.wallet.isComplete()">
<div class="left m10r" ng-include="'views/includes/photo.html'"></div> <div class="panel oh">
<p class="size-12 m0 m5t left mv"> <div class="box-notification">
<div class="box-icon error">
<i class="fi-alert size-24"></i>
</div>
<span class="text-warning size-14">
Please note the wallet creator <b>must be online</b> until all copayers have joined.
</span>
</div>
<div ng-click="copySecret(secret)">
<div class="text-center">
<qrcode size="250" data="{{secret}}"></qrcode>
</div>
<div class="secret m10t">
{{secret}}
</div>
</div>
<div class="text-center m10t" ng-if="isCordova">
<span class="button outline dark-gray tiny"
ng-click="shareSecret(secret)">
<i class="fi-share"></i> Share secret
</span>
</div>
<div class="size-10 line-t text-center">
<h2 class="m10t">{{$root.wallet.getName()}}</h2>
<span class="text-gray">
[{{$root.wallet.requiredCopayers}} of {{$root.wallet.totalCopayers}} ]
</span>
<span ng-if="$root.wallet.isTestnet()"> in TESTNET</span>
</div>
</div>
</div>
</div>
<div class="large-4 columns">
<div class="panel oh">
<h3>Waiting for copayers</h3>
<div ng-include="'views/includes/copayers.html'"></div>
<div ng-if="!$root.wallet.isComplete()" class="m15t">
<div class="left m10r" ng-include="'views/includes/photo.html'"></div>
<p class="size-12 m0 m5t left mv">
<i class="fi-loop icon-rotate spinner"></i> <i class="fi-loop icon-rotate spinner"></i>
<span translate>Waiting...</span> <span translate>Waiting...</span>
</p> </p>
</div>
</div> </div>
</div> </div>
</div> </div>
<!-- end of row -->
</div> <div class="row">
<!-- end of row --> <div class="large-12 columns">
<div class="row"> <button class="small warning" ng-show="!confirmDelete" ng-click="confirmDelete=!confirmDelete">
<div class="large-12 columns"> <i class="fi-trash"></i> Cancel
<button class="small warning" ng-show="!confirmDelete" ng-click="confirmDelete=!confirmDelete"> </button>
<i class="fi-trash"></i> Cancel <div class="text-center" ng-show="confirmDelete">
</button> <h2>Are you sure you want to cancel and delete this wallet</h2>
<div class="text-center" ng-show="confirmDelete"> <div class="row">
<h2>Are you sure you want to cancel and delete this wallet</h2> <div class="large-6 medium-6 small-6 columns">
<div class="row"> <button class="gray" ng-disabled="loading"
<div class="large-6 medium-6 small-6 columns"> ng-click="confirmDelete=!confirmDelete">No</button>
<button class="gray" ng-disabled="loading" </div>
ng-click="confirmDelete=!confirmDelete">No</button> <div class="large-6 medium-6 small-6 columns">
</div> <button class="warning" ng-disabled="loading" ng-click="deleteWallet(); confirmDelete = !confirmDelete">
<div class="large-6 medium-6 small-6 columns"> <i class="fi-trash"></i> Yes
<button class="warning" ng-disabled="loading" ng-click="deleteWallet(); confirmDelete = !confirmDelete"> </button>
<i class="fi-trash"></i> Yes </div>
</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -6,12 +6,12 @@
</div> </div>
</div> </div>
<div class="left" tooltip="ID: {{copayer.peerId}}" tooltip-placement="bottom"> <div class="left" tooltip="ID: {{copayer.peerId}}" tooltip-placement="bottom">
<small class="text-gray" ng-show="copayer.index == 0"> <span class="size-12" ng-show="copayer.index == 0">
<i class="fi-check m5r"></i> {{'Me'|translate}} <i class="fi-check m5r"></i> {{'Me'|translate}}
</small> </span>
<small class="text-gray" ng-show="copayer.index > 0"> <span class="size-12 text-gray" ng-show="copayer.index > 0">
<i class="fi-check m5r"></i> {{copayer.nick}} <i class="fi-check m5r"></i> {{copayer.nick}}
</small> </span>
</div> </div>
</li> </li>
</ul> </ul>

View File

@ -27,8 +27,8 @@
ng-repeat="(addr, info) in addressBook" ng-repeat="(addr, info) in addressBook"
ng-class="{'addressbook-disabled': info.hidden}"> ng-class="{'addressbook-disabled': info.hidden}">
<td ng-click="copyToSend(addr)"> <td ng-click="copyToSend(addr)">
<b>{{info.label}}</b> <b>{{info.label}}</b><br>
<div class="small address-size">{{::addr}}</div> <small class="address-size">{{::addr}}</small>
</td> </td>
<td class="show-for-large-up" ng-click="copyToSend(addr)" ng-show="$root.wallet.isShared()">{{$root.wallet.publicKeyRing.nicknameForCopayer(info.copayerId)}}</td> <td class="show-for-large-up" ng-click="copyToSend(addr)" ng-show="$root.wallet.isShared()">{{$root.wallet.publicKeyRing.nicknameForCopayer(info.copayerId)}}</td>
<td ng-click="copyToSend(addr)" class="show-for-large-up"><time>{{::info.createdTs | amCalendar}}</time></td> <td ng-click="copyToSend(addr)" class="show-for-large-up"><time>{{::info.createdTs | amCalendar}}</time></td>

View File

@ -4,14 +4,18 @@
<div class="modal-mobile text-center" ng-init="addr = address.address"> <div class="modal-mobile text-center" ng-init="addr = address.address">
<qrcode size="220" data="{{addr}}"></qrcode> <qrcode size="220" data="{{addr}}"></qrcode>
<div class="m10t" <div class="m20t"
ng-init="label = $root.wallet.addressBook[addr].label"> ng-init="label = $root.wallet.addressBook[addr].label">
<div class="size-12"> <div class="size-12">
{{addr}} <small class="label" ng-show="address.isChange">change</small> {{addr}}
</div> </div>
<b class="db m5t" ng-show="label"> <div class="m5t size-10 text-secondary" ng-show="address.isChange" translate>change</div>
<div class="m10t" ng-show="label">
({{label}}) ({{label}})
</b> </div>
<div class="m5t" ng-show="address.balance && address.balance > 0">
<b>{{address.balance}} {{$root.wallet.settings.unitName}}</b>
</div>
</div> </div>
<div class="text-center m10t" ng-if="isCordova"> <div class="text-center m10t" ng-if="isCordova">
<button class="primary expand" ng-click="copyAddress(addr)"> <button class="primary expand" ng-click="copyAddress(addr)">

View File

@ -33,19 +33,16 @@
<div ng-repeat="addr in addresses" ng-click="openAddressModal(addr)" class="pointer"> <div ng-repeat="addr in addresses" ng-click="openAddressModal(addr)" class="pointer">
<div class="panel"> <div class="panel">
<div class="row"> <div class="row">
<div class="large-7 medium-7 small-9 columns"> <div class="large-3 medium-4 small-5 columns">
<contact class="ellipsis" address="{{::addr.address}}"> <contact class="size-12 ellipsis" address="{{::addr.address}}"></contact>
</div> </div>
<div class="large-1 medium-2 small-3 columns text-right"> <div class="large-1 medium-1 small-2 columns">
<small translate class="label" ng-show="::addr.isChange">change</small> <span translate class="text-secondary size-10" ng-show="::addr.isChange">change</span>
</div> </div>
<div class="large-4 medium-3 small-12 columns text-right"> <div class="large-8 medium-7 small-5 columns text-right">
<span ng-show="$root.updatingBalance"> <span class="size-12" ng-show="!$root.updatingBalance">
<i class="fi-bitcoin-circle icon-rotate spinner"></i> <b>{{addr.balance || '0'}} {{$root.wallet.settings.unitName}}</b>
</span> </span>
<span class="size-14" ng-show="!$root.updatingBalance">
<b>{{addr.balance || '0'}} {{$root.wallet.settings.unitName}}</b>
</span>
</div> </div>
</div> </div>
<!-- end of panel mobile --> <!-- end of panel mobile -->

View File

@ -39,23 +39,23 @@
<input type="text" ng-model="insightTestnet" class="form-control" name="insightTestnet" valid-url required> <input type="text" ng-model="insightTestnet" class="form-control" name="insightTestnet" valid-url required>
</div> </div>
<div translate class="small text-gray"> <small translate class="text-gray">
Insight API server is open-source software. You can run your own instances, check Insight API server is open-source software. You can run your own instances, check
<a href <a href
ng-click="$root.openExternalLink('https://insight.is')">Insight API Homepage</a> ng-click="$root.openExternalLink('https://insight.is')">Insight API Homepage</a>
</div> </small>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend translate>Storage</legend> <legend translate>Storage</legend>
<label for="insightTestnet">Read and Store Profiles:</label> <label for="insightTestnet">Read and Store Profiles:</label>
<select class="form-control" ng-model="selectedStorage" ng-options="o.name for o in availableStorages" required> <select class="form-control" ng-model="selectedStorage" ng-options="o.name for o in availableStorages" required>
</select> </select>
<div translate class="small text-gray"> <small translate class="text-gray">
Wallets and profiles are stored encrypted using your password as a key. You can store the encrypted data locally, on this device, or remotely on the cloud (Insight Server). Wallets and profiles are stored encrypted using your password as a key. You can store the encrypted data locally, on this device, or remotely on the cloud (Insight Server).
<a href <a href
ng-click="$root.openExternalLink('https://github.com/bitpay/copay/tree/master/js/plugins')"> ng-click="$root.openExternalLink('https://github.com/bitpay/copay/tree/master/js/plugins')">
More pluggins are welcomed!</a> More pluggins are welcomed!</a>
</div> </small>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend translate>Language</legend> <legend translate>Language</legend>
@ -66,9 +66,9 @@
<legend translate>Log level</legend> <legend translate>Log level</legend>
<select class="form-control" ng-model="selectedLogLevel" ng-options="o.name for o in availableLogLevels" required> <select class="form-control" ng-model="selectedLogLevel" ng-options="o.name for o in availableLogLevels" required>
</select> </select>
<div translate class="small text-gray"> <small translate class="text-gray">
Log level shows information on the console. This is useful to find bugs and to help users. 'debug' is the most verbose level while 'fatal' only shows unexpected errors Log level shows information on the console. This is useful to find bugs and to help users. 'debug' is the most verbose level while 'fatal' only shows unexpected errors
</div> </small>
</fieldset> </fieldset>
<button translate type="submit" class="button primary radius expand m0" ng-disabled="settingsForm.$invalid || loading" ng-click="save()"> <button translate type="submit" class="button primary radius expand m0" ng-disabled="settingsForm.$invalid || loading" ng-click="save()">
Save Save