header + default colors

This commit is contained in:
Sebastiaan Pasma 2018-08-03 14:28:56 +02:00
commit d7fabc3642
No known key found for this signature in database
GPG key ID: 9A2B0C8B95A1D26F
4 changed files with 14 additions and 8 deletions

View file

@ -45,6 +45,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
vm.wallet = null; vm.wallet = null;
var config = null; var config = null;
var defaults = {};
var coin = ''; var coin = '';
var countDown = null; var countDown = null;
var usingCustomFee = false; var usingCustomFee = false;
@ -63,7 +64,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
function onBeforeEnter(event, data) { function onBeforeEnter(event, data) {
defaults = configService.getDefaults();
originWalletId = data.stateParams.fromWalletId; originWalletId = data.stateParams.fromWalletId;
satoshis = parseInt(data.stateParams.amount, 10); satoshis = parseInt(data.stateParams.amount, 10);
toAddress = data.stateParams.toAddr; toAddress = data.stateParams.toAddr;
@ -91,7 +92,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
} else { } else {
config = configCache; config = configCache;
priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat';
vm.origin.currencyColor = vm.originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; vm.origin.currencyColor = (vm.originWallet.coin === 'btc' ? defaults.bitcoinWalletColor : defaults.bitcoinCashWalletColor);
console.log("coin", vm.originWallet.coin, vm.origin.currencyColor, config.bitcoinWalletColor, vm.originWallet.coin === 'btc');
unitFromSat = 1 / config.wallet.settings.unitToSatoshi; unitFromSat = 1 / config.wallet.settings.unitToSatoshi;
} }
updateSendAmounts(); updateSendAmounts();
@ -404,7 +406,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
vm.destination.kind = 'contact'; vm.destination.kind = 'contact';
vm.destination.name = contact.name; vm.destination.name = contact.name;
vm.destination.email = contact.email; vm.destination.email = contact.email;
vm.destination.color = contact.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; vm.destination.color = contact.coin === 'btc' ? defaults.bitcoinWalletColor : defaults.bitcoinCashWalletColor;
vm.destination.currency = contact.coin.toUpperCase(); vm.destination.currency = contact.coin.toUpperCase();
vm.destination.currencyColor = vm.destination.color; vm.destination.currencyColor = vm.destination.color;
} }
@ -422,8 +424,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit
vm.destination.kind = 'wallet'; vm.destination.kind = 'wallet';
vm.destination.name = destinationWallet.name; vm.destination.name = destinationWallet.name;
if (config) { if (defaults) {
vm.destination.currencyColor = vm.destination.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; vm.destination.currencyColor = vm.destination.coin === 'btc' ? defaults.bitcoinWalletColor : defaults.bitcoinCashWalletColor;
} }
var balanceText = getWalletBalanceDisplayText(destinationWallet); var balanceText = getWalletBalanceDisplayText(destinationWallet);

View file

@ -1,6 +1,9 @@
.header { .header {
padding: 29px 12px 61px; padding: 29px 12px 61px;
background-color: #FAB915; background-color: $v-bitcoin-orange;
&.btc {
background-color: $v-bitcoin-core;
}
color: #FFFFFF; color: #FFFFFF;
.title { .title {

View file

@ -8,6 +8,7 @@ $v-font-family-light: "Roboto-Light", sans-serif-
/* Colors */ /* Colors */
$v-bitcoin-orange: #fab915 !default; $v-bitcoin-orange: #fab915 !default;
$v-bitcoin-core: #535353 !default;
$v-off-black: #262424; $v-off-black: #262424;
$v-dark-gray: #445 !default; $v-dark-gray: #445 !default;

View file

@ -1,5 +1,5 @@
<ion-view id="view-review" hide-tabs> <ion-view id="view-review" hide-tabs>
<ion-nav-bar class="bar-royal"> <ion-nav-bar class="bar-royal {{vm.origin.currency.toLowerCase()}}">
<ion-nav-title> <ion-nav-title>
{{'Review Transaction' | translate}} {{'Review Transaction' | translate}}
</ion-nav-title> </ion-nav-title>
@ -10,7 +10,7 @@
<ion-content class="padded-bottom-cta-with-summary bg-neutral" <ion-content class="padded-bottom-cta-with-summary bg-neutral"
ng-init="memoExpanded = false"> ng-init="memoExpanded = false">
<div ng-if="vm.thirdParty && vm.thirdParty.id === 'shapeshift'" ng-include="'views/thirdparty/shapeshift-header.html'"></div> <div ng-if="vm.thirdParty && vm.thirdParty.id === 'shapeshift'" ng-include="'views/thirdparty/shapeshift-header.html'"></div>
<div class="header" ng-class="vm.thirdParty.id"> <div class="header {{vm.origin.currency.toLowerCase()}}" ng-class="vm.thirdParty.id">
<div class="content"> <div class="content">
<p>{{vm.sendingTitle}}</p> <p>{{vm.sendingTitle}}</p>
<p class="large">{{vm.primaryAmount}} {{vm.primaryCurrency}}</p> <p class="large">{{vm.primaryAmount}} {{vm.primaryCurrency}}</p>