Rename manage by profile. Created a new page "createWallet"

This commit is contained in:
Gustavo Maximiliano Cortez 2014-11-11 16:01:33 -03:00
parent 81527aa028
commit 4b8e18735d
12 changed files with 78 additions and 62 deletions

View File

@ -176,7 +176,7 @@ header .alt-currency {
border-bottom-left-radius: 3px;
position: absolute;
right: 14px;
width: 100px;
width: 180px;
list-style-type: none;
top: 47px;nt
}

View File

@ -0,0 +1,5 @@
'use strict';
angular.module('copayApp.controllers').controller('CreateWalletController', function($scope, $rootScope) {
$rootScope.title = 'Create Wallet';
});

View File

@ -1,8 +1,8 @@
'use strict';
angular.module('copayApp.controllers').controller('ManageController', function($scope, $rootScope, $location, controllerUtils, backupService) {
angular.module('copayApp.controllers').controller('ProfileController', function($scope, $rootScope, $location, controllerUtils, backupService) {
$scope.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
$rootScope.title = 'Manage wallets';
$rootScope.title = 'Profile';
$scope.downloadBackup = function() {
backupService.profileDownload($rootScope.iden);

View File

@ -73,8 +73,12 @@ angular
templateUrl: 'views/warning.html',
logged: true
})
.when('/manage', {
templateUrl: 'views/manage.html',
.when('/profile', {
templateUrl: 'views/profile.html',
logged: true
})
.when('/createWallet', {
templateUrl: 'views/createWallet.html',
logged: true
});

View File

@ -229,7 +229,7 @@ angular.module('copayApp.services')
if (w) {
root.setFocusedWallet(w);
} else {
$location.path('/manage');
$location.path('/createWallet');
}
$timeout(function() {
$rootScope.$digest()

View File

@ -57,7 +57,7 @@
<div class="text-right">
<a class="back-button m20r text-primary" href="#!/manage">
<a class="back-button m20r text-primary" href="#!/createWallet">
<i class="icon-arrow-left2 vm"></i>
<span translate>Back</span>
</a>

26
views/createWallet.html Normal file
View File

@ -0,0 +1,26 @@
<div class="backup" ng-controller="CreateWalletController">
<h1 class="hide-for-large-up">{{$root.title}}</h1>
<div class="row">
<div class="large-4 columns" >
<div class="panel text-center" ui-route="{{create}}">
<div><i class="size-72 fi-plus text-gray"></i></div>
<p class="text-gray">Create a new Wallet</p>
<a href="#!/create" class="button primary radius" title="Create"> {{'Create' | translate }} </a>
</div>
</div>
<div class="large-4 columns" ui-route="{{create}}">
<div class="panel text-center">
<div><i class="size-72 fi-torsos-all text-gray"></i></div>
<p class="text-gray">Join an existent Wallet</p>
<a href="#!/join" class="button secondary radius" title="Join"> {{'Join' | translate }} </a>
</div>
</div>
<div class="large-4 columns" ui-route="{{create}}">
<div class="panel text-center">
<div><i class="size-72 fi-download text-gray"></i></div>
<p class="text-gray">Import a Wallet to Copay</p>
<a href="#!/import" class="button black radius" title="Import"> {{'Import wallet' | translate }}</a>
</div>
</div>
</div>
</div>

View File

@ -76,7 +76,7 @@
<div class="text-right m20t">
<a class="back-button m20r text-black" href="#!/manage">
<a class="back-button m20r text-black" href="#!/createWallet">
<i class="icon-arrow-left2 vm"></i>
<span translate>Back</span>
</a>

View File

@ -22,11 +22,12 @@
<i class="icon-arrow-down size-16 vm"></i>
</a>
<ul ng-show="hoverMenu" ng-class="{'hover': hoverMenu}">
<li><a class="text-gray size-16" href="#!/profile" title="Profile">
<i class="fi-torso m10r"></i> {{'Profile'|translate}}</a></li>
<li><a class="text-gray size-16" href="#!/createWallet" title="Create Wallet">
<i class="fi-plus m10r"></i> {{'Create Wallet'|translate}}</a></li>
<li><a class="text-gray size-16" href="#!/" title="Close" ng-click="signout()">
<i class="fi-power m10r"></i> {{'Close'|translate}}</a></li>
</ul>
</div>
<div class="right">
<a class="button tiny secondary radius m0" href="#!/manage" title="Manage wallets"><i class="fi-plus"></i> {{'Manage wallets' | translate }}</a>
</div>

View File

@ -56,7 +56,8 @@
</li>
</ul>
<div class="off-canvas-list" ng-click="toggleWalletSelection()">
<a href="#!/manage" class="button-setup add-wallet db p20h" title="Create"><i class="m5r fi-plus"></i> {{'Add Wallet' | translate }} </a>
<a href="#!/createWallet" class="button-setup add-wallet db p20h"
title="Create"><i class="m5r fi-plus"></i> {{'Create Wallet' | translate }} </a>
</div>
</div>
<div class="line-t" ng-show="!walletSelection" ng-click="refresh()">
@ -88,8 +89,12 @@
</a>
</li>
<li>
<a ui-route="{{create}}" href="#!/manage" class="db p20h" title="Create">
<i class="size-24 m20r fi-plus"></i> {{'Manage wallets' | translate }} </a>
<a href="#!/profile" class="db p20h" title="Profile">
<i class="size-24 m20r fi-torso"></i> {{'Profile' | translate }} </a>
</li>
<li>
<a href="#!/createWallet" class="db p20h" title="Create">
<i class="size-24 m20r fi-plus"></i> {{'Create Wallet' | translate }} </a>
</li>
<li>
<a href="#!/" class="db p20h" title="Close"

View File

@ -70,7 +70,7 @@
</div>
<div class="text-right">
<a class="back-button m20r" href="#!/manage">
<a class="back-button m20r" href="#!/createWallet">
<i class="icon-arrow-left2 vm"></i>
<span translate>Back</span>
</a>

View File

@ -1,33 +1,32 @@
<div class="backup" ng-controller="ManageController">
<div class="backup" ng-controller="ProfileController">
<h1 class="hide-for-large-up">{{$root.title}}</h1>
<div class="row">
<div class="large-4 columns" >
<div class="panel text-center" ui-route="{{create}}">
<div><i class="size-72 fi-plus text-gray"></i></div>
<p class="text-gray">Create a new Wallet</p>
<a href="#!/create" class="button primary radius" title="Create"> {{'Create' | translate }} </a>
</div>
</div>
<div class="large-4 columns" ui-route="{{create}}">
<div class="panel text-center">
<div><i class="size-72 fi-torsos-all text-gray"></i></div>
<p class="text-gray">Join an existent Wallet</p>
<a href="#!/join" class="button secondary radius" title="Join"> {{'Join' | translate }} </a>
</div>
</div>
<div class="large-4 columns" ui-route="{{create}}">
<div class="panel text-center">
<div><i class="size-72 fi-download text-gray"></i></div>
<p class="text-gray">Import a Wallet to Copay</p>
<a href="#!/import" class="button black radius" title="Import"> {{'Import wallet' | translate }}</a>
</div>
<div class="large-12 columns">
<div class="panel">
<h2><i class="fi-download m10r"></i> <span translate>Backup Profile</span></h2>
<p translate class="text-gray">It's important to backup your profile so that you can recover it in case of disaster. The backup will include all your profile's wallets</p>
<a translate class="button primary m0" ng-click="downloadBackup()"
ng-show="!isSafari">Backup profile</a>
<a translate class="button primary m0" ng-click="viewBackup()"
ng-show="isSafari && !hideViewBackup">View profile backup</a>
<div ng-show="backupPlainText">
<textarea rows="5">{{backupPlainText}}</textarea>
<div class="show-for-large-up">
<span translate class="size-12">Copy to clipboard</span> <span class="btn-copy" clip-copy="backupPlainText"> </span>
</div>
<div class="hide-for-large-up">
<span translate class="size-12">Copy this text as it is in a safe place (notepad or email)</span>
</div>
</div>
</div>
</div>
</div>
<div class="line-dashed-h m20b"></div>
<div class="row" ng-init="getWallets()">
<div class="large-12 columns">
<h2>Manage wallets</h2>
<table width="100%" role="grid">
<thead>
<tr>
@ -66,29 +65,5 @@
</tbody>
</table>
</div>
</div>
<div class="line-dashed-h m20b"></div>
<div class="row">
<div class="large-12 columns">
<div class="panel">
<h2><i class="fi-download m10r"></i> <span translate>Backup Profile</span></h2>
<p translate class="text-gray">It's important to backup your profile so that you can recover it in case of disaster. The backup will include all your profile's wallets</p>
<a translate class="button primary m0" ng-click="downloadBackup()"
ng-show="!isSafari">Backup profile</a>
<a translate class="button primary m0" ng-click="viewBackup()"
ng-show="isSafari && !hideViewBackup">View profile backup</a>
<div ng-show="backupPlainText">
<textarea rows="5">{{backupPlainText}}</textarea>
<div class="show-for-large-up">
<span translate class="size-12">Copy to clipboard</span> <span class="btn-copy" clip-copy="backupPlainText"> </span>
</div>
<div class="hide-for-large-up">
<span translate class="size-12">Copy this text as it is in a safe place (notepad or email)</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>