Change top-bar color

This commit is contained in:
Gustavo Maximiliano Cortez 2015-12-01 17:16:39 -03:00
commit 0c06a3d460
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
17 changed files with 60 additions and 76 deletions

View file

@ -2,7 +2,7 @@
<div <div
class="topbar-container" class="topbar-container"
ng-include="'views/includes/topbar.html'" ng-include="'views/includes/topbar.html'"
ng-init="titleSection='Buy & Sell Bitcoin'; closeToHome = true"> ng-init="titleSection='Buy & Sell Bitcoin'; closeToHome = true; noColor = true">
</div> </div>

View file

@ -1,4 +1,6 @@
<nav ng-controller="topbarController as topbar" class="tab-bar"> <nav ng-controller="topbarController as topbar"
class="tab-bar"
ng-style="{'background-color': noColor ? '#4B6178' : index.backgroundColor}">
<section class="left-small"> <section class="left-small">
<a id="hamburger" class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet" <a id="hamburger" class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet"
ng-click="index.openMenu()"><i class="fi-list size-24"></i> ng-click="index.openMenu()"><i class="fi-list size-24"></i>
@ -14,12 +16,14 @@
</a> </a>
</section> </section>
<section class="right-small" ng-show="showCamera"> <section class="right-small" ng-show="showPreferences">
<qr-scanner ng-show="index.isComplete" on-scan="topbar.onQrCodeScanned(data)" before-scan="topbar.openSendScreen()"></qr-scanner> <a class="p10" ng-click="topbar.goPreferences()">
<i class="fi-widget size-24"></i>
</a>
</section> </section>
<section class="middle tab-bar-section"> <section class="middle tab-bar-section">
<h1 class="title ellipsis" ng-style="{'color': noColor ? '#4A90E2' : index.backgroundColor}"> <h1 class="title ellipsis">
{{(titleSection|translate) || (index.alias || index.walletName)}} {{(titleSection|translate) || (index.alias || index.walletName)}}
</h1> </h1>
</section> </section>

View file

@ -1,34 +0,0 @@
<nav class="tab-bar">
<section class="left-small">
<a ng-click="cancel()" class="p10">
<span class="text-close" translate>Close</span>
</a>
</section>
<section class="middle tab-bar-section">
<h1 class="title ellipsis" ng-style="{'color':color}" translate>
Advanced Send
</h1>
</section>
</nav>
<div class="modal-content fix-modals-touch">
<ul class="no-bullet m0 size-14">
<h4 class="title m0" translate>Fee Policy</h4>
<li ng-repeat="fee in (network == 'livenet' ? feeLevels.livenet : feeLevels.testnet)" ng-click="save(fee.level)" class="line-b p20">
<span class="text-capitalize">{{fee.level|translate}}</span>
<i class="fi-check size-16 right" ng-show="currentFeeLevel == fee.level"></i>
</li>
</ul>
<div class="row column m20t">
<div class="text-gray size-12 text-center" ng-repeat="fee in (network == 'livenet' ? feeLevels.livenet :
feeLevels.testnet)" ng-if="fee.level == currentFeeLevel">
<span translate>Average confirmation time: {{fee.nbBlocks * 10}} minutes</span>.
<span class="size-12 text-light" translate>Current fee rate for this policy: {{fee.feePerKBUnit}}/kiB</span>
</div>
</div>
<div class="extra-margin-bottom"></div>
</div>

View file

@ -1,11 +1,11 @@
<nav class="tab-bar"> <nav class="tab-bar" ng-style="{'background-color':color}">
<section class="left-small"> <section class="left-small">
<a ng-click="cancel()" class="p10"> <a ng-click="cancel()" class="p10">
<span class="text-close" translate>Close</span> <span class="text-close" translate>Close</span>
</a> </a>
</section> </section>
<section class="middle tab-bar-section"> <section class="middle tab-bar-section">
<h1 class="title ellipsis" ng-style="{'color':color}" translate> <h1 class="title ellipsis" translate>
Request a specific amount Request a specific amount
</h1> </h1>
</section> </section>

View file

@ -121,10 +121,9 @@
</div> </div>
<div class="columns large-6 medium-6 small-6"> <div class="columns large-6 medium-6 small-6">
<input type="submit" <input type="submit"
class="button expand round" class="button expand round black"
value="{{'Save'|translate}}" value="{{'Save'|translate}}"
ng-disabled="!addressbookForm.$valid" ng-disabled="!addressbookForm.$valid"
ng-style="{'background-color':color}"
ng-click="newAddress = ''; add(addressbook)"> ng-click="newAddress = ''; add(addressbook)">
</div> </div>
</div> </div>

View file

@ -6,7 +6,7 @@
</a> </a>
</section> </section>
<section class="middle tab-bar-section"> <section class="middle tab-bar-section">
<h1 class="title ellipsis" ng-style="{'color':color}"> <h1 class="title ellipsis">
Details Details
</h1> </h1>
</section> </section>

View file

@ -1,11 +1,11 @@
<nav class="tab-bar"> <nav class="tab-bar" ng-style="{'background-color':color}">
<section class="left-small"> <section class="left-small">
<a ng-click="cancel()" class="p10"> <a ng-click="cancel()" class="p10">
<span class="text-close" translate>Close</span> <span class="text-close" translate>Close</span>
</a> </a>
</section> </section>
<section class="middle tab-bar-section"> <section class="middle tab-bar-section">
<h1 class="title ellipsis" ng-style="{'color':color}" translate> <h1 class="title ellipsis" translate>
Payment request Payment request
</h1> </h1>
</section> </section>

View file

@ -1,4 +1,4 @@
<nav class="tab-bar"> <nav class="tab-bar" ng-style="{'background-color':color}">
<section class="left-small"> <section class="left-small">
<a ng-click="cancel()"> <a ng-click="cancel()">
<i class="icon-arrow-left3 icon-back"></i> <i class="icon-arrow-left3 icon-back"></i>
@ -6,7 +6,7 @@
</a> </a>
</section> </section>
<section class="middle tab-bar-section"> <section class="middle tab-bar-section">
<h1 class="title ellipsis" ng-style="{'color':color}" translate> <h1 class="title ellipsis" translate>
Transaction Transaction
</h1> </h1>
</section> </section>

View file

@ -1,4 +1,4 @@
<nav class="tab-bar"> <nav class="tab-bar" ng-style="{'background-color':color}">
<section class="left-small"> <section class="left-small">
<a ng-click="cancel()"> <a ng-click="cancel()">
<i class="icon-arrow-left3 icon-back"></i> <i class="icon-arrow-left3 icon-back"></i>
@ -6,7 +6,7 @@
</a> </a>
</section> </section>
<section class="middle tab-bar-section"> <section class="middle tab-bar-section">
<h1 class="title ellipsis" ng-style="{'color':color}" translate> <h1 class="title ellipsis" translate>
Payment Proposal Payment Proposal
</h1> </h1>
</section> </section>

View file

@ -1,7 +1,7 @@
<div class="topbar-container" <div class="topbar-container"
ng-include="'views/includes/topbar.html'" ng-include="'views/includes/topbar.html'"
ng-init="showCamera = true"> ng-init="showPreferences = true">
</div> </div>
<div ng-controller="walletHomeController as home"> <div ng-controller="walletHomeController as home">
@ -111,11 +111,8 @@
<div class="avatar-wallet left" <div class="avatar-wallet left"
ng-style="{'background-color':index.backgroundColor}">{{ (index.alias || index.walletName) | limitTo: 1}} ng-style="{'background-color':index.backgroundColor}">{{ (index.alias || index.walletName) | limitTo: 1}}
</div> </div>
<div class="right"> <div class="camera-icon" ng-show="index.isComplete">
<a ng-click="$root.go('preferences')" class="button outline round light-gray tiny preferences-icon m0"> <qr-scanner on-scan="home.onQrCodeScanned(data)" before-scan="home.openSendScreen()"></qr-scanner>
<i class="fi-widget size-18 vm"></i>
<span class="show-for-medium-up" translate>Preferences</span>
</a>
</div> </div>
<div class="wallet-info"> <div class="wallet-info">
<div ng-show="index.isShared"> <div ng-show="index.isShared">

View file

@ -90,13 +90,11 @@ _:-ms-fullscreen, :root .main {
} }
.tab-bar { .tab-bar {
background: #FFFFFF; background-color: #4B6178;
z-index: 5; z-index: 5;
border-bottom: 1px solid #E9E9EC;
} }
.tab-bar h1 { .tab-bar h1 {
color: #7A8C9E;
font-weight: 500; font-weight: 500;
font-size: 14px; font-size: 14px;
} }
@ -119,6 +117,10 @@ _:-ms-fullscreen, :root .main {
border-left: none; border-left: none;
} }
.right-small a, .left-small a {
color: #FFFFFF;
}
.tab-bar .icon-back { .tab-bar .icon-back {
font-size: 2.5rem; font-size: 2.5rem;
position: absolute; position: absolute;
@ -220,6 +222,19 @@ _:-ms-fullscreen, :root .main {
overflow: hidden; overflow: hidden;
} }
.camera-icon a {
color: #fff;
display: block;
position: absolute;
background: #333;
border: 1px solid #666;
padding: 15px 17px;
border-radius: 100%;
top: -43px;
right: 15px;
opacity: 0.7;
}
.copayers { .copayers {
position: relative; position: relative;
padding: 0; padding: 0;
@ -247,12 +262,6 @@ ul.copayer-list img {
background-color: #213140; background-color: #213140;
} }
.right-small a, .left-small a {
color: #A5B2BF;
}
a.missing-copayers { a.missing-copayers {
bottom: -34px; bottom: -34px;
text-align: center; text-align: center;

View file

@ -42,6 +42,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
var ModalInstanceCtrl = function($scope, $modalInstance) { var ModalInstanceCtrl = function($scope, $modalInstance) {
$scope.type = 'BUY'; $scope.type = 'BUY';
$scope.wallets = wallets; $scope.wallets = wallets;
$scope.noColor = true;
$scope.cancel = function() { $scope.cancel = function() {
$modalInstance.dismiss('cancel'); $modalInstance.dismiss('cancel');
}; };

View file

@ -42,6 +42,7 @@ angular.module('copayApp.controllers').controller('glideraController',
$scope.tx = tx; $scope.tx = tx;
$scope.settings = config; $scope.settings = config;
$scope.color = fc.backgroundColor; $scope.color = fc.backgroundColor;
$scope.noColor = true;
glideraService.getTransaction(token, tx.transactionUuid, function(error, tx) { glideraService.getTransaction(token, tx.transactionUuid, function(error, tx) {
$scope.tx = tx; $scope.tx = tx;

View file

@ -562,6 +562,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.backgroundColor = config.colorFor[self.walletId] || '#4A90E2'; self.backgroundColor = config.colorFor[self.walletId] || '#4A90E2';
var fc = profileService.focusedClient; var fc = profileService.focusedClient;
fc.backgroundColor = self.backgroundColor; fc.backgroundColor = self.backgroundColor;
if (isCordova && StatusBar.isVisible) {
StatusBar.backgroundColorByHexString(fc.backgroundColor);
}
}; };
self.setBalance = function(balance) { self.setBalance = function(balance) {

View file

@ -48,6 +48,7 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
var ModalInstanceCtrl = function($scope, $modalInstance) { var ModalInstanceCtrl = function($scope, $modalInstance) {
$scope.type = 'SELL'; $scope.type = 'SELL';
$scope.wallets = wallets; $scope.wallets = wallets;
$scope.noColor = true;
$scope.cancel = function() { $scope.cancel = function() {
$modalInstance.dismiss('cancel'); $modalInstance.dismiss('cancel');
}; };

View file

@ -1,17 +1,13 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('topbarController', function($scope, $rootScope, go) { angular.module('copayApp.controllers').controller('topbarController', function(go) {
this.onQrCodeScanned = function(data) {
$rootScope.$emit('dataScanned', data);
};
this.openSendScreen = function() {
go.send();
};
this.goHome = function() { this.goHome = function() {
go.walletHome(); go.walletHome();
}; };
this.goPreferences = function() {
go.preferences();
};
}); });

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, feeService, bwsError, confirmDialog, txFormatService, animationService, addressbookService) { angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, feeService, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go) {
var self = this; var self = this;
$rootScope.hideMenuBar = false; $rootScope.hideMenuBar = false;
@ -98,6 +98,14 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
} }
}; };
this.onQrCodeScanned = function(data) {
$rootScope.$emit('dataScanned', data);
};
this.openSendScreen = function() {
go.send();
};
rateService.whenAvailable(function() { rateService.whenAvailable(function() {
self.isRateAvailable = true; self.isRateAvailable = true;
$rootScope.$digest(); $rootScope.$digest();
@ -122,7 +130,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
'address': ($scope.newAddress || ''), 'address': ($scope.newAddress || ''),
'label': '' 'label': ''
}; };
$scope.color = fc.backgroundColor;
$scope.beforeQrCodeScann = function() { $scope.beforeQrCodeScann = function() {
$scope.error = null; $scope.error = null;