Merge pull request #84 from JDonadio/feat/separate-create-tabs
Separate create tab views
This commit is contained in:
commit
a9bcd9ebac
6 changed files with 240 additions and 225 deletions
|
|
@ -10,8 +10,13 @@
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create">
|
<a class="item item-remove-animate item-icon-right" type="item-text-wrap" ui-sref="tabs.create-personal">
|
||||||
<h2 translate>Create new wallet</h2>
|
<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>
|
<i class="icon nav-item-arrow-right"></i>
|
||||||
</a>
|
</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,4 +1,13 @@
|
||||||
<form name="setupForm" ng-submit="create(setupForm)" novalidate>
|
<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">
|
<div class="card list">
|
||||||
<label class="item item-input item-stacked-label">
|
<label class="item item-input item-stacked-label">
|
||||||
<span class="input-label" translate>Wallet name</span>
|
<span class="input-label" translate>Wallet name</span>
|
||||||
|
|
@ -85,4 +94,7 @@
|
||||||
<button type="submit" class="button button-block button-positive" ng-disabled="setupForm.$invalid">
|
<button type="submit" class="button button-block button-positive" ng-disabled="setupForm.$invalid">
|
||||||
<span translate>Create new wallet</span>
|
<span translate>Create new wallet</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
</ion-content>
|
||||||
|
</ion-view>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,13 @@
|
||||||
<form name="setupForm" ng-submit="create(setupForm)" novalidate>
|
<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">
|
<div class="card list">
|
||||||
<label class="item item-input item-stacked-label">
|
<label class="item item-input item-stacked-label">
|
||||||
<span class="input-label" translate>Wallet name</span>
|
<span class="input-label" translate>Wallet name</span>
|
||||||
|
|
@ -77,7 +86,6 @@
|
||||||
ng-model="formData.createPassphrase">
|
ng-model="formData.createPassphrase">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
||||||
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set'">
|
<label class="item item-input item-stacked-label" ng-show="seedSource.id == 'set'">
|
||||||
<span class="input-label" translate>Wallet Recovery Phrase</span>
|
<span class="input-label" translate>Wallet Recovery Phrase</span>
|
||||||
<input placeholder="{{'Enter the recovery phrase (BIP39)'|translate}}"
|
<input placeholder="{{'Enter the recovery phrase (BIP39)'|translate}}"
|
||||||
|
|
@ -116,4 +124,8 @@
|
||||||
<button type="submit" class="button button-block button-positive" ng-disabled="setupForm.$invalid">
|
<button type="submit" class="button button-block button-positive" ng-disabled="setupForm.$invalid">
|
||||||
<span translate>Create {{formData.requiredCopayers}}-of-{{formData.totalCopayers}} wallet</span>
|
<span translate>Create {{formData.requiredCopayers}}-of-{{formData.totalCopayers}} wallet</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
</ion-content>
|
||||||
|
</ion-view>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ angular.module('copayApp.controllers').controller('createController',
|
||||||
12: 1,
|
12: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.init = function() {
|
$scope.init = function(tc) {
|
||||||
$scope.formData = {};
|
$scope.formData = {};
|
||||||
var defaults = configService.getDefaults();
|
var defaults = configService.getDefaults();
|
||||||
$scope.formData.account = 1;
|
$scope.formData.account = 1;
|
||||||
|
|
@ -31,9 +31,9 @@ angular.module('copayApp.controllers').controller('createController',
|
||||||
$scope.TCValues = lodash.range(2, defaults.limits.totalCopayers + 1);
|
$scope.TCValues = lodash.range(2, defaults.limits.totalCopayers + 1);
|
||||||
$scope.formData.totalCopayers = defaults.wallet.totalCopayers;
|
$scope.formData.totalCopayers = defaults.wallet.totalCopayers;
|
||||||
$scope.formData.derivationPath = derivationPathHelper.default;
|
$scope.formData.derivationPath = derivationPathHelper.default;
|
||||||
$scope.setTotalCopayers(1);
|
$scope.setTotalCopayers(tc);
|
||||||
updateRCSelect(1);
|
updateRCSelect(tc);
|
||||||
updateSeedSourceSelect(1);
|
updateSeedSourceSelect(tc);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.showAdvChange = function() {
|
$scope.showAdvChange = function() {
|
||||||
|
|
|
||||||
|
|
@ -282,11 +282,19 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.state('tabs.create', {
|
.state('tabs.create-personal', {
|
||||||
url: '/create',
|
url: '/create-personal',
|
||||||
views: {
|
views: {
|
||||||
'tab-home': {
|
'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…
Add table
Add a link
Reference in a new issue