import with Qr in onboarding
This commit is contained in:
parent
fd8f76bab0
commit
7835694fb2
5 changed files with 15 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
<ion-view id="onboard-welcome" class="onboarding">
|
<ion-view id="onboard-welcome" class="onboarding">
|
||||||
<ion-content ng-controller="welcomeController" ng-init="createProfile()">
|
<ion-content ng-controller="welcomeController" ng-init="createProfile()">
|
||||||
<img src="../img/onboarding-welcome-shopping24.png" id="shopping-24" />
|
<qr-scanner id="shopping-24" on-scan="goImport(data)"></qr-scanner>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<img src='../../img/bitpay-logo.svg' class="logo col col-50" />
|
<img src='../../img/bitpay-logo.svg' class="logo col col-50" />
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
|
|
||||||
$scope.processWalletInfo = function(code) {
|
$scope.processWalletInfo = function(code) {
|
||||||
if (!code) return;
|
if (!code) return;
|
||||||
|
|
||||||
$scope.importErr = false;
|
$scope.importErr = false;
|
||||||
var parsedCode = code.split('|');
|
var parsedCode = code.split('|');
|
||||||
|
|
||||||
|
|
@ -407,5 +406,6 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
};
|
};
|
||||||
|
|
||||||
updateSeedSourceSelect();
|
updateSeedSourceSelect();
|
||||||
$scope.setSeedSource('new');
|
$scope.setSeedSource();
|
||||||
|
if ($stateParams.code) $scope.processWalletInfo($stateParams.code);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $log, $ionicPopup, profileService) {
|
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $log, $ionicPopup, profileService) {
|
||||||
|
|
||||||
|
$scope.goImport = function(code) {
|
||||||
|
$state.go('tabs.import', {
|
||||||
|
code: code
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
$scope.createProfile = function() {
|
$scope.createProfile = function() {
|
||||||
$log.debug('Creating profile');
|
$log.debug('Creating profile');
|
||||||
profileService.createProfile(function(err) {
|
profileService.createProfile(function(err) {
|
||||||
|
|
|
||||||
|
|
@ -270,12 +270,15 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
})
|
})
|
||||||
.state('tabs.import', {
|
.state('tabs.import', {
|
||||||
url: '/import/:fromOnboarding',
|
url: '/import/:fromOnboarding',
|
||||||
// abstract: true,
|
// abstract: true,
|
||||||
views: {
|
views: {
|
||||||
'tab-home': {
|
'tab-home': {
|
||||||
templateUrl: 'views/import.html'
|
templateUrl: 'views/import.html'
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
params: {
|
||||||
|
code: null
|
||||||
|
},
|
||||||
})
|
})
|
||||||
.state('tabs.import.phrase', {
|
.state('tabs.import.phrase', {
|
||||||
url: '/tab-import-phrase',
|
url: '/tab-import-phrase',
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
background-repeat-y: no-repeat;
|
background-repeat-y: no-repeat;
|
||||||
#shopping-24 {
|
#shopping-24 {
|
||||||
|
content: url("../img/onboarding-welcome-shopping24.png");
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 2%;
|
top: 2%;
|
||||||
right: 5%;
|
right: 5%;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue