Merge pull request #191 from gabrielbazan7/feat/receive
effects on views if the user has not yet backed up a wallet
This commit is contained in:
commit
3ffd4ce731
21 changed files with 293 additions and 110 deletions
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
|
@ -1,10 +1,10 @@
|
||||||
<ion-view id="wallet-backup-phrase" title="{{viewTitle}}">
|
<ion-view id="wallet-backup-phrase">
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-buttons side="primary">
|
<ion-nav-title>
|
||||||
<button class="button button-back button-clear" ng-click="backupGoBack()">
|
{{viewTitle}}
|
||||||
<i class="icon ion-ios-arrow-thin-left"></i>
|
</ion-nav-title>
|
||||||
</button>
|
<ion-nav-back-button>
|
||||||
</ion-nav-buttons>
|
</ion-nav-back-button>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<div class="ng-hide" ng-show="deleted">
|
<div class="ng-hide" ng-show="deleted">
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<ion-view id="onboarding-backup-warning" class="onboarding" ng-controller="backupWarningController">
|
<ion-view id="backup-warning" class="onboarding" ng-controller="backupWarningController">
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-buttons side="primary">
|
<ion-nav-buttons side="primary">
|
||||||
<button class="button button-back button-clear" href ui-sref="onboarding.backupRequest({walletId: walletId})">
|
<button class="button button-back button-clear" ng-click="goBack()">
|
||||||
<i class="icon ion-ios-arrow-thin-left"></i>
|
<i class="icon ion-ios-arrow-thin-left"></i>
|
||||||
</button>
|
</button>
|
||||||
</ion-nav-buttons>
|
</ion-nav-buttons>
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<img src="img/onboarding-backup-warning.svg" class="col col-60 warning-image">
|
<img src="img/backup-warning.svg" class="col col-60 warning-image">
|
||||||
</div>
|
</div>
|
||||||
<div class="row text-center">
|
<div class="row text-center">
|
||||||
<p class="col col-60">
|
<p class="col col-60">
|
||||||
27
public/views/includes/backupNeededPopup.html
Normal file
27
public/views/includes/backupNeededPopup.html
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<div id="backup-needed-modal" class="popup-modal">
|
||||||
|
<div class="popup-modal-header popup-modal-header-warning">
|
||||||
|
<div class="popup-modal-header-img-warning popup-modal-header-img"></div>
|
||||||
|
</div>
|
||||||
|
<div class="popup-modal-content popup-modal-content-warning">
|
||||||
|
<div class="text-center">
|
||||||
|
<h5 translate>Backup Needed</h5>
|
||||||
|
<p translate>Now is a good time to backup your wallet. If this device is lost, it is impossible to access your funds without a backup.</p>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<button
|
||||||
|
class="button button-clear expand"
|
||||||
|
ng-click="close()"
|
||||||
|
translate>Not now
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<button
|
||||||
|
class="button button-clear expand"
|
||||||
|
ng-click="doBackup()"
|
||||||
|
translate>Backup wallet now
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<div id="screenshot-warning-modal" class="popup-modal">
|
<div id="screenshot-warning-modal" class="popup-modal">
|
||||||
<div class="popup-modal-header">
|
<div class="popup-modal-header-success">
|
||||||
<div class="popup-modal-header-img"></div>
|
<div class="popup-modal-header-img"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="popup-modal-content" ng-class="{'popup-modal-content-success': !backupError, 'popup-modal-content-fail': backupError}">
|
<div class="popup-modal-content" ng-class="{'popup-modal-content-success': !backupError, 'popup-modal-content-fail': backupError}">
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,6 @@
|
||||||
<span class="item-note m10l" ng-show="wallet.n > 1 && wallet.isComplete()">
|
<span class="item-note m10l" ng-show="wallet.n > 1 && wallet.isComplete()">
|
||||||
{{wallet.m}}-of-{{wallet.n}}
|
{{wallet.m}}-of-{{wallet.n}}
|
||||||
</span>
|
</span>
|
||||||
<span class="badge badge-assertive" ng-show="!wallet.isComplete()" translate>
|
|
||||||
Incomplete
|
|
||||||
</span>
|
|
||||||
<!-- <i ng-show="wallet.needsBackup" class="icon ion-android-warning assertive"></i> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-slide-page>
|
</ion-slide-page>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="cta-buttons">
|
<div class="cta-buttons">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<button class="button button-block button-positive col-75 col" href
|
<button class="button button-block button-positive col-75 col" href
|
||||||
ui-sref="onboarding.backupWarning({walletId: walletId})" translate>Backup wallet</button>
|
ui-sref="onboarding.backupWarning({from: 'onboarding.backupRequest', walletId: walletId})" translate>Backup wallet</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<button class="button button-block button-transparent col-75 col" ng-click="openPopup()" translate>I'll backup my wallet later</button>
|
<button class="button button-block button-transparent col-75 col" ng-click="openPopup()" translate>I'll backup my wallet later</button>
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
<div class="item item-divider" translate>
|
<div class="item item-divider" translate>
|
||||||
Security
|
Security
|
||||||
</div>
|
</div>
|
||||||
<a class="item item-icon-right" ui-sref="tabs.preferences.backup" ng-hide="wallet.isPrivKeyExternal()">
|
<a class="item item-icon-right" ui-sref="tabs.preferences.backupWarning({from: 'tabs.preferences'})" ng-hide="wallet.isPrivKeyExternal()">
|
||||||
<span translate>Backup</span>
|
<span translate>Backup</span>
|
||||||
<i class="icon nav-item-arrow-right"></i>
|
<i class="icon nav-item-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -8,42 +8,67 @@
|
||||||
</ion-nav-buttons>
|
</ion-nav-buttons>
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<article id="address">
|
<div id="address">
|
||||||
<div class="row">
|
<article class="text-center" ng-if="!wallet.isComplete()">
|
||||||
<div class="m15t text-center col center-block" copy-to-clipboard="addr">
|
<div class="incomplete">
|
||||||
<qrcode ng-if="addr" size="220" data="bitcoin:{{addr}}"></qrcode>
|
<div class="title">
|
||||||
<div ng-if="!addr" style="height:220px; width:220px; margin:auto; background: white; padding-top: 20%;">
|
<span translate>Incomplete wallet</span>
|
||||||
...
|
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="wallet.needsBackup" class="assertive m10t" translate>
|
<div class="subtitle">
|
||||||
Before receiving funds, you must backup your wallet. If this device is lost, it is impossible to access your funds without a backup.
|
<span translate>All signing devices must be added to this multisig wallet before bitcoin addresses can be created.</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button class="button button-block button-positive" ng-click="goCopayers()" translate>Open wallet</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="row border-top">
|
||||||
<div class="row">
|
<div class="col col-90 center-block bit-address text-center">
|
||||||
<div class="col" ng-show="isCordova && addr">
|
<div class="item item-icon-left">
|
||||||
<div class="item item-icon-left" ng-click="shareAddress(addr)">
|
<i class="icon ion-social-bitcoin-outline"></i>
|
||||||
<i class="icon ion-ios-upload-outline"></i>
|
<span class="bit-address-gen-address" ng-if="!generatingAddress" translate>address not yet available</span>
|
||||||
<span translate>Share</span>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col" ng-class="{'center-block col-50': !isCordova || !addr}">
|
</article>
|
||||||
<div class="item item-icon-left" ng-click="setAddress(true)">
|
<article ng-if="wallet.isComplete()">
|
||||||
<i class="icon ion-ios-loop"></i>
|
<div class="row backup" ng-show="!wallet.showBackupNeededModal" ng-click="goToBackupFlow()">
|
||||||
<span translate>Next Address</span>
|
<div class="m15t text-center col center-block">
|
||||||
|
<i class="icon ion-alert"></i><span translate>Wallet not backed up</span><i class="icon ion-ios-arrow-thin-right"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="row qr">
|
||||||
<div class="row border-top">
|
<div class="m15t text-center col center-block" copy-to-clipboard="addr">
|
||||||
<div class="col col-90 center-block bit-address text-center">
|
<qrcode ng-if="addr" size="220" data="bitcoin:{{addr}}"></qrcode>
|
||||||
<div class="item item-icon-left">
|
<div ng-if="!addr" style="height:220px; width:220px; margin:auto; background: white; padding-top: 20%;">
|
||||||
<i class="icon ion-social-bitcoin-outline"></i>
|
...
|
||||||
<span ng-if="generatingAddress">...</span>
|
</div>
|
||||||
<span class="bit-address-gen-address" ng-if="!generatingAddress" copy-to-clipboard="addr">{{addr}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="row">
|
||||||
</article>
|
<div class="col" ng-show="isCordova && addr">
|
||||||
|
<div class="item item-icon-left" ng-click="shareAddress(addr)">
|
||||||
|
<i class="icon ion-ios-upload-outline"></i>
|
||||||
|
<span translate>Share</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col" ng-class="{'center-block col-50': !isCordova || !addr}">
|
||||||
|
<div class="item item-icon-left" ng-click="setAddress(true)">
|
||||||
|
<i class="icon ion-ios-loop"></i>
|
||||||
|
<span translate>Next Address</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row border-top">
|
||||||
|
<div class="col col-90 center-block bit-address text-center">
|
||||||
|
<div class="item item-icon-left">
|
||||||
|
<i class="icon ion-social-bitcoin-outline"></i>
|
||||||
|
<span ng-if="generatingAddress">...</span>
|
||||||
|
<span class="bit-address-gen-address" ng-if="!generatingAddress" copy-to-clipboard="addr">{{addr}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
<article id="wallets">
|
<article id="wallets">
|
||||||
<div class="list card padding text-center" ng-if="!wallets[0]">
|
<div class="list card padding text-center" ng-if="!wallets[0]">
|
||||||
<span translate>No Wallet</span>
|
<span translate>No Wallet</span>
|
||||||
|
|
|
||||||
|
|
@ -49,15 +49,6 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
}, 10);
|
}, 10);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.goBack = function() {
|
|
||||||
if ($scope.step == 1) {
|
|
||||||
if ($stateParams.fromOnboarding) $state.go('onboarding.backupRequest');
|
|
||||||
else $state.go('wallet.preferences');
|
|
||||||
} else {
|
|
||||||
$scope.goToStep($scope.step - 1);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var backupError = function(err) {
|
var backupError = function(err) {
|
||||||
ongoingProcess.set('validatingWords', false);
|
ongoingProcess.set('validatingWords', false);
|
||||||
$log.debug('Failed to verify backup: ', err);
|
$log.debug('Failed to verify backup: ', err);
|
||||||
|
|
@ -93,13 +84,15 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
|
|
||||||
$scope.closeBackupResultModal = function() {
|
$scope.closeBackupResultModal = function() {
|
||||||
$scope.confirmBackupModal.hide();
|
$scope.confirmBackupModal.hide();
|
||||||
|
$scope.confirmBackupModal.remove();
|
||||||
|
|
||||||
if ($stateParams.fromOnboarding) {
|
profileService.isDisclaimerAccepted(function(val) {
|
||||||
$state.go('onboarding.disclaimer');
|
if (val) {
|
||||||
} else {
|
$ionicHistory.removeBackView();
|
||||||
$ionicHistory.removeBackView();
|
$state.go('tabs.home');
|
||||||
$state.go('tabs.home');
|
}
|
||||||
}
|
else $state.go('onboarding.disclaimer');
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var confirm = function(cb) {
|
var confirm = function(cb) {
|
||||||
|
|
@ -193,16 +186,6 @@ angular.module('copayApp.controllers').controller('backupController',
|
||||||
$scope.selectComplete = false;
|
$scope.selectComplete = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.backupGoBack = function() {
|
|
||||||
if ($stateParams.fromOnboarding) $state.go('onboarding.backupWarning', {
|
|
||||||
walletId: $stateParams.walletId,
|
|
||||||
fromOnboarding: true
|
|
||||||
});
|
|
||||||
else $state.go('tabs.preferences', {
|
|
||||||
walletId: $stateParams.walletId
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.$on("$ionicView.enter", function(event, data) {
|
$scope.$on("$ionicView.enter", function(event, data) {
|
||||||
$scope.deleted = isDeletedSeed();
|
$scope.deleted = isDeletedSeed();
|
||||||
if ($scope.deleted) {
|
if ($scope.deleted) {
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,31 @@ angular.module('copayApp.controllers').controller('backupWarningController', fun
|
||||||
$scope.walletId = $stateParams.walletId;
|
$scope.walletId = $stateParams.walletId;
|
||||||
$scope.openPopup = function() {
|
$scope.openPopup = function() {
|
||||||
$ionicModal.fromTemplateUrl('views/includes/screenshotWarningModal.html', {
|
$ionicModal.fromTemplateUrl('views/includes/screenshotWarningModal.html', {
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
backdropClickToClose: false,
|
backdropClickToClose: false,
|
||||||
hardwareBackButtonClose: false
|
hardwareBackButtonClose: false
|
||||||
}).then(function(modal) {
|
}).then(function(modal) {
|
||||||
$scope.warningModal = modal;
|
$scope.warningModal = modal;
|
||||||
$scope.warningModal.show();
|
$scope.warningModal.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.close = function() {
|
$scope.close = function() {
|
||||||
$scope.warningModal.hide();
|
$scope.warningModal.hide();
|
||||||
$state.go('onboarding.backup', {
|
if ($stateParams.from == 'onboarding.backupRequest')
|
||||||
walletId: $stateParams.walletId,
|
$state.go('onboarding.backup', {
|
||||||
fromOnboarding: true
|
walletId: $stateParams.walletId
|
||||||
});
|
});
|
||||||
|
else
|
||||||
|
$state.go($stateParams.from + '.backup', {
|
||||||
|
walletId: $stateParams.walletId
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.goBack = function() {
|
||||||
|
$state.go($stateParams.from, {
|
||||||
|
walletId: $stateParams.walletId
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, $ionicModal, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
|
angular.module('copayApp.controllers').controller('tabReceiveController', function($scope, $timeout, $log, $ionicModal, $state, $ionicHistory, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService) {
|
||||||
|
|
||||||
$scope.isCordova = platformInfo.isCordova;
|
$scope.isCordova = platformInfo.isCordova;
|
||||||
$scope.isNW = platformInfo.isNW;
|
$scope.isNW = platformInfo.isNW;
|
||||||
|
|
@ -29,34 +29,75 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.setAddress = function(forceNew) {
|
$scope.setAddress = function(forceNew) {
|
||||||
if ($scope.generatingAddress) return;
|
if ($scope.generatingAddress || !$scope.wallet.isComplete()) return;
|
||||||
|
|
||||||
$scope.addr = null;
|
$scope.addr = null;
|
||||||
$scope.generatingAddress = true;
|
$scope.generatingAddress = true;
|
||||||
|
|
||||||
$timeout(function() {
|
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
|
||||||
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
|
$scope.generatingAddress = false;
|
||||||
$scope.generatingAddress = false;
|
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||||
if (err) popupService.showAlert(gettextCatalog.getString('Error'), err);
|
$scope.addr = addr;
|
||||||
$scope.addr = addr;
|
});
|
||||||
$scope.$apply();
|
|
||||||
});
|
|
||||||
}, 1);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
if (!$scope.isCordova) $scope.checkTips();
|
if (!$scope.isCordova) $scope.checkTips();
|
||||||
$scope.wallets = profileService.getWallets({
|
$scope.wallets = profileService.getWallets();
|
||||||
onlyComplete: true
|
|
||||||
});
|
|
||||||
$scope.$on('Wallet/Changed', function(event, wallet) {
|
$scope.$on('Wallet/Changed', function(event, wallet) {
|
||||||
if (!wallet) {
|
if (!wallet) {
|
||||||
$log.debug('No wallet provided');
|
$log.debug('No wallet provided');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$scope.wallet = wallet;
|
$timeout(function() {
|
||||||
$log.debug('Wallet changed: ' + wallet.name);
|
$scope.wallet = wallet;
|
||||||
$scope.setAddress();
|
$log.debug('Wallet changed: ' + wallet.name);
|
||||||
|
$scope.setAddress();
|
||||||
|
if ($scope.wallet.showBackupNeededModal) $scope.openBackupNeededModal();
|
||||||
|
$scope.$apply();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.goCopayers = function() {
|
||||||
|
$ionicHistory.removeBackView();
|
||||||
|
$ionicHistory.nextViewOptions({
|
||||||
|
disableAnimate: true
|
||||||
|
});
|
||||||
|
$state.go('tabs.home');
|
||||||
|
$timeout(function() {
|
||||||
|
$state.transitionTo('tabs.copayers', {
|
||||||
|
walletId: $scope.wallet.credentials.walletId
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.openBackupNeededModal = function() {
|
||||||
|
$ionicModal.fromTemplateUrl('views/includes/backupNeededPopup.html', {
|
||||||
|
scope: $scope,
|
||||||
|
backdropClickToClose: false,
|
||||||
|
hardwareBackButtonClose: false
|
||||||
|
}).then(function(modal) {
|
||||||
|
$scope.BackupNeededModal = modal;
|
||||||
|
$scope.BackupNeededModal.show();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.close = function() {
|
||||||
|
$scope.BackupNeededModal.hide();
|
||||||
|
$scope.BackupNeededModal.remove();
|
||||||
|
profileService.setBackupNeededModalFlag($scope.wallet.credentials.walletId);
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.doBackup = function() {
|
||||||
|
$scope.close();
|
||||||
|
$scope.goToBackupFlow();
|
||||||
|
};
|
||||||
|
|
||||||
|
$scope.goToBackupFlow = function() {
|
||||||
|
$state.go('tabs.receive.backupWarning', {
|
||||||
|
from: 'tabs.receive',
|
||||||
|
walletId: $scope.wallet.credentials.walletId
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.state('tabs.send.amount', {
|
.state('tabs.send.amount', {
|
||||||
url: '/amount/:isWallet/:toAddress/:toName/:toEmail',
|
url: '/amount/:isWallet/:toAddress/:toName/:toEmail',
|
||||||
views: {
|
views: {
|
||||||
'tab-send@tabs': {
|
'tab-send@tabs': {
|
||||||
|
|
@ -432,6 +432,14 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.state('tabs.preferences.backupWarning', {
|
||||||
|
url: '/backupWarning/:from',
|
||||||
|
views: {
|
||||||
|
'tab-settings@tabs': {
|
||||||
|
templateUrl: 'views/backupWarning.html'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
.state('tabs.preferences.backup', {
|
.state('tabs.preferences.backup', {
|
||||||
url: '/backup',
|
url: '/backup',
|
||||||
views: {
|
views: {
|
||||||
|
|
@ -551,7 +559,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*TO DO
|
* Copayers
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -565,6 +573,30 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* Back flow from receive
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
.state('tabs.receive.backupWarning', {
|
||||||
|
url: '/backupWarning/:from/:walletId',
|
||||||
|
views: {
|
||||||
|
'tab-receive@tabs': {
|
||||||
|
templateUrl: 'views/backupWarning.html'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.state('tabs.receive.backup', {
|
||||||
|
url: '/backup/:walletId',
|
||||||
|
views: {
|
||||||
|
'tab-receive@tabs': {
|
||||||
|
controller: 'backupController',
|
||||||
|
templateUrl: 'views/backup.html'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Onboarding
|
* Onboarding
|
||||||
|
|
@ -617,15 +649,15 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('onboarding.backupWarning', {
|
.state('onboarding.backupWarning', {
|
||||||
url: '/backupWarning/:walletId',
|
url: '/backupWarning/:from/:walletId',
|
||||||
views: {
|
views: {
|
||||||
'onboarding': {
|
'onboarding': {
|
||||||
templateUrl: 'views/onboarding/backupWarning.html'
|
templateUrl: 'views/backupWarning.html'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('onboarding.backup', {
|
.state('onboarding.backup', {
|
||||||
url: '/backup/:walletId/:fromOnboarding',
|
url: '/backup/:walletId',
|
||||||
views: {
|
views: {
|
||||||
'onboarding': {
|
'onboarding': {
|
||||||
templateUrl: 'views/backup.html',
|
templateUrl: 'views/backup.html',
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,22 @@ angular.module('copayApp.services')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
root.setBackupNeededModalFlag = function(walletId) {
|
||||||
|
storageService.setBackupNeededModalFlag(walletId, true, function(err) {
|
||||||
|
if (err) $log.error(err);
|
||||||
|
$log.debug('Backup warning modal flag stored');
|
||||||
|
root.wallet[walletId].showBackupNeededModal = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
function _showBackupNeededModal(wallet, cb) {
|
||||||
|
storageService.getBackupNeededModalFlag(wallet.credentials.walletId, function(err, val) {
|
||||||
|
if (err) $log.error(err);
|
||||||
|
if (val) return cb(false);
|
||||||
|
return cb(true);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
root.setBackupFlag = function(walletId) {
|
root.setBackupFlag = function(walletId) {
|
||||||
storageService.setBackupFlag(walletId, function(err) {
|
storageService.setBackupFlag(walletId, function(err) {
|
||||||
if (err) $log.error(err);
|
if (err) $log.error(err);
|
||||||
|
|
@ -101,6 +117,10 @@ angular.module('copayApp.services')
|
||||||
wallet.balanceHidden = val;
|
wallet.balanceHidden = val;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
_showBackupNeededModal(wallet, function(val) {
|
||||||
|
wallet.showBackupNeededModal = val;
|
||||||
|
});
|
||||||
|
|
||||||
wallet.removeAllListeners();
|
wallet.removeAllListeners();
|
||||||
|
|
||||||
wallet.on('report', function(n) {
|
wallet.on('report', function(n) {
|
||||||
|
|
|
||||||
|
|
@ -365,6 +365,14 @@ angular.module('copayApp.services')
|
||||||
storage.get('receiveTips', cb);
|
storage.get('receiveTips', cb);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
root.setBackupNeededModalFlag = function(walletId, val, cb) {
|
||||||
|
storage.set('showBackupNeededModal-' + walletId, val, cb);
|
||||||
|
};
|
||||||
|
|
||||||
|
root.getBackupNeededModalFlag = function(walletId, cb) {
|
||||||
|
storage.get('showBackupNeededModal-' + walletId, cb);
|
||||||
|
};
|
||||||
|
|
||||||
root.setAmazonGiftCards = function(network, gcs, cb) {
|
root.setAmazonGiftCards = function(network, gcs, cb) {
|
||||||
storage.set('amazonGiftCards-' + network, gcs, cb);
|
storage.set('amazonGiftCards-' + network, gcs, cb);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#onboarding-backup-warning{
|
#backup-warning{
|
||||||
.warning{
|
.warning{
|
||||||
margin:4rem auto 1rem;
|
margin:4rem auto 1rem;
|
||||||
height: 11rem;
|
height: 11rem;
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 400px){
|
@media (max-width: 400px){
|
||||||
#onboarding-backup-warning{
|
#backup-warning{
|
||||||
.warning{
|
.warning{
|
||||||
margin: 2rem auto 1rem;
|
margin: 2rem auto 1rem;
|
||||||
height: 8rem;
|
height: 8rem;
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-height: 540px){
|
@media (max-height: 540px){
|
||||||
#onboarding-backup-warning{
|
#backup-warning{
|
||||||
.cta-buttons{
|
.cta-buttons{
|
||||||
float:left;
|
float:left;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -9,7 +9,12 @@
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
&-header {
|
&-header {
|
||||||
background: rgb(1, 209, 162);
|
&-success {
|
||||||
|
background: rgb(1, 209, 162);
|
||||||
|
}
|
||||||
|
&-warning {
|
||||||
|
background: orange;
|
||||||
|
}
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: .25rem .25rem 0 0;
|
border-radius: .25rem .25rem 0 0;
|
||||||
min-height: 120px;
|
min-height: 120px;
|
||||||
|
|
@ -26,6 +31,12 @@
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
margin-top: .3rem;
|
margin-top: .3rem;
|
||||||
}
|
}
|
||||||
|
&-img-warning {
|
||||||
|
background-image: url('../img/onboarding-success.svg');
|
||||||
|
height: 6rem;
|
||||||
|
background-size: contain;
|
||||||
|
margin-top: .3rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&-content {
|
&-content {
|
||||||
padding: .5rem .8rem;
|
padding: .5rem .8rem;
|
||||||
|
|
@ -42,11 +53,16 @@
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-content-success{
|
&-content-success {
|
||||||
button{
|
button{
|
||||||
color:rgb(23, 174, 140) !important;
|
color:rgb(23, 174, 140) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&-content-warning {
|
||||||
|
button{
|
||||||
|
color: orange !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-backdrop.active {
|
.modal-backdrop.active {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#screenshot-warning-modal{
|
#screenshot-warning-modal{
|
||||||
.popup-modal-header{
|
.popup-modal-header{
|
||||||
&-img{
|
&-img{
|
||||||
background-image: url('../img/onboarding-no-screenshot.svg');
|
background-image: url('../img/no-screenshot.svg');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -112,6 +112,6 @@
|
||||||
@import "onboard-tour";
|
@import "onboard-tour";
|
||||||
@import "onboard-collect-email";
|
@import "onboard-collect-email";
|
||||||
@import "onboard-backup-request";
|
@import "onboard-backup-request";
|
||||||
@import "onboard-backup-warning";
|
@import "../backup-warning";
|
||||||
@import "onboard-disclaimer";
|
@import "onboard-disclaimer";
|
||||||
@import "onboard-push-notifications";
|
@import "onboard-push-notifications";
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,20 @@
|
||||||
}
|
}
|
||||||
#address {
|
#address {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
.incomplete {
|
||||||
|
padding: 50px;
|
||||||
|
.title {
|
||||||
|
padding: 20px;
|
||||||
|
font-size: 25px;
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
.subtitle {
|
||||||
|
padding: 20px;
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
}
|
||||||
|
}
|
||||||
.item {
|
.item {
|
||||||
border: none;
|
border: none;
|
||||||
font-size: .8rem;
|
font-size: .8rem;
|
||||||
|
|
@ -29,6 +43,16 @@
|
||||||
}
|
}
|
||||||
&-gen-address {}
|
&-gen-address {}
|
||||||
}
|
}
|
||||||
|
.qr {
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
|
.backup {
|
||||||
|
background-color: orange;
|
||||||
|
color: #fff;
|
||||||
|
i {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#wallets {
|
#wallets {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue