mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #2310 from cmgustavo/ux/wallet-info01
Removes "Manage wallets" and moves info to "Settings"
This commit is contained in:
commit
373f12c2a0
|
@ -268,15 +268,13 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill, inpu
|
||||||
}
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
-moz-box-shadow: inset 0px -1px 1px 0px rgba(159,47,34,0.30);
|
|
||||||
box-shadow: inset 0px -1px 1px 0px rgba(159,47,34,0.30);
|
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
background-color: #A02F23;
|
background-color: #A02F23;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 250px;
|
left: 250px;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
padding: 10px 2rem;
|
padding: 10px 1rem 10px 0.5rem;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
@ -284,7 +282,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill, inpu
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-first-line {
|
.status-first-line {
|
||||||
|
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
@ -414,9 +411,10 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill, inpu
|
||||||
|
|
||||||
a.close-notification {
|
a.close-notification {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8px;
|
top: 0;
|
||||||
right: 10px;
|
right: 0;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel.last-transactions {
|
.panel.last-transactions {
|
||||||
|
@ -1288,6 +1286,7 @@ label.postfix, a.postfix {
|
||||||
.createProfile input[type=email],
|
.createProfile input[type=email],
|
||||||
.createProfile input[type=text],
|
.createProfile input[type=text],
|
||||||
.createProfile input[type=password],
|
.createProfile input[type=password],
|
||||||
|
.createProfile input[type=tel],
|
||||||
.home input[type=email],
|
.home input[type=email],
|
||||||
.home input[type=text],
|
.home input[type=text],
|
||||||
.home input[type=tel],
|
.home input[type=tel],
|
||||||
|
|
40
index.html
40
index.html
|
@ -50,21 +50,25 @@
|
||||||
<div class="off-canvas-wrap" id="off-canvas-wrap" ng-show="!signingOut">
|
<div class="off-canvas-wrap" id="off-canvas-wrap" ng-show="!signingOut">
|
||||||
<div class="inner-wrap">
|
<div class="inner-wrap">
|
||||||
|
|
||||||
<span class="status" ng-if="$root.needsEmailConfirmation && !$root.pleaseConfirmEmailAck">
|
<div class="status" ng-if="$root.needsEmailConfirmation && !$root.pleaseConfirmEmailAck">
|
||||||
<a class="close-notification text-white" ng-click="$root.pleaseConfirmEmailAck=true">×</a>
|
<a class="close-notification text-white" ng-click="$root.pleaseConfirmEmailAck=true">×</a>
|
||||||
<button class="text-white warning tiny m0 right"
|
<div class="row">
|
||||||
ng-click="resendVerificationEmail()"
|
<div class="large-10 medium-9 small-12 columns m5b">
|
||||||
ng-disabled="loading"
|
<i class="fi-alert size-36 left m20r"></i>
|
||||||
ng-show="!hideReSendButton">
|
<strong class="size-16">Email not confirmed</strong>.<br>
|
||||||
{{ loading ? 'Resending...' : 'Resend' }}
|
Please confirm your email address using the confirmation link at the message we sent you
|
||||||
</button>
|
</div>
|
||||||
<i class="fi-alert size-36 left m20r"></i>
|
<div class="large-2 medium-3 small-12 columns text-center">
|
||||||
<span translate>
|
<button class="text-white warning tiny m0"
|
||||||
<strong class="size-16">Email not confirmed</strong>.<br>
|
ng-click="resendVerificationEmail()"
|
||||||
Please confirm your email address using the confirmation link at the message we sent you
|
ng-disabled="loading"
|
||||||
</span>
|
ng-show="!hideReSendButton">
|
||||||
</span>
|
{{ loading ? 'Resending...' : 'Resend' }}
|
||||||
<span class="status" ng-if="$root.pleaseConfirmEmail">
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="status" ng-if="$root.pleaseConfirmEmail">
|
||||||
<a class="close-notification text-white" ng-click="$root.pleaseConfirmEmail=null">×</a>
|
<a class="close-notification text-white" ng-click="$root.pleaseConfirmEmail=null">×</a>
|
||||||
<i class="fi-alert size-36 left m20r"></i>
|
<i class="fi-alert size-36 left m20r"></i>
|
||||||
<span translate>
|
<span translate>
|
||||||
|
@ -72,11 +76,11 @@
|
||||||
An email was sent to {{$root.iden.getName()}}. Please follow the link on it to confirm it. Unconfirmed profiles could be deleted from server.
|
An email was sent to {{$root.iden.getName()}}. Please follow the link on it to confirm it. Unconfirmed profiles could be deleted from server.
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</span>
|
</div>
|
||||||
<span class="status" ng-if="$root.reconnecting">
|
<div class="status" ng-if="$root.reconnecting">
|
||||||
<i class="fi-loop icon-rotate"></i>
|
<i class="fi-loop icon-rotate"></i>
|
||||||
<span translate> <strong class="size-16">Network Error</strong>.<br> Attempting to reconnect..</span>
|
<span translate> <strong class="size-16">Network Error</strong>.<br> Attempting to reconnect..</span>
|
||||||
</span>
|
</div>
|
||||||
|
|
||||||
<div ng-controller="SidebarController" ng-show="$root.iden && !$root.hideNavigation && !$root.wpInputFocused">
|
<div ng-controller="SidebarController" ng-show="$root.iden && !$root.hideNavigation && !$root.wpInputFocused">
|
||||||
<nav class="tab-bar">
|
<nav class="tab-bar">
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('CopayersController',
|
angular.module('copayApp.controllers').controller('CopayersController',
|
||||||
function($scope, $rootScope, $timeout, go) {
|
function($scope, $rootScope, $timeout, go, identityService, notification) {
|
||||||
|
var w = $rootScope.wallet;
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
var w = $rootScope.wallet;
|
|
||||||
$rootScope.title = 'Share this secret with your copayers';
|
$rootScope.title = 'Share this secret with your copayers';
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
$scope.secret = $rootScope.wallet.getSecret();
|
$scope.secret = $rootScope.wallet.getSecret();
|
||||||
|
@ -27,4 +27,25 @@ angular.module('copayApp.controllers').controller('CopayersController',
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
}, 1);
|
}, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.deleteWallet = function() {
|
||||||
|
$scope.loading = true;
|
||||||
|
identityService.deleteWallet(w, function(err) {
|
||||||
|
if (err) {
|
||||||
|
$scope.loading = null;
|
||||||
|
$scope.error = err.message || err;
|
||||||
|
copay.logger.warn(err);
|
||||||
|
$timeout(function () { $scope.$digest(); });
|
||||||
|
} else {
|
||||||
|
$scope.loading = false;
|
||||||
|
if ($rootScope.wallet) {
|
||||||
|
go.walletHome();
|
||||||
|
}
|
||||||
|
$timeout(function() {
|
||||||
|
notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -41,13 +41,6 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
$scope.passwordStrength = null;
|
$scope.passwordStrength = null;
|
||||||
|
|
||||||
_firstpin = null;
|
_firstpin = null;
|
||||||
|
|
||||||
$scope.setPinForm.newpin.$setViewValue('');
|
|
||||||
$scope.setPinForm.newpin.$render();
|
|
||||||
$scope.setPinForm.repeatpin.$setViewValue('');
|
|
||||||
$scope.setPinForm.repeatpin.$render();
|
|
||||||
$scope.setPinForm.$setPristine();
|
|
||||||
|
|
||||||
$scope.error = 'Entered PINs were not equal. Try again';
|
$scope.error = 'Entered PINs were not equal. Try again';
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
|
@ -79,7 +72,6 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
_credentials = null;
|
_credentials = null;
|
||||||
$scope.askForPin = 0;
|
$scope.askForPin = 0;
|
||||||
$rootScope.hasPin = true;
|
$rootScope.hasPin = true;
|
||||||
$rootScope.starting = null;
|
|
||||||
$scope.createDefaultWallet();
|
$scope.createDefaultWallet();
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
@ -123,8 +115,10 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
/* Last step. Will emit after creation so the UX gets updated */
|
/* Last step. Will emit after creation so the UX gets updated */
|
||||||
$scope.createDefaultWallet = function() {
|
$scope.createDefaultWallet = function() {
|
||||||
$rootScope.hideNavigation = false;
|
$rootScope.hideNavigation = false;
|
||||||
|
$rootScope.starting = true;
|
||||||
identityService.createDefaultWallet(function(err) {
|
identityService.createDefaultWallet(function(err) {
|
||||||
$scope.askForPin = 0;
|
$scope.askForPin = 0;
|
||||||
|
$rootScope.starting = null;
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
var msg = err.toString();
|
var msg = err.toString();
|
||||||
|
@ -143,10 +137,8 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
preconditions.checkArgument(_.isString(password));
|
preconditions.checkArgument(_.isString(password));
|
||||||
|
|
||||||
$rootScope.hideNavigation = false;
|
$rootScope.hideNavigation = false;
|
||||||
$rootScope.starting = true;
|
|
||||||
|
|
||||||
identityService.create(emailOrUsername, password, function(err) {
|
identityService.create(emailOrUsername, password, function(err) {
|
||||||
$rootScope.starting = null;
|
|
||||||
$scope.error = null;
|
$scope.error = null;
|
||||||
if (err) {
|
if (err) {
|
||||||
var msg = err.toString();
|
var msg = err.toString();
|
||||||
|
@ -162,6 +154,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
} else {
|
} else {
|
||||||
// mobile
|
// mobile
|
||||||
if ($scope.isMobile) {
|
if ($scope.isMobile) {
|
||||||
|
$rootScope.starting = null;
|
||||||
_credentials = {
|
_credentials = {
|
||||||
email: emailOrUsername,
|
email: emailOrUsername,
|
||||||
password: password,
|
password: password,
|
||||||
|
@ -206,6 +199,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
|
|
||||||
$scope.saveSettings(function(err) {
|
$scope.saveSettings(function(err) {
|
||||||
preconditions.checkState(!err, err);
|
preconditions.checkState(!err, err);
|
||||||
|
$rootScope.starting = true;
|
||||||
|
|
||||||
$scope._doCreateProfile($scope.userOrEmail, form.password.$modelValue, function(err) {
|
$scope._doCreateProfile($scope.userOrEmail, form.password.$modelValue, function(err) {
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
|
|
|
@ -127,13 +127,13 @@ angular.module('copayApp.controllers').controller('JoinController',
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.loading = true;
|
$rootScope.starting = true;
|
||||||
identityService.joinWallet({
|
identityService.joinWallet({
|
||||||
secret: $scope.connectionId,
|
secret: $scope.connectionId,
|
||||||
nickname: $scope.nickname,
|
nickname: $scope.nickname,
|
||||||
privateHex: $scope.private,
|
privateHex: $scope.private,
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
$scope.loading = false;
|
$rootScope.starting = false;
|
||||||
if (err) {
|
if (err) {
|
||||||
if (err === 'joinError')
|
if (err === 'joinError')
|
||||||
notification.error('Fatal error connecting to Insight server');
|
notification.error('Fatal error connecting to Insight server');
|
||||||
|
|
|
@ -1,9 +1,20 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('MoreController',
|
angular.module('copayApp.controllers').controller('MoreController',
|
||||||
function($scope, $rootScope, $location, $filter, balanceService, notification, rateService) {
|
function($scope, $rootScope, $location, $filter, $timeout, balanceService, notification, rateService, backupService, identityService, isMobile, isCordova, go) {
|
||||||
var w = $rootScope.wallet;
|
var w = $rootScope.wallet;
|
||||||
$scope.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
|
var max = $rootScope.quotaPerItem;
|
||||||
|
$scope.isSafari = isMobile.Safari();
|
||||||
|
$scope.isCordova = isCordova;
|
||||||
|
$scope.wallet = w;
|
||||||
|
$scope.error = null;
|
||||||
|
$scope.success = null;
|
||||||
|
|
||||||
|
var bits = w.sizes().total;
|
||||||
|
w.kb = $filter('noFractionNumber')(bits / 1000, 1);
|
||||||
|
if (max) {
|
||||||
|
w.usage = $filter('noFractionNumber')(bits / max * 100, 0);
|
||||||
|
}
|
||||||
|
|
||||||
$rootScope.title = 'Settings';
|
$rootScope.title = 'Settings';
|
||||||
|
|
||||||
|
@ -105,4 +116,34 @@ angular.module('copayApp.controllers').controller('MoreController',
|
||||||
}, true);
|
}, true);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.deleteWallet = function() {
|
||||||
|
$scope.loading = true;
|
||||||
|
identityService.deleteWallet(w, function(err) {
|
||||||
|
if (err) {
|
||||||
|
$scope.loading = null;
|
||||||
|
$scope.error = err.message || err;
|
||||||
|
copay.logger.warn(err);
|
||||||
|
$timeout(function () { $scope.$digest(); });
|
||||||
|
} else {
|
||||||
|
$scope.loading = false;
|
||||||
|
if ($rootScope.wallet) {
|
||||||
|
go.walletHome();
|
||||||
|
}
|
||||||
|
$timeout(function() {
|
||||||
|
notification.success('Success', 'The wallet "' + (w.name || w.id) + '" was deleted');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.downloadWalletBackup = function() {
|
||||||
|
backupService.walletDownload(w);
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.viewWalletBackup = function() {
|
||||||
|
$scope.backupWalletPlainText = backupService.walletEncrypted(w);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
angular.module('copayApp.controllers').controller('ProfileController', function($scope, $rootScope, $location, $modal, $filter, $timeout, backupService, identityService, isMobile, isCordova) {
|
angular.module('copayApp.controllers').controller('ProfileController', function($scope, $rootScope, $location, $modal, $filter, $timeout, backupService, identityService, isMobile, isCordova, notification) {
|
||||||
$scope.username = $rootScope.iden.getName();
|
$scope.username = $rootScope.iden.getName();
|
||||||
$scope.isSafari = isMobile.Safari();
|
$scope.isSafari = isMobile.Safari();
|
||||||
$scope.isCordova = isCordova;
|
$scope.isCordova = isCordova;
|
||||||
|
@ -25,86 +25,21 @@ angular.module('copayApp.controllers').controller('ProfileController', function(
|
||||||
// no need to add event handlers here. Wallet deletion is handle by callback.
|
// no need to add event handlers here. Wallet deletion is handle by callback.
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.setWallets = function() {
|
|
||||||
if (!$rootScope.iden) return;
|
|
||||||
|
|
||||||
var wallets = $rootScope.iden.getWallets();
|
|
||||||
var max = $rootScope.quotaPerItem;
|
|
||||||
|
|
||||||
_.each(wallets, function(w) {
|
|
||||||
var bits = w.sizes().total;
|
|
||||||
w.kb = $filter('noFractionNumber')(bits / 1000, 1);
|
|
||||||
if (max) {
|
|
||||||
w.usage = $filter('noFractionNumber')(bits / max * 100, 0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$scope.wallets = wallets;
|
|
||||||
$timeout(function(){
|
|
||||||
$scope.$digest();
|
|
||||||
})
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.deleteProfile = function() {
|
$scope.deleteProfile = function() {
|
||||||
|
$scope.loading = true;
|
||||||
identityService.deleteProfile(function(err, res) {
|
identityService.deleteProfile(function(err, res) {
|
||||||
|
$scope.loading = false;
|
||||||
if (err) {
|
if (err) {
|
||||||
log.warn(err);
|
log.warn(err);
|
||||||
notification.error('Error', 'Could not delete profile');
|
notification.error('Error', 'Could not delete profile');
|
||||||
return;
|
$timeout(function () { $scope.$digest(); });
|
||||||
}
|
}
|
||||||
$location.path('/');
|
else {
|
||||||
$timeout(function() {
|
$location.path('/');
|
||||||
notification.error('Success', 'Profile successfully deleted');
|
$timeout(function() {
|
||||||
});
|
notification.success('Success', 'Profile successfully deleted');
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.showWalletInfo = function(w) {
|
|
||||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
|
||||||
if (!w) return;
|
|
||||||
$scope.isSafari = isMobile.Safari();
|
|
||||||
$scope.isCordova = isCordova;
|
|
||||||
$scope.item = w;
|
|
||||||
$scope.error = null;
|
|
||||||
$scope.success = null;
|
|
||||||
|
|
||||||
$scope.deleteWallet = function() {
|
|
||||||
|
|
||||||
$scope.loading = true;
|
|
||||||
identityService.deleteWallet($scope.item, function(err) {
|
|
||||||
if (err) {
|
|
||||||
$scope.loading = null;
|
|
||||||
$scope.error = err.message || err;
|
|
||||||
copay.logger.warn(err);
|
|
||||||
$timeout(function () { $scope.$digest(); });
|
|
||||||
} else {
|
|
||||||
$modalInstance.close($scope.item.name || $scope.item.id);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
$scope.downloadWalletBackup = function() {
|
|
||||||
backupService.walletDownload($scope.item);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.viewWalletBackup = function() {
|
|
||||||
$scope.backupWalletPlainText = backupService.walletEncrypted($scope.item);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.close = function() {
|
|
||||||
$modalInstance.dismiss('cancel');
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
var modalInstance = $modal.open({
|
|
||||||
templateUrl: 'views/modals/wallet-info.html',
|
|
||||||
windowClass: 'medium',
|
|
||||||
controller: ModalInstanceCtrl
|
|
||||||
});
|
|
||||||
|
|
||||||
modalInstance.result.then(function(walletName) {
|
|
||||||
$scope.loading = false;
|
|
||||||
$scope.success = 'The wallet "' + walletName + '" was deleted';
|
|
||||||
$scope.setWallets();
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -218,6 +218,9 @@ Identity.prototype.deleteWallet = function(walletId, cb) {
|
||||||
self.storage.removeItem(Wallet.getStorageKey(walletId), function(err) {
|
self.storage.removeItem(Wallet.getStorageKey(walletId), function(err) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
self.emitAndKeepAlive('walletDeleted', walletId);
|
self.emitAndKeepAlive('walletDeleted', walletId);
|
||||||
|
if (!self.walletIds.length) {
|
||||||
|
self.emitAndKeepAlive('noWallets')
|
||||||
|
}
|
||||||
self.store({
|
self.store({
|
||||||
noWallets: true
|
noWallets: true
|
||||||
}, cb);
|
}, cb);
|
||||||
|
|
|
@ -323,7 +323,9 @@ angular.module('copayApp.services')
|
||||||
if ($rootScope.iden) {
|
if ($rootScope.iden) {
|
||||||
$rootScope.signingOut = true;
|
$rootScope.signingOut = true;
|
||||||
$rootScope.iden.close(function() { // Will trigger 'closed'
|
$rootScope.iden.close(function() { // Will trigger 'closed'
|
||||||
$rootScope.signingOut = false;
|
$timeout(function() {
|
||||||
|
$rootScope.signingOut = null;
|
||||||
|
}, 100);
|
||||||
}); // Will trigger 'closed'
|
}); // Will trigger 'closed'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -568,25 +568,12 @@ describe("Unit: Controllers", function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Profile Controller', function() {
|
describe('More Controller', function() {
|
||||||
var ctrl, inScope, modalCtrl;
|
var ctrl, modalCtrl;
|
||||||
beforeEach(inject(function($controller, $rootScope) {
|
beforeEach(inject(function($controller, $rootScope) {
|
||||||
scope = $rootScope.$new();
|
scope = $rootScope.$new();
|
||||||
ctrl = $controller('ProfileController', {
|
ctrl = $controller('MoreController', {
|
||||||
$scope: scope,
|
$scope: scope
|
||||||
$modal: {
|
|
||||||
open: function(opts) {
|
|
||||||
inScope = $rootScope.$new();
|
|
||||||
modalCtrl = opts.controller(inScope, {
|
|
||||||
close: sinon.stub(),
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
result: {
|
|
||||||
then: sinon.stub(),
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
saveAsLastCall = null;
|
saveAsLastCall = null;
|
||||||
|
|
||||||
|
@ -595,8 +582,7 @@ describe("Unit: Controllers", function() {
|
||||||
it('Backup Wallet controller #download', function() {
|
it('Backup Wallet controller #download', function() {
|
||||||
var w = scope.wallet;
|
var w = scope.wallet;
|
||||||
expect(saveAsLastCall).equal(null);
|
expect(saveAsLastCall).equal(null);
|
||||||
scope.showWalletInfo(w);
|
scope.downloadWalletBackup();
|
||||||
inScope.downloadWalletBackup();
|
|
||||||
|
|
||||||
expect(saveAsLastCall.blob.size).equal(7);
|
expect(saveAsLastCall.blob.size).equal(7);
|
||||||
expect(saveAsLastCall.blob.type).equal('text/plain;charset=utf-8');
|
expect(saveAsLastCall.blob.type).equal('text/plain;charset=utf-8');
|
||||||
|
@ -605,8 +591,7 @@ describe("Unit: Controllers", function() {
|
||||||
it('Backup Wallet controller should name backup correctly for multiple copayers', function() {
|
it('Backup Wallet controller should name backup correctly for multiple copayers', function() {
|
||||||
var w = scope.wallet;
|
var w = scope.wallet;
|
||||||
expect(saveAsLastCall).equal(null);
|
expect(saveAsLastCall).equal(null);
|
||||||
scope.showWalletInfo(w);
|
scope.downloadWalletBackup();
|
||||||
inScope.downloadWalletBackup();
|
|
||||||
expect(saveAsLastCall.filename).equal('nickname-fakeWallet-keybackup.json.aes');
|
expect(saveAsLastCall.filename).equal('nickname-fakeWallet-keybackup.json.aes');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -614,16 +599,14 @@ describe("Unit: Controllers", function() {
|
||||||
var w = scope.wallet;
|
var w = scope.wallet;
|
||||||
expect(saveAsLastCall).equal(null);
|
expect(saveAsLastCall).equal(null);
|
||||||
scope.wallet.totalCopayers = 1;
|
scope.wallet.totalCopayers = 1;
|
||||||
scope.showWalletInfo(w);
|
scope.downloadWalletBackup();
|
||||||
inScope.downloadWalletBackup();
|
|
||||||
expect(saveAsLastCall.filename).equal('fakeWallet-keybackup.json.aes');
|
expect(saveAsLastCall.filename).equal('fakeWallet-keybackup.json.aes');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Delete a wallet', function() {
|
it('Delete a wallet', function() {
|
||||||
var w = scope.wallet;
|
var w = scope.wallet;
|
||||||
|
|
||||||
scope.showWalletInfo(w);
|
scope.deleteWallet();
|
||||||
inScope.deleteWallet();
|
|
||||||
scope.$digest();
|
scope.$digest();
|
||||||
scope.iden.deleteWallet.calledOnce.should.equal(true);
|
scope.iden.deleteWallet.calledOnce.should.equal(true);
|
||||||
scope.iden.deleteWallet.getCall(0).args[0].should.equal(w.getId());
|
scope.iden.deleteWallet.getCall(0).args[0].should.equal(w.getId());
|
||||||
|
|
|
@ -49,6 +49,32 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- end of row -->
|
<!-- end of row -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="large-12 columns size-12">
|
||||||
|
<button class="warning" ng-show="!confirmDelete" ng-click="confirmDelete=!confirmDelete">
|
||||||
|
<i class="fi-trash"></i> Cancel
|
||||||
|
</button>
|
||||||
|
<div ng-show="confirmDelete">
|
||||||
|
<h2>Are you sure you want to cancel and delete this wallet</h2>
|
||||||
|
<div class="row">
|
||||||
|
<div class="large-6 medium-6 small-6 columns">
|
||||||
|
<button class="gray" ng-disabled="loading"
|
||||||
|
ng-click="confirmDelete=!confirmDelete">No</button>
|
||||||
|
</div>
|
||||||
|
<div class="large-6 medium-6 small-6 columns">
|
||||||
|
<button class="warning" ng-disabled="loading" ng-click="deleteWallet()">
|
||||||
|
<span ng-show="!loading">
|
||||||
|
<i class="fi-trash"></i> Yes
|
||||||
|
</span>
|
||||||
|
<span ng-show="loading">
|
||||||
|
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting...
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="extra-margin-bottom"></div>
|
<div class="extra-margin-bottom"></div>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<div ng-controller="CreateController">
|
<div ng-controller="CreateController">
|
||||||
<div data-alert ng-show="loading">
|
<div ng-show="$root.starting">
|
||||||
<div ng-include="'views/includes/loading.html'" ng-init="title = 'Creating wallet'"></div>
|
<div ng-include="'views/includes/loading.html'" ng-init="title = 'Creating wallet'"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setup" ng-show="!loading && !$root.starting">
|
<div class="setup" ng-show="!$root.starting">
|
||||||
<form name="setupForm" ng-submit="create(setupForm)" novalidate>
|
<form name="setupForm" ng-submit="create(setupForm)" novalidate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<button translate type="submit" class="button primary expand m0" ng-disabled="setupForm.$invalid || loading">
|
<button translate type="submit" class="button primary expand m0" ng-disabled="setupForm.$invalid">
|
||||||
Create {{requiredCopayers}}-of-{{totalCopayers}} wallet
|
Create {{requiredCopayers}}-of-{{totalCopayers}} wallet
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div ng-include="'views/includes/loading.html'" ng-init="title = 'Creating profile'"></div>
|
<div ng-include="'views/includes/loading.html'" ng-init="title = 'Creating profile'"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="large-4 large-centered medium-7 medium-centered columns m20b" ng-show="!$root.starting && !askForPin">
|
<div class="large-4 large-centered medium-7 medium-centered columns m20b" ng-show="!$root.starting && !askForPin">
|
||||||
<div class="logo-setup hide-for-small-only" ng-hide="hideForWP">
|
<div class="logo-setup hide-for-small-only" ng-hide="hideForWP">
|
||||||
<img src="img/logo-negative-beta.svg" alt="Copay" width="100">
|
<img src="img/logo-negative-beta.svg" alt="Copay" width="100">
|
||||||
</div>
|
</div>
|
||||||
|
@ -205,39 +205,38 @@
|
||||||
<img src="img/clipo-pin.png" alt="clipo" width="380">
|
<img src="img/clipo-pin.png" alt="clipo" width="380">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box-notification" ng-show="error && !passwordStrength">
|
<div class="box-notification" ng-show="error && !passwordStrength">
|
||||||
<div class="box-icon error">
|
<div class="box-icon error">
|
||||||
<i class="fi-x size-24"></i>
|
<i class="fi-x size-24"></i>
|
||||||
</div>
|
</div>
|
||||||
<span class="text-warning size-14">
|
<span class="text-warning size-14">
|
||||||
{{error|translate}}
|
{{error|translate}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form name="setPinForm" novalidate>
|
<form name="setPinForm" ng-model="setPinForm" novalidate>
|
||||||
<div class="input" ng-if="askForPin == 1">
|
<div class="input" ng-if="askForPin == 1">
|
||||||
<input id="newpin" type="tel" ng-model="newpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="PIN" name="newpin" required show-focus="askForPin == 1 && !isWindowsPhoneApp" ng-focus="formFocus()">
|
<input id="newpin" type="tel" ng-model="newpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="PIN" name="newpin" required show-focus="askForPin == 1 && !isWindowsPhoneApp" ng-focus="formFocus()">
|
||||||
<i class="icon-locked" ng-hide="isWindowsPhoneApp"></i>
|
<i class="icon-locked" ng-hide="isWindowsPhoneApp"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="input" ng-if="askForPin == 2">
|
<div class="input" ng-if="askForPin == 2">
|
||||||
<input id="repeatpin" type="tel" ng-model="repeatpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="Confirm your PIN" name="repeatpin" required show-focus="askForPin == 2 && !isWindowsPhoneApp" ng-focus="formFocus()">
|
<input id="repeatpin" type="tel" ng-model="repeatpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="Confirm your PIN" name="repeatpin" required show-focus="askForPin == 2 && !isWindowsPhoneApp" ng-focus="formFocus()">
|
||||||
<i class="icon-locked" ng-hide="isWindowsPhoneApp"></i>
|
<i class="icon-locked"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-setup-footer row collapse">
|
<div class="box-setup-footer row collapse">
|
||||||
<div class="large-6 medium-6 small-6 columns">
|
<div class="large-6 medium-6 small-6 columns">
|
||||||
<a class="button secondary radius m0" ng-click="createDefaultWallet()">
|
<a class="button secondary radius m0" ng-click="createDefaultWallet()">
|
||||||
<span translate>Skip</span>
|
<span translate>Skip</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
|
||||||
<div class="large-6 medium-6 small-6 columns text-right">
|
|
||||||
<button translate ng-click="createPin(setPinForm.repeatpin.$modelValue)" class="button primary radius expand m0"
|
|
||||||
ng-disabled="setPinForm.$invalid || error">
|
|
||||||
OK
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="large-6 medium-6 small-6 columns text-right">
|
||||||
</form>
|
<button translate ng-click="createPin(setPinForm.repeatpin.$modelValue)" class="button primary radius expand m0"
|
||||||
|
ng-disabled="setPinForm.$invalid || error">
|
||||||
|
OK
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<div ng-init="$root.title = 'Page not found'"
|
<div ng-init="$root.title = 'Page not found'"
|
||||||
ng-class="{'wide-page':!$root.wallet}">
|
ng-class="{'wide-page':!$root.iden}">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<img ng-show="$root.wallet" src="img/logo.svg" alt="Copay">
|
<img ng-show="$root.iden" src="img/logo.svg" alt="Copay">
|
||||||
<img ng-show="!$root.wallet" src="img/logo-negative.svg" alt="Copay">
|
<img ng-show="!$root.iden" src="img/logo-negative.svg" alt="Copay">
|
||||||
</div>
|
</div>
|
||||||
<h1 class="text-center" ng-class="{'text-white': !$root.wallet}">404</h1>
|
<h1 class="text-center" ng-class="{'text-white': !$root.iden}">404</h1>
|
||||||
<h3 translate class="text-center" ng-class="{'text-white': !$root.wallet}">Page not found</h3>
|
<h3 translate class="text-center" ng-class="{'text-white': !$root.iden}">Page not found</h3>
|
||||||
<p class="text-center"><a href="#!/">« <span translate>Back</span></a></p>
|
<p class="text-center"><a href="#!/">« <span translate>Back</span></a></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="extra-margin-bottom"></div>
|
<div class="extra-margin-bottom"></div>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="scroll-section">
|
<div class="scroll-section">
|
||||||
<ul class="sidebar-mobile-wallets oh off-canvas-list m10b" ng-show="wallets[0]">
|
<ul class="sidebar-mobile-wallets oh off-canvas-list m10b">
|
||||||
<li
|
<li ng-show="wallets[0]"
|
||||||
ng-repeat="item in wallets track by $index"
|
ng-repeat="item in wallets track by $index"
|
||||||
ng-class="{'selected': item.id == $root.wallet.id}"
|
ng-class="{'selected': item.id == $root.wallet.id}"
|
||||||
class="nav-item" ng-click="switchWallet(item.id)" >
|
class="nav-item" ng-click="switchWallet(item.id)" >
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="join" ng-controller="JoinController">
|
<div class="join" ng-controller="JoinController">
|
||||||
<div ng-show="loading">
|
<div ng-show="$root.starting">
|
||||||
<div ng-include="'views/includes/loading.html'" ng-init="title = 'Connecting to Insight Wallet Server'"></div>
|
<div ng-include="'views/includes/loading.html'" ng-init="title = 'Connecting to Insight Wallet Server'"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="!loading">
|
<div ng-show="!$root.starting">
|
||||||
<div class="row hide-for-large-up">
|
<div class="row hide-for-large-up">
|
||||||
<div class="large-12 medium-12 small-12 columns">
|
<div class="large-12 medium-12 small-12 columns">
|
||||||
<h1>{{$root.title}}</h1>
|
<h1>{{$root.title}}</h1>
|
||||||
|
@ -73,7 +73,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- End !loading -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="extra-margin-bottom"></div>
|
<div class="extra-margin-bottom"></div>
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
<div class="text-center" ng-init="isComplete = item.isComplete(); networkName = item.getNetworkName()">
|
|
||||||
<div ng-show="!confirmDelete">
|
|
||||||
<h1>{{item.name || item.id }}</h1>
|
|
||||||
<h3>
|
|
||||||
{{item.requiredCopayers}} of {{item.totalCopayers}} - {{networkName}}
|
|
||||||
, {{isComplete ? 'Complete' : 'Waiting for copayers...'}}
|
|
||||||
</h3>
|
|
||||||
<div class="m10b" ng-if="isComplete">
|
|
||||||
<b>{{item.balanceInfo.totalBalance || 0}} {{item.settings.unitName}}</b>
|
|
||||||
</div>
|
|
||||||
<div class="m20b">
|
|
||||||
Approximate size: {{item.kb}} kB
|
|
||||||
<span ng-if="item.usage">({{item.usage}}%) </span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="box-notification" ng-show="error">
|
|
||||||
<div class="box-icon error">
|
|
||||||
<i class="fi-x size-24"></i>
|
|
||||||
</div>
|
|
||||||
<span class="text-warning size-14">
|
|
||||||
{{error|translate}}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row" ng-show="!backupWalletPlainText && !error">
|
|
||||||
<div class="large-6 medium-6 small-12 columns">
|
|
||||||
<button class="primary expand" ng-click="downloadWalletBackup()" ng-disabled="loading"
|
|
||||||
ng-show="!isSafari && !isCordova"><i class="fi-download"></i> Download backup</button>
|
|
||||||
<button class="primary expand" ng-click="viewWalletBackup()" ng-disabled="loading"
|
|
||||||
ng-show="isSafari || isCordova"><i class="fi-eye"></i> View Backup</button>
|
|
||||||
</div>
|
|
||||||
<div class="large-6 medium-6 small-12 columns">
|
|
||||||
<button class="warning expand" ng-click="confirmDelete=!confirmDelete">
|
|
||||||
<i class="fi-trash"></i> Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div ng-show="backupWalletPlainText">
|
|
||||||
<h3>Copy backup in a safe place</h3>
|
|
||||||
<div class="input">
|
|
||||||
<textarea class="show-for-large-up" readonly rows="7">{{backupWalletPlainText}}</textarea>
|
|
||||||
<textarea class="hide-for-large-up" rows="12">{{backupWalletPlainText}}</textarea>
|
|
||||||
<i class="icon-compose"></i>
|
|
||||||
</div>
|
|
||||||
<div translate class="m10t size-12 text-gray text-right">
|
|
||||||
Copy this text as it is in a safe place (notepad or email)
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a class="close-reveal-modal" ng-click="close()"><i class="fi-x size-18"></i></a>
|
|
||||||
</div>
|
|
||||||
<div class="row" ng-show="confirmDelete">
|
|
||||||
<h1>Are you sure you want to delete the wallet
|
|
||||||
<strong>{{(item.name || item.id)}}</strong>
|
|
||||||
</h1>
|
|
||||||
<div class="large-6 medium-6 small-6 columns">
|
|
||||||
<button class="gray" ng-disabled="loading"
|
|
||||||
ng-click="confirmDelete=!confirmDelete">Cancel</button>
|
|
||||||
</div>
|
|
||||||
<div class="large-6 medium-6 small-6 columns">
|
|
||||||
<button class="warning" ng-disabled="loading" ng-click="deleteWallet()">
|
|
||||||
<span ng-show="!loading">
|
|
||||||
<i class="fi-trash"></i> Delete
|
|
||||||
</span>
|
|
||||||
<span ng-show="loading">
|
|
||||||
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting...
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -22,7 +22,58 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<div class="row" ng-init="isComplete = wallet.isComplete(); networkName = wallet.getNetworkName()">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<h4>Wallet info</h4>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Name:</strong></td>
|
||||||
|
<td>{{wallet.name || wallet.id }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Status:</strong></td>
|
||||||
|
<td>{{isComplete ? 'Complete' : 'Waiting for copayers...'}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Type:</strong></td>
|
||||||
|
<td>{{wallet.requiredCopayers}} of {{wallet.totalCopayers}} - {{networkName}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Balance:</strong></td>
|
||||||
|
<td><span ng-if="isComplete">{{wallet.balanceInfo.totalBalance || 0}} {{wallet.settings.unitName}}</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Aprox. size:</strong></td>
|
||||||
|
<td>{{wallet.kb}} kB <span ng-if="wallet.usage">({{wallet.usage}}%)</span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" ng-show="!backupWalletPlainText && !error">
|
||||||
|
<div class="large-12 medium-12 small-12 columns">
|
||||||
|
<button class="primary expand" ng-click="downloadWalletBackup()" ng-disabled="loading"
|
||||||
|
ng-show="!isSafari && !isCordova"><i class="fi-download"></i> Download backup</button>
|
||||||
|
<button class="primary expand" ng-click="viewWalletBackup()" ng-disabled="loading"
|
||||||
|
ng-show="isSafari || isCordova"><i class="fi-eye"></i> View Backup</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" ng-show="backupWalletPlainText">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<h3>Copy backup in a safe place</h3>
|
||||||
|
<div class="input">
|
||||||
|
<textarea class="show-for-large-up" readonly rows="7">{{backupWalletPlainText}}</textarea>
|
||||||
|
<textarea class="hide-for-large-up" rows="12">{{backupWalletPlainText}}</textarea>
|
||||||
|
<i class="icon-compose"></i>
|
||||||
|
</div>
|
||||||
|
<div translate class="m10t size-12 text-gray text-right">
|
||||||
|
Copy this text as it is in a safe place (notepad or email)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="m20b row">
|
<div class="m20b row">
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
<a class="small left button-setup" ng-click="hideAdv=!hideAdv">
|
<a class="small left button-setup" ng-click="hideAdv=!hideAdv">
|
||||||
|
@ -37,6 +88,45 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-hide="hideAdv" class="row">
|
<div ng-hide="hideAdv" class="row">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<div class="panel">
|
||||||
|
<h2><i class="fi-minus-circle m10r"></i>
|
||||||
|
<span translate>Delete wallet</span>
|
||||||
|
</h2>
|
||||||
|
<div class="box-notification" ng-show="error">
|
||||||
|
<div class="box-icon error">
|
||||||
|
<i class="fi-x size-24"></i>
|
||||||
|
</div>
|
||||||
|
<span class="text-warning size-14">
|
||||||
|
{{error|translate}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<p translate class="text-gray">Permanently delete this wallet. WARNING: this action cannot be reversed.</p>
|
||||||
|
<div ng-show="!confirmDelete">
|
||||||
|
<a translate class="button warning m0" ng-click="confirmDelete=!confirmDelete">Delete wallet
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="text-center" ng-show="confirmDelete">
|
||||||
|
<h2>Are you sure you want to delete this wallet?</h2>
|
||||||
|
<div class="row">
|
||||||
|
<div class="large-6 medium-6 small-6 columns">
|
||||||
|
<button class="gray" ng-disabled="loading"
|
||||||
|
ng-click="confirmDelete=!confirmDelete">Cancel</button>
|
||||||
|
</div>
|
||||||
|
<div class="large-6 medium-6 small-6 columns">
|
||||||
|
<button class="warning" ng-disabled="loading" ng-click="deleteWallet()">
|
||||||
|
<span ng-show="!loading">
|
||||||
|
<i class="fi-trash"></i> Delete
|
||||||
|
</span>
|
||||||
|
<span ng-show="loading">
|
||||||
|
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting...
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<h2><i class="fi-minus-circle m10r"></i>
|
<h2><i class="fi-minus-circle m10r"></i>
|
||||||
|
|
|
@ -35,75 +35,20 @@
|
||||||
|
|
||||||
<div class="line-dashed-h m20b"></div>
|
<div class="line-dashed-h m20b"></div>
|
||||||
|
|
||||||
<div class="row" ng-init="setWallets()">
|
<div class="row size-12 m20b">
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
<h2>Manage wallets</h2>
|
<div ng-if="perItem">
|
||||||
|
Your current server usage quotas are: <b>{{perItem}}kB</b> per wallet and up to <b>{{nrWallets}}</b> wallets.
|
||||||
<div class="box-notification" ng-show="success">
|
|
||||||
<div class="box-icon success">
|
|
||||||
<i class="fi-check size-24"></i>
|
|
||||||
</div>
|
|
||||||
<span class="text-success size-14">
|
|
||||||
{{success|translate}}
|
|
||||||
</span>
|
|
||||||
<a href ng-click="success=false" class="close-notification success">×</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div ng-if="$root.needsEmailConfirmation" class="m10t">
|
||||||
<table class="manage-wallets">
|
<i class="fi-alert"></i> Confirm your email address to increase storage usage limits.
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Type</th>
|
|
||||||
<th class="hide-for-small-only">Status</th>
|
|
||||||
<th class="hide-for-small-only">Balance</th>
|
|
||||||
<th class="hide-for-small-only">Approx Size</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr
|
|
||||||
data-ng-repeat="item in wallets | orderBy:'name'"
|
|
||||||
ng-init="isComplete = item.isComplete(); networkName = item.getNetworkName()"
|
|
||||||
ng-click="showWalletInfo(item)">
|
|
||||||
<td>
|
|
||||||
<span ng-show="loading == item.id"><i class="fi-bitcoin-circle icon-rotate spinner"></i></span>
|
|
||||||
<span ng-show="loading != item.id">
|
|
||||||
{{item.name || item.id }}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>{{item.requiredCopayers}} of {{item.totalCopayers}} - {{networkName}}</td>
|
|
||||||
<td class="hide-for-small-only">
|
|
||||||
{{isComplete ? 'Complete' : 'Waiting for copayers...'}}
|
|
||||||
</td>
|
|
||||||
<td class="hide-for-small-only">
|
|
||||||
<span ng-if="!isComplete">-</span>
|
|
||||||
<span ng-if="isComplete">
|
|
||||||
{{item.balanceInfo.totalBalance || 0}} {{item.settings.unitName}}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class="hide-for-small-only">
|
|
||||||
<span>
|
|
||||||
{{item.kb}} kB
|
|
||||||
<span ng-if="item.usage">({{item.usage}}%) </span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="size-12">
|
|
||||||
<div ng-if="perItem">
|
|
||||||
Your current server usage quotas are: <b>{{perItem}}kB</b> per wallet and up to <b>{{nrWallets}}</b> wallets.
|
|
||||||
</div>
|
|
||||||
<div ng-if="$root.needsEmailConfirmation" class="m10t">
|
|
||||||
<i class="fi-alert"></i> Confirm your email address to increase storage usage limits.
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="line-dashed-h m20b"></div>
|
<div class="line-dashed-h m20b"></div>
|
||||||
|
|
||||||
<div class="row oh">
|
<div class="row oh m20b">
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
<a class="small left button-setup" ng-click="hideAdv=!hideAdv">
|
<a class="small left button-setup" ng-click="hideAdv=!hideAdv">
|
||||||
<i class="fi-widget m3r"></i>
|
<i class="fi-widget m3r"></i>
|
||||||
|
@ -131,10 +76,18 @@
|
||||||
<h2>Are you sure you want to delete this profile?</h2>
|
<h2>Are you sure you want to delete this profile?</h2>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="large-6 medium-6 small-6 columns">
|
<div class="large-6 medium-6 small-6 columns">
|
||||||
<a translate class="button gray m0" ng-click="confirmDelete=!confirmDelete">Cancel</a>
|
<button class="gray" ng-disabled="loading"
|
||||||
|
ng-click="confirmDelete=!confirmDelete">Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="large-6 medium-6 small-6 columns">
|
<div class="large-6 medium-6 small-6 columns">
|
||||||
<a translate class="button warning m0" ng-click="deleteProfile()">Delete</a>
|
<button class="warning" ng-disabled="loading" ng-click="deleteProfile()">
|
||||||
|
<span ng-show="!loading">
|
||||||
|
<i class="fi-trash"></i> Delete
|
||||||
|
</span>
|
||||||
|
<span ng-show="loading">
|
||||||
|
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting...
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue