commit
418bbc7c43
12 changed files with 66 additions and 82 deletions
|
|
@ -62,7 +62,7 @@
|
|||
<section class="left-small">
|
||||
<a class="left-off-canvas-toggle menu-icon" ><span></span></a>
|
||||
</section>
|
||||
<section class="right-small">
|
||||
<section class="right-small" ng-if="$root.iden && $root.iden.listWallets().length >1">
|
||||
<a class="right-off-canvas-toggle p10"><i class="icon-wallet size-24"></i></a>
|
||||
</section>
|
||||
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
<div ng-include="'views/includes/sidebar-mobile.html'"></div>
|
||||
</aside>
|
||||
|
||||
<aside class="right-off-canvas-menu">
|
||||
<aside class="right-off-canvas-menu" ng-if="$root.iden && $root.iden.listWallets().length >1">
|
||||
<div ng-include="'views/includes/walletbar-mobile.html'"></div>
|
||||
</aside>
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
// mobile
|
||||
if ($scope.isMobile) {
|
||||
_credentials = {
|
||||
email: form.email.$modelValue,
|
||||
password: form.password.$modelValue,
|
||||
email: emailOrUsername,
|
||||
password: password,
|
||||
};
|
||||
$scope.askForPin = 1;
|
||||
$rootScope.hideNavigation = true;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $location, $timeout, notification, identityService, Compatibility, pinService, applicationService, isMobile) {
|
||||
|
||||
// Global functions (TODO should be somewhere else)
|
||||
$rootScope.go = function (path) {
|
||||
$location.path(path);
|
||||
};
|
||||
|
||||
var _credentials, _firstpin;
|
||||
$scope.init = function() {
|
||||
|
|
@ -56,21 +60,6 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
|||
}
|
||||
});
|
||||
|
||||
$scope.done = function() {
|
||||
$rootScope.starting = false;
|
||||
$rootScope.$digest();
|
||||
};
|
||||
|
||||
|
||||
$scope.$on("$destroy", function() {
|
||||
var iden = $rootScope.iden;
|
||||
if (iden) {
|
||||
iden.removeListener('newWallet', $scope.done);
|
||||
iden.removeListener('noWallets', $scope.done);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$scope.openWithPin = function(pin) {
|
||||
|
||||
if (!pin) {
|
||||
|
|
@ -92,11 +81,8 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
|||
$scope.openWallets = function() {
|
||||
preconditions.checkState($rootScope.iden);
|
||||
var iden = $rootScope.iden;
|
||||
|
||||
$rootScope.hideNavigation = false;
|
||||
$rootScope.starting = true;
|
||||
iden.on('newWallet', $scope.done);
|
||||
iden.on('noWallets', $scope.done);
|
||||
iden.openWallets();
|
||||
};
|
||||
|
||||
|
|
@ -169,7 +155,6 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
|||
|
||||
// mobile
|
||||
if ($scope.isMobile && !$rootScope.hasPin) {
|
||||
$scope.done();
|
||||
_credentials = {
|
||||
email: email,
|
||||
password: password,
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ angular.module('copayApp.controllers').controller('HomeWalletController', functi
|
|||
removeWatch();
|
||||
w.removeListener('txProposalEvent', _updateTxs);
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
$scope.setAlternativeAmount = function(w, tx, cb) {
|
||||
rateService.whenAvailable(function() {
|
||||
|
|
|
|||
|
|
@ -89,14 +89,14 @@ angular.module('copayApp.controllers').controller('SettingsController', function
|
|||
}),
|
||||
},
|
||||
function() {
|
||||
notification.success('Settings saved');
|
||||
notification.success('Settings saved',"Settings were saved");
|
||||
$location.path('/');
|
||||
});
|
||||
};
|
||||
|
||||
$scope.reset = function() {
|
||||
configService.reset(function() {
|
||||
notification.success('Settings reseted');
|
||||
notification.success('Settings reseted',"Settings were reseted");
|
||||
$location.path('/');
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
|
|||
'link': 'more'
|
||||
}];
|
||||
|
||||
$scope.go = function (path) {
|
||||
$location.path(path);
|
||||
};
|
||||
|
||||
$scope.signout = function() {
|
||||
$rootScope.signingOut = true;
|
||||
identityService.signout();
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ angular.module('copayApp.services')
|
|||
root.goWalletHome = function() {
|
||||
var w = $rootScope.wallet;
|
||||
if (w) {
|
||||
$rootScope.starting = false;
|
||||
if (!w.isComplete()) {
|
||||
$location.path('/copayers');
|
||||
} else {
|
||||
|
|
@ -233,7 +234,7 @@ angular.module('copayApp.services')
|
|||
|
||||
w.on('txProposalEvent', function(e) {
|
||||
if (root.isFocused(wid)) {
|
||||
pendingTxsService.update();
|
||||
pendingTxsService.update();
|
||||
}
|
||||
|
||||
balanceService.update(w, function() {
|
||||
|
|
@ -288,7 +289,6 @@ angular.module('copayApp.services')
|
|||
|
||||
var self = this;
|
||||
root.setupGlobalVariables(iden);
|
||||
|
||||
iden.on('newWallet', function(wid) {
|
||||
var w = iden.getWalletById(wid);
|
||||
copay.logger.debug('newWallet:', w.getName(), wid, iden.getLastFocusedWalletId());
|
||||
|
|
@ -298,20 +298,25 @@ angular.module('copayApp.services')
|
|||
root.setFocusedWallet(w, true);
|
||||
root.goWalletHome();
|
||||
}
|
||||
|
||||
// At the end (after all handlers are in place)...start the wallet.
|
||||
w.netStart();
|
||||
});
|
||||
|
||||
iden.on('noWallets', function() {
|
||||
notification.warning('No Wallets','Your profile has no wallets. Create one here');
|
||||
$rootScope.starting = false;
|
||||
$location.path('/create');
|
||||
$rootScope.$digest()
|
||||
$timeout(function() {
|
||||
$rootScope.$digest();
|
||||
}, 1);
|
||||
});
|
||||
|
||||
iden.on('walletDeleted', function(wid) {
|
||||
// do nothing. this is handled 'on sync' on controller.
|
||||
});
|
||||
|
||||
iden.on('walletStorageError', function (wid, message) {
|
||||
iden.on('walletStorageError', function(wid, message) {
|
||||
notification.error('Error storing wallet', message);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="large-4 large-centered medium-6 medium-centered columns m20b" ng-show="!loading && !askForPin">
|
||||
<div class="logo-setup">
|
||||
<div class="large-5 large-centered medium-6 medium-centered columns m20b" ng-show="!loading && !askForPin">
|
||||
<div class="logo-setup hide-for-small-only">
|
||||
<img src="img/logo-negative-beta.svg" alt="Copay" width="100">
|
||||
<div ng-include="'views/includes/version.html'"></div>
|
||||
</div>
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
</tab>
|
||||
<tab style="width: 50%;" select="selectStorage('local')">
|
||||
<tab-heading>
|
||||
<div class="m5t text-bold">In this Device </div>
|
||||
<div class="m5t text-bold">On this Device </div>
|
||||
</tab-heading>
|
||||
<div class="content-item">
|
||||
<div class="bg-circle"><i class="icon-locked"></i>
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
|
||||
<button translate class="button primary radius expand m0" ng-click="goToEmail()">
|
||||
<span ng-if="!useLocalstorage"> Create in the cloud</span>
|
||||
<span ng-if="useLocalstorage"> Create in this device</span>
|
||||
<span ng-if="useLocalstorage"> Create on this device</span>
|
||||
</button>
|
||||
|
||||
<div class="box-setup-footer">
|
||||
|
|
@ -113,8 +113,8 @@
|
|||
<img src="img/clipo-signup2.png" alt="clipo" width="373">
|
||||
</div>
|
||||
|
||||
<h2 ng-if="useLocalstorage"> Creating in this device </h2>
|
||||
<h2 ng-if="!useLocalstorage"> Creating in the cloud </h2>
|
||||
<h2 ng-if="useLocalstorage"> Creating on this device </h2>
|
||||
|
||||
<div class="input" ng-if="useEmail">
|
||||
<input type="email" ng-model="email" class="form-control fi-email" name="email" placeholder="Email" required auto-focus="!isMobile">
|
||||
|
|
@ -158,7 +158,7 @@
|
|||
<img src="img/clipo-signup3.png" alt="clipo" width="380">
|
||||
</div>
|
||||
|
||||
<h2 ng-if="useLocalstorage"> Creating in this device </h2>
|
||||
<h2 ng-if="useLocalstorage"> Creating on this device </h2>
|
||||
<h2 ng-if="!useLocalstorage"> Creating in the cloud </h2>
|
||||
<div class="text-gray text-center m20b"> {{userOrEmail}} </div>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="large-4 large-centered medium-7 medium-centered columns" ng-show="!$root.starting">
|
||||
<div class="large-5 large-centered medium-7 medium-centered columns" ng-show="!$root.starting">
|
||||
<div class="logo-setup" ng-show="!$root.iden">
|
||||
<img src="img/logo-negative-beta.svg" alt="Copay" width="100">
|
||||
<div ng-include="'views/includes/version.html'"></div>
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div ng-if='!$root.hasPin && !askForPin'>
|
||||
<div ng-if='!$root.hasPin && !askForPin && !$root.iden'>
|
||||
<div class="clipo">
|
||||
<img src="img/clipo-signin.png" alt="clipo" width="310">
|
||||
</div>
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
</div>
|
||||
<b>Copay now needs a profile to access wallets.</b>
|
||||
You can import your current wallets after
|
||||
<a class="text-white" href="#!/createProfile">creating your profile</a>
|
||||
<a class="text-white" ng-click="$root.go('/createProfile')">creating your profile</a>
|
||||
</div>
|
||||
<div class="p10 box-setup bg-success m20b text-white" ng-show="pendingPayment">
|
||||
<div class="left">
|
||||
|
|
@ -162,22 +162,24 @@
|
|||
|
||||
|
||||
<div class="box-setup-footer">
|
||||
|
||||
<div class="right">
|
||||
<a class="button-setup text-gray" ng-click="$root.go('/settings')">
|
||||
<i class="icon-wrench"></i>
|
||||
<span translate>Settings</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="left m10r">
|
||||
<a class="button-setup text-gray" href="#!/createProfile">
|
||||
<a class="button-setup text-gray" ng-click="$root.go('/createProfile')">
|
||||
<i class="icon-person"></i>
|
||||
<span translate>Create a profile</span>
|
||||
<span translate>Create profile</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="left">
|
||||
<a class="button-setup text-gray" href="#!/importProfile">
|
||||
<a class="button-setup text-gray" ng-click="$root.go('/importProfile')">
|
||||
<i class="icon-upload"></i>
|
||||
<span translate>Import a profile</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="right m10t">
|
||||
<a class="text-gray" href="#!/settings">
|
||||
<i class="icon-wrench"></i>
|
||||
<span translate>Settings</span>
|
||||
<span translate>Import</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="row collapse">
|
||||
<div class="medium-3 small-3 columns text-center bottombar-item" ng-repeat="item in menu" ui-route="{{item.link}}" ng-if="item.link!='more'">
|
||||
<a ng-click="go(item.link)" ng-class="{active: isActive(item)}">
|
||||
<a ng-click="$root.go(item.link)" ng-class="{active: isActive(item)}">
|
||||
<i class="size-36 {{item.icon}} db"></i>
|
||||
<div class="size-10 tu">
|
||||
{{item.title}}
|
||||
|
|
|
|||
|
|
@ -1,38 +1,39 @@
|
|||
<div>
|
||||
<div class="text-center off-canvas-list">
|
||||
<a href="#!/profile" class="columns m10v" title="Profile">
|
||||
<div class="photo-container">
|
||||
<img gravatar-src="'{{$root.iden.getName()}}'" gravatar-size="35">
|
||||
</div>
|
||||
<p class="text-black m5">{{$root.iden.getName()}}</p>
|
||||
<span class="db text-gray size-10" >
|
||||
<i class="fi-torso"></i> {{'ViewProfile' | translate }}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="off-canvas-list">
|
||||
<li>
|
||||
<a href="#!/create" class="db p20h nav-item" title="Create new wallet">
|
||||
<i class="size-24 m20r fi-plus"></i> {{'Create new wallet' | translate }} </a>
|
||||
<a href="#!/profile" class="db p20h nav-item text-center" title="Create new wallet">
|
||||
<div class="photo-container m20t">
|
||||
<img gravatar-src="'{{$root.iden.getName()}}'" gravatar-size="35">
|
||||
</div>
|
||||
<p class="text-black m5">{{$root.iden.getName()}}</p>
|
||||
<span class="db text-gray size-10">
|
||||
<i class="fi-torso"></i> {{'ViewProfile' | translate }}
|
||||
</span>
|
||||
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a href="#!/join" class="db p20h nav-item" title="Join shared wallet">
|
||||
<i class="size-24 m20r fi-torsos-all"></i> {{'Join shared wallet' | translate }} </a>
|
||||
<a href="#!/create" class="db p20h nav-item" title="Create new wallet">
|
||||
<i class="size-24 m20r fi-plus"></i> {{'Create new wallet' | translate }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#!/import" class="db p20h nav-item" title="Import wallet">
|
||||
<i class="size-24 m20r fi-download"></i> {{'Import a wallet' | translate }} </a>
|
||||
<a href="#!/join" class="db p20h nav-item" title="Join shared wallet">
|
||||
<i class="size-24 m20r fi-torsos-all"></i> {{'Join shared wallet' | translate }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#!/import" class="db p20h nav-item" title="Import wallet">
|
||||
<i class="size-24 m20r fi-download"></i> {{'Import a wallet' | translate }}</a>
|
||||
</li>
|
||||
<li ng-if="$root.wallet">
|
||||
<a href="#!/more" class="db p20h nav-item" title="Settings" >
|
||||
<i class="size-24 m20r fi-widget"></i> {{'Wallet Settings' | translate }} </a>
|
||||
<a href="#!/more" class="db p20h nav-item" title="Settings">
|
||||
<i class="size-24 m20r fi-widget"></i> {{'Wallet Settings' | translate }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#!/" class="db p20h nav-item" title="Close"
|
||||
ng-click="signout()">
|
||||
<span ng-if="!$root.hasPin"><i class="size-24 m20r fi-power"></i> {{'Close'|translate}}</span>
|
||||
<span ng-if="$root.hasPin"><i class="size-24 m20r fi-lock"></i> {{'Lock'|translate}}</span>
|
||||
</a>
|
||||
<a href="#!/" class="db p20h nav-item" title="Close" ng-click="signout()">
|
||||
<span ng-if="!$root.hasPin"><i class="size-24 m20r fi-power"></i> {{'Close'|translate}}</span>
|
||||
<span ng-if="$root.hasPin"><i class="size-24 m20r fi-lock"></i> {{'Lock'|translate}}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="text-gray size-12 text-center columns">
|
||||
|
|
|
|||
|
|
@ -2,11 +2,6 @@
|
|||
<header ng-show="$root.wallet">
|
||||
<h1>My wallets</h1>
|
||||
</header>
|
||||
<div class="side-nav text-center off-canvas-list" ng-show="!wallets[0]">
|
||||
<p class="size-12 text-gray m10t" translate>You do not have another wallets.</p>
|
||||
<a href="#!/create" class="db button secondary tiny" title="Create new wallet">
|
||||
<i class="m10r fi-plus"></i> {{'Create new wallet' | translate }} </a>
|
||||
</div>
|
||||
<ul class="side-nav wallets off-canvas-list" ng-show="wallets[0]">
|
||||
<li
|
||||
ng-repeat="item in wallets track by $index"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue