license and profile creation in the same view
This commit is contained in:
parent
95217cef02
commit
b1d4e6224c
5 changed files with 97 additions and 133 deletions
|
|
@ -1,17 +1,21 @@
|
||||||
<div ng-controller="disclaimerController" ng-init="init()">
|
<div class="splash content text-center"
|
||||||
<div
|
ng-init="init()"
|
||||||
ng-if="agreed && index.hasProfile"
|
ng-controller="disclaimerController">
|
||||||
class="topbar-container"
|
<div ng-if="!agreed">
|
||||||
ng-include="'views/includes/topbar.html'"
|
<div class="row">
|
||||||
ng-init="titleSection='Terms of Use'; goBackToState = 'about'; noColor = true">
|
<div class="medium-centered small-centered large-centered columns">
|
||||||
|
<div class="m20t">
|
||||||
|
<span class="text-bold size-16 text-white" translate>WELCOME TO COPAY</span>
|
||||||
|
<p class="text-gray size-14 m0 text-light" translate>A multisignature bitcoin wallet</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="content p20b" ng-class="{'disclaimer':!index.hasProfile}">
|
</div>
|
||||||
<h4 class="title m0" ng-show="!index.hasProfile">
|
<div class="row">
|
||||||
<div class="right">Copay</div>
|
<div class="container-image large-3 medium-3 small-3 medium-centered small-centered large-centered columns">
|
||||||
<div translate>Terms of Use</div>
|
<img src="img/icon-splash.png" alt="icon" width="100%">
|
||||||
</h4>
|
</div>
|
||||||
<div class="p20h m10t">
|
<div class="row">
|
||||||
|
<div class="scrollArea">
|
||||||
<p class="enable_text_select size-14">
|
<p class="enable_text_select size-14">
|
||||||
<ul>
|
<ul>
|
||||||
<li translate>The software you are about to use functions as a free, open source, and multi-signature digital wallet.</li>
|
<li translate>The software you are about to use functions as a free, open source, and multi-signature digital wallet.</li>
|
||||||
|
|
@ -28,20 +32,40 @@
|
||||||
<li translate>We reserve the right to modify this disclaimer from time to time.</li>
|
<li translate>We reserve the right to modify this disclaimer from time to time.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-center size-12 text-warning" ng-show="error && !creatingProfile">
|
||||||
|
{{(error)|translate}}. <span translate>Retrying...</span>
|
||||||
|
</div>
|
||||||
|
<div class="onGoingProcess" ng-show="creatingProfile">
|
||||||
|
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
|
||||||
|
<div class="spinner">
|
||||||
|
<div class="rect1"></div>
|
||||||
|
<div class="rect2"></div>
|
||||||
|
<div class="rect3"></div>
|
||||||
|
<div class="rect4"></div>
|
||||||
|
<div class="rect5"></div>
|
||||||
|
</div>
|
||||||
|
<span translate>Creating Profile...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
<p ng-show="lang != 'en'">
|
<p ng-show="lang != 'en'">
|
||||||
<a class="center" ng-click="$root.openExternalLink('https://copay.io/disclaimer')" translate>Official English Disclaimer</a>
|
<a class="center" ng-click="$root.openExternalLink('https://copay.io/disclaimer')" translate>Official English Disclaimer</a>
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
<div ng-show="!agreed">
|
<div ng-show="!agreed">
|
||||||
<p translate>I affirm that I have read, understood, and agree with these terms.</p>
|
<p translate>I affirm that I have read, understood, and agree with these terms.</p>
|
||||||
<button class="black round expand" ng-click="agree()" ng-disabled="loading" translate>
|
</div>
|
||||||
Agree
|
<div class="row" ng-show="!creatingProfile">
|
||||||
|
<div class="start-button large-8 medium-8 small-8 medium-centered small-centered large-centered columns">
|
||||||
|
<button ng-click="create()" class="button black expand round size-12 text-spacing" translate>
|
||||||
|
GET STARTED
|
||||||
</button>
|
</button>
|
||||||
</div>
|
<p class="text-gray m5b size-12" translate>Already have a wallet?</p>
|
||||||
<button ng-show="agreed && !index.hasProfile" class="round expand" ng-click="agree()" translate>
|
<button ng-click="create(true)" class="button round outline dark-gray tiny" translate>Import backup </button>
|
||||||
Go back
|
</div>
|
||||||
</button>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="extra-margin-bottom"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
<div class="splash content text-center"
|
|
||||||
ng-init="init()"
|
|
||||||
ng-controller="splashController">
|
|
||||||
<div ng-if="!index.hasProfile">
|
|
||||||
<div class="row">
|
|
||||||
<div class="medium-centered small-centered large-centered columns">
|
|
||||||
<div class="m20t">
|
|
||||||
<span class="text-bold size-16 text-white" translate>WELCOME TO COPAY</span>
|
|
||||||
<p class="text-gray size-14 m0 text-light" translate>A multisignature bitcoin wallet</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="container-image large-3 medium-3 small-3 medium-centered small-centered large-centered columns">
|
|
||||||
<img src="img/icon-splash.png" alt="icon" width="100%">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="text-center size-12 text-warning" ng-show="error && !creatingProfile">
|
|
||||||
{{(error)|translate}}. <span translate>Retrying...</span>
|
|
||||||
</div>
|
|
||||||
<div class="onGoingProcess" ng-show="creatingProfile">
|
|
||||||
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
|
|
||||||
<div class="spinner">
|
|
||||||
<div class="rect1"></div>
|
|
||||||
<div class="rect2"></div>
|
|
||||||
<div class="rect3"></div>
|
|
||||||
<div class="rect4"></div>
|
|
||||||
<div class="rect5"></div>
|
|
||||||
</div>
|
|
||||||
<span translate>Creating Profile...</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row" ng-show="!creatingProfile">
|
|
||||||
<div class="start-button large-8 medium-8 small-8 medium-centered small-centered large-centered columns">
|
|
||||||
<button ng-click="create()" class="button black expand round size-12 text-spacing" translate>
|
|
||||||
GET STARTED
|
|
||||||
</button>
|
|
||||||
<p class="text-gray m5b size-12" translate>Already have a wallet?</p>
|
|
||||||
<button ng-click="create(true)" class="button round outline dark-gray tiny" translate>Import backup </button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6, .panel p, .panel li, .panel dl {
|
.panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6, .panel p, .panel li, .panel dl {
|
||||||
color: #2C3E50;
|
color: #2C3E50;
|
||||||
}
|
}
|
||||||
|
|
@ -1094,6 +1093,10 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*/////////////////////////////////////////////////*/
|
/*/////////////////////////////////////////////////*/
|
||||||
|
.scrollArea {
|
||||||
|
height: 280px;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
.tabbable {
|
.tabbable {
|
||||||
border: 2px solid #213140;
|
border: 2px solid #213140;
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,32 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('disclaimerController',
|
angular.module('copayApp.controllers').controller('disclaimerController',
|
||||||
function($scope, $timeout, storageService, applicationService, gettextCatalog, isCordova, uxLanguage) {
|
function($scope, $timeout, $log, profileService, isCordova, storageService, gettextCatalog, uxLanguage, go) {
|
||||||
|
|
||||||
$scope.agree = function() {
|
$scope.create = function(noWallet) {
|
||||||
|
$scope.creatingProfile = true;
|
||||||
if (isCordova) {
|
if (isCordova) {
|
||||||
window.plugins.spinnerDialog.show(null, gettextCatalog.getString('Loading...'), true);
|
window.plugins.spinnerDialog.show(null, gettextCatalog.getString('Loading...'), true);
|
||||||
}
|
}
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
storageService.setCopayDisclaimerFlag(function(err) {
|
storageService.setCopayDisclaimerFlag(function(err) {
|
||||||
$timeout(function() {
|
|
||||||
if (isCordova) {
|
if (isCordova) {
|
||||||
window.plugins.spinnerDialog.hide();
|
window.plugins.spinnerDialog.hide();
|
||||||
}
|
}
|
||||||
applicationService.restart();
|
profileService.create({
|
||||||
}, 1000);
|
noWallet: noWallet
|
||||||
|
}, function(err) {
|
||||||
|
if (err) {
|
||||||
|
$scope.creatingProfile = false;
|
||||||
|
$log.warn(err);
|
||||||
|
$scope.error = err;
|
||||||
|
$scope.$apply();
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.create(noWallet);
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
@ -24,6 +35,10 @@ angular.module('copayApp.controllers').controller('disclaimerController',
|
||||||
storageService.getCopayDisclaimerFlag(function(err, val) {
|
storageService.getCopayDisclaimerFlag(function(err, val) {
|
||||||
$scope.lang = uxLanguage.currentLanguage;
|
$scope.lang = uxLanguage.currentLanguage;
|
||||||
$scope.agreed = val;
|
$scope.agreed = val;
|
||||||
|
|
||||||
|
if (profileService.profile) {
|
||||||
|
go.walletHome();
|
||||||
|
}
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
}, 1);
|
}, 1);
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('splashController',
|
|
||||||
function($scope, $timeout, $log, profileService, storageService, go) {
|
|
||||||
|
|
||||||
$scope.create = function(noWallet) {
|
|
||||||
$scope.creatingProfile = true;
|
|
||||||
|
|
||||||
$timeout(function() {
|
|
||||||
profileService.create({
|
|
||||||
noWallet: noWallet
|
|
||||||
}, function(err) {
|
|
||||||
if (err) {
|
|
||||||
$scope.creatingProfile = false;
|
|
||||||
$log.warn(err);
|
|
||||||
$scope.error = err;
|
|
||||||
$scope.$apply();
|
|
||||||
$timeout(function() {
|
|
||||||
$scope.create(noWallet);
|
|
||||||
}, 3000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 100);
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.init = function() {
|
|
||||||
storageService.getCopayDisclaimerFlag(function(err, val) {
|
|
||||||
if (!val) go.path('disclaimer');
|
|
||||||
|
|
||||||
if (profileService.profile) {
|
|
||||||
go.walletHome();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue