mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #5377 from gabrielbazan7/fix/scannerAddbook
fix addressbook add scanner and some refactors
This commit is contained in:
commit
9fffc255b0
|
@ -10,7 +10,7 @@ angular.module('copayApp.controllers').controller('addressbookAddController', fu
|
||||||
'email': ''
|
'email': ''
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.onQrCodeScanned = function(data, addressbookForm) {
|
$scope.onQrCodeScannedAddressBook = function(data, addressbookForm) {
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
var form = addressbookForm;
|
var form = addressbookForm;
|
||||||
if (data && form) {
|
if (data && form) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ angular.module('copayApp.controllers').controller('joinController',
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.onQrCodeScanned = function(data) {
|
this.onQrCodeScannedJoin = function(data) {
|
||||||
$scope.secret = data;
|
$scope.secret = data;
|
||||||
if ($scope.joinForm) {
|
if ($scope.joinForm) {
|
||||||
$scope.joinForm.secret.$setViewValue(data);
|
$scope.joinForm.secret.$setViewValue(data);
|
||||||
|
@ -44,7 +44,7 @@ angular.module('copayApp.controllers').controller('joinController',
|
||||||
if ($stateParams.url) {
|
if ($stateParams.url) {
|
||||||
var data = $stateParams.url;
|
var data = $stateParams.url;
|
||||||
data = data.replace('copay:', '');
|
data = data.replace('copay:', '');
|
||||||
this.onQrCodeScanned(data);
|
this.onQrCodeScannedJoin(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
var updateSeedSourceSelect = function() {
|
var updateSeedSourceSelect = function() {
|
||||||
|
|
|
@ -8,13 +8,6 @@ angular.module('copayApp.controllers').controller('welcomeController', function(
|
||||||
startupService.ready();
|
startupService.ready();
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.goImport = function(code) {
|
|
||||||
$state.go('onboarding.import', {
|
|
||||||
fromOnboarding: true,
|
|
||||||
code: code
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.createProfile = function() {
|
$scope.createProfile = function() {
|
||||||
$log.debug('Creating profile');
|
$log.debug('Creating profile');
|
||||||
profileService.createProfile(function(err) {
|
profileService.createProfile(function(err) {
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
valid-address required>
|
valid-address required>
|
||||||
</label>
|
</label>
|
||||||
<div class="qr-scan-icon">
|
<div class="qr-scan-icon">
|
||||||
<qr-scanner on-scan="onQrCodeScanned(data, addressbookForm)"></qr-scanner>
|
<qr-scanner on-scan="onQrCodeScannedAddressBook(data, addressbookForm)"></qr-scanner>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
wallet-secret required>
|
wallet-secret required>
|
||||||
</label>
|
</label>
|
||||||
<div class="qr-scan-icon">
|
<div class="qr-scan-icon">
|
||||||
<qr-scanner class="qr-icon size-24" on-scan="join.onQrCodeScanned(data)"></qr-scanner>
|
<qr-scanner class="qr-icon size-24" on-scan="join.onQrCodeScannedJoin(data)"></qr-scanner>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item item-divider"></div>
|
<div class="item item-divider"></div>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<ion-view id="onboard-welcome" class="onboarding">
|
<ion-view id="onboard-welcome" class="onboarding">
|
||||||
<ion-content ng-controller="welcomeController" ng-init="createProfile()" scroll="false">
|
<ion-content ng-controller="welcomeController" ng-init="createProfile()" scroll="false">
|
||||||
<!-- <qr-scanner id="qrcode" on-scan="goImport(data)"></qr-scanner> -->
|
|
||||||
<div id="logo-tagline">
|
<div id="logo-tagline">
|
||||||
<img src='img/bitpay-logo.svg' id="logo" />
|
<img src='img/bitpay-logo.svg' id="logo" />
|
||||||
<p id="lead" translate>Take control of your money,<br />get started with bitcoin.</p>
|
<p id="lead" translate>Take control of your money,<br />get started with bitcoin.</p>
|
||||||
|
|
Loading…
Reference in New Issue