Merge branch 'ref/design' of https://github.com/bitpay/bitpay-wallet into feature/onboarding_screenshot_warning_model

This commit is contained in:
Jamal Jackson 2016-09-15 09:37:36 -04:00
commit be58b7983d
38 changed files with 393 additions and 75 deletions

View file

@ -212,4 +212,14 @@ angular.module('copayApp.controllers').controller('backupController',
$scope.selectComplete = false;
};
$scope.backupGoBack = function() {
if ($stateParams.fromOnboarding) $state.go('onboarding.backupWarning', {
walletId: $stateParams.walletId,
fromOnboarding: true
});
else $state.go('tabs.preferences.main', {
walletId: $stateParams.walletId
});
};
});

View file

@ -27,6 +27,14 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
});
};
this.confirm = function() {
var title = gettextCatalog.getString('Confirm Amazon.com Gift Card purchase for ${{amount}} USD', {amount: $scope.fiat});
var ok = gettextCatalog.getString('Buy');
popupService.showConfirm(title, null, ok, null, function(res) {
if (res) self.createTx();
});
};
this.createTx = function() {
self.errorInfo = null;

View file

@ -1,8 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService) {
angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService, uxLanguage, externalLinkService) {
$scope.init = function() {
$scope.lang = uxLanguage.currentLanguage;
$scope.terms = {};
$scope.accept1 = $scope.accept2 = $scope.accept3 = false;
$timeout(function() {
@ -19,6 +20,10 @@ angular.module('copayApp.controllers').controller('disclaimerController', functi
});
};
$scope.openExternalLink = function(url, target) {
externalLinkService.open(url, target);
};
$scope.openTermsModal = function() {
$ionicModal.fromTemplateUrl('views/modals/terms.html', {
scope: $scope

View file

@ -13,10 +13,10 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
if (!$scope.isCordova) $scope.checkTips();
}
$scope.checkTips = function() {
$scope.checkTips = function(force) {
storageService.getReceiveTipsAccepted(function(err, accepted) {
if (err) $log.warn(err);
if (accepted) return;
if (accepted && !force) return;
$timeout(function() {
$ionicModal.fromTemplateUrl('views/modals/receive-tips.html', {
@ -25,7 +25,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.receiveTipsModal = modal;
$scope.receiveTipsModal.show();
});
}, 1000);
}, force ? 1 : 1000);
});
};

View file

@ -789,6 +789,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
$ionicPlatform.registerBackButtonAction(function(e) {
//from root tabs view
var fromWelcome = $ionicHistory.currentStateName().match(/welcome/) ? true : false;
var matchHome = $ionicHistory.currentStateName().match(/home/) ? true : false;
var matchReceive = $ionicHistory.currentStateName().match(/receive/) ? true : false;
@ -796,9 +797,23 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
var matchSettings = $ionicHistory.currentStateName().match(/settings/) ? true : false;
var fromTabs = matchHome | matchReceive | matchSend | matchSettings;
//onboarding with no back views
var matchCollectEmail = $ionicHistory.currentStateName().match(/collectEmail/) ? true : false;
var matchBackupRequest = $ionicHistory.currentStateName().match(/backupRequest/) ? true : false;
var matchDisclaimer = $ionicHistory.currentStateName().match(/disclaimer/) ? true : false;
var matchNotifications = $ionicHistory.currentStateName().match(/notifications/) ? true : false;
var fromOnboarding = matchCollectEmail | matchBackupRequest | matchDisclaimer | matchNotifications;
if (fromOnboarding) {
e.preventDefault();
return;
}
if ($ionicHistory.backView() && !fromTabs) {
$ionicHistory.goBack();
} else if ($rootScope.backButtonPressedOnceToExit || fromWelcome) {
} else
if ($rootScope.backButtonPressedOnceToExit || fromWelcome) {
ionic.Platform.exitApp();
} else {
$rootScope.backButtonPressedOnceToExit = true;

View file

@ -889,7 +889,7 @@ input[type=file] {
}
.wallets {
height: 90px;
height: 110px;
}
.bar .button.back-button {
@ -980,6 +980,7 @@ input[type=number] {
@import "common";
@import "forms";
@import 'mixins/mixins';
@import 'views/tabs';
@import "views/add";
@import "views/amount";
@import "views/confirm";

View file

@ -21,13 +21,9 @@
&.swiper-slide-next{
left:4%;
}
span{
float:right;
clear:both;
}
}
}
.swiper-pagination{
visibility: hidden;
}
}
}

View file

@ -0,0 +1,40 @@
#onboarding-push-notifications{
h2{
margin-top:2rem;
}
#cta{
background-image: url('../img/onboarding-push-notifications.svg');
height: 15rem;
margin-top: .75rem;
}
.cta-buttons{
float:none;
bottom:0;
position: absolute;
width:100%;
button{
max-width: 400px;
}
}
}
@media (max-width: 400px){
#onboarding-push-notifications{
.cta-buttons{
float:none;
bottom:0;
position: absolute;
}
}
}
@media (max-height: 540px){
#onboarding-push-notifications{
#cta{
margin-bottom: 0;
}
.cta-buttons{
float:left;
position: relative;
}
}
}

View file

@ -48,9 +48,7 @@
}
}
button {
&.next-slide {
background: rgba(215, 215, 215, 0.10);
}
color:#fff;
}
}
.col {
@ -67,8 +65,12 @@
.button-transparent{
background: none !important;
}
.button-translucent{
background: rgba(215, 215, 215, 0.1)
}
.button-primary{
background: rgb(100, 124, 232) !important;
color:#fff;
}
.light-blue{
color:rgb(100, 124, 232);
@ -98,3 +100,4 @@
@import "onboard-backup-request";
@import "onboard-backup-warning";
@import "onboard-disclaimer";
@import "onboard-push-notifications";

View file

@ -17,7 +17,8 @@
#agree-to-terms {
background: #fff;
padding: 1rem;
position: relative;
position: absolute;
bottom: 0;
.checkbox input:before,
.checkbox .checkbox-icon:before {
border-radius: 50% !important;

36
src/sass/views/tabs.scss Normal file
View file

@ -0,0 +1,36 @@
.tabs .tab-item {
.icon {
background-repeat: no-repeat;
background-position: center;
&.ico-home{
background-image: url('../img/tab-icons/ico-home.svg');
}
&.ico-home-selected{
background-image: url('../img/tab-icons/ico-home-selected.svg');
}
&.ico-receive{
background-image: url('../img/tab-icons/ico-receive.svg');
}
&.ico-receive-selected{
background-image: url('../img/tab-icons/ico-receive-selected.svg');
}
&.ico-settings{
background-image: url('../img/tab-icons/ico-settings.svg');
}
&.ico-settings-selected{
background-image: url('../img/tab-icons/ico-settings-selected.svg');
}
&.ico-scan{
background-image: url('../img/tab-icons/ico-scan.svg');
}
&.ico-scan-selected{
background-image: url('../img/tab-icons/ico-scan-selected.svg');
}
&.ico-send{
background-image: url('../img/tab-icons/ico-send.svg');
}
&.ico-send-selected{
background-image: url('../img/tab-icons/ico-send-selected.svg');
}
}
}

View file

@ -34,7 +34,7 @@
position: absolute;
width: 100%;
text-align: center;
bottom: 90px;
bottom: 45px;
button {
max-width: 400px;
}
@ -53,6 +53,7 @@
position: absolute;
bottom: 43px;
padding-bottom: 20px;
padding: .5rem .5rem .9rem;
p {
font-weight: bold;
font-weight: bold;
@ -73,14 +74,6 @@
margin: 5px auto 0;
}
}
ion-content.has-header {
#select-phrase {
bottom: 75px;
}
.backup-phrase {
padding: .5rem .5rem .9rem;
}
}
}
@media (max-width: 400px) {