mirror of https://github.com/BTCPrivate/copay.git
separate create tab views
This commit is contained in:
parent
d6d54a4e35
commit
967fdff063
|
@ -10,8 +10,13 @@
|
|||
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create">
|
||||
<h2 translate>Create new wallet</h2>
|
||||
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create-personal">
|
||||
<h2 translate>New Personal Wallet</h2>
|
||||
<i class="icon nav-item-arrow-right"></i>
|
||||
</a>
|
||||
|
||||
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create-shared">
|
||||
<h2 translate>Create Shared Wallet</h2>
|
||||
<i class="icon nav-item-arrow-right"></i>
|
||||
</a>
|
||||
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
<ion-view>
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-title>{{'Create new wallet' | translate}}</ion-nav-title>
|
||||
<ion-nav-back-button>
|
||||
<i class="icon ion-ios-arrow-thin-left"></i>
|
||||
</ion-nav-back-button>
|
||||
</ion-nav-bar>
|
||||
|
||||
<ion-content ng-controller="createController" ng-init="personal = true; init()">
|
||||
<div class="row text-center">
|
||||
<div class="col" ng-click="personal = true; setTotalCopayers(1)" ng-style="personal && {'border-bottom': '2px solid'}">
|
||||
<span class="" translate>Personal Wallet</span>
|
||||
</div>
|
||||
<div class="col" ng-click="personal = false; setTotalCopayers(3)" ng-style="!personal && {'border-bottom': '2px solid'}">
|
||||
<span class="" translate>Shared Wallet</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-include="'views/tab-create-personal.html'" ng-if="personal"></div>
|
||||
<div ng-include="'views/tab-create-shared.html'" ng-if="!personal"></div>
|
||||
</ion-content>
|
||||
</ion-view>
|
|
@ -1,3 +1,12 @@
|
|||
<ion-view>
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-title>{{'Create Personal Wallet' | translate}}</ion-nav-title>
|
||||
<ion-nav-back-button>
|
||||
<i class="icon ion-ios-arrow-thin-left"></i>
|
||||
</ion-nav-back-button>
|
||||
</ion-nav-bar>
|
||||
|
||||
<ion-content ng-controller="createController" ng-init="init(1);">
|
||||
<form name="setupForm" ng-submit="create(setupForm)" novalidate>
|
||||
<div class="card list">
|
||||
<label class="item item-input item-stacked-label">
|
||||
|
@ -86,3 +95,6 @@
|
|||
<span translate>Create new wallet</span>
|
||||
</button>
|
||||
</form>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
<ion-view>
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-title>{{'Create Shared Wallet' | translate}}</ion-nav-title>
|
||||
<ion-nav-back-button>
|
||||
<i class="icon ion-ios-arrow-thin-left"></i>
|
||||
</ion-nav-back-button>
|
||||
</ion-nav-bar>
|
||||
|
||||
<ion-content ng-controller="createController" ng-init="init(3);">
|
||||
<form name="setupForm" ng-submit="create(setupForm)" novalidate>
|
||||
<div class="card list">
|
||||
<label class="item item-input item-stacked-label">
|
||||
|
@ -77,7 +86,6 @@
|
|||
ng-model="formData.createPassphrase">
|
||||
</label>
|
||||
|
||||
|
||||
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set'">
|
||||
<span class="input-label" translate>Wallet Recovery Phrase</span>
|
||||
<input placeholder="{{'Enter the recovery phrase (BIP39)'|translate}}"
|
||||
|
@ -117,3 +125,7 @@
|
|||
<span translate>Create {{formData.requiredCopayers}}-of-{{formData.totalCopayers}} wallet</span>
|
||||
</button>
|
||||
</form>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
12: 1,
|
||||
};
|
||||
|
||||
$scope.init = function() {
|
||||
$scope.init = function(tc) {
|
||||
$scope.formData = {};
|
||||
var defaults = configService.getDefaults();
|
||||
$scope.formData.account = 1;
|
||||
|
@ -31,9 +31,9 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
$scope.TCValues = lodash.range(2, defaults.limits.totalCopayers + 1);
|
||||
$scope.formData.totalCopayers = defaults.wallet.totalCopayers;
|
||||
$scope.formData.derivationPath = derivationPathHelper.default;
|
||||
$scope.setTotalCopayers(1);
|
||||
updateRCSelect(1);
|
||||
updateSeedSourceSelect(1);
|
||||
$scope.setTotalCopayers(tc);
|
||||
updateRCSelect(tc);
|
||||
updateSeedSourceSelect(tc);
|
||||
};
|
||||
|
||||
$scope.showAdvChange = function() {
|
||||
|
|
|
@ -282,11 +282,19 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
},
|
||||
},
|
||||
})
|
||||
.state('tabs.create', {
|
||||
url: '/create',
|
||||
.state('tabs.create-personal', {
|
||||
url: '/create-personal',
|
||||
views: {
|
||||
'tab-home': {
|
||||
templateUrl: 'views/create.html'
|
||||
templateUrl: 'views/tab-create-personal.html'
|
||||
},
|
||||
}
|
||||
})
|
||||
.state('tabs.create-shared', {
|
||||
url: '/create-shared',
|
||||
views: {
|
||||
'tab-home': {
|
||||
templateUrl: 'views/tab-create-shared.html'
|
||||
},
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue