Merge pull request #3580 from cmgustavo/ref/menu-01
Simplify menu. Fix contacts color
This commit is contained in:
commit
28fc319478
5 changed files with 126 additions and 130 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<div ng-init="wallets[0] ? selectedWalletsOpt = true : selectedWalletsOpts = false">
|
<div ng-init="wallets[0] ? selectedWalletsOpt = true : selectedWalletsOpts = false">
|
||||||
<nav class="tab-bar">
|
<nav class="tab-bar" ng-style="{'background-color':color}">
|
||||||
<section class="left-small">
|
<section class="left-small">
|
||||||
<a ng-show="!editAddressbook && !addAddressbookEntry" ng-click="cancel()" class="p10">
|
<a ng-show="!editAddressbook && !addAddressbookEntry" ng-click="cancel()" class="p10">
|
||||||
<span class="text-close" translate>Close</span>
|
<span class="text-close" translate>Close</span>
|
||||||
|
|
@ -25,12 +25,20 @@
|
||||||
<div class="modal-content fix-modals-touch p20v">
|
<div class="modal-content fix-modals-touch p20v">
|
||||||
<div class="create-tab small-only-text-center">
|
<div class="create-tab small-only-text-center">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="tab-container small-6 medium-3 large-2" ng-class="{'selected':selectedWalletsOpt}" ng-click="selectedWalletsOpt = true">
|
<div class="tab-container small-6 medium-3 large-2"
|
||||||
|
ng-class="{'selected':selectedWalletsOpt}"
|
||||||
|
ng-style="{'border-color':selectedWalletsOpt ? color : 'inherit'}"
|
||||||
|
ng-click="selectedWalletsOpt = true">
|
||||||
<a href
|
<a href
|
||||||
|
ng-style="{'color':selectedWalletsOpt ? color : 'inherit'}"
|
||||||
ng-click="create.setTotalCopayers(1)" translate> My wallets</a>
|
ng-click="create.setTotalCopayers(1)" translate> My wallets</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-container small-6 medium-3 large-2" ng-class="{'selected':!selectedWalletsOpt}" ng-click="selectedWalletsOpt = false">
|
<div class="tab-container small-6 medium-3 large-2"
|
||||||
|
ng-class="{'selected':!selectedWalletsOpt}"
|
||||||
|
ng-style="{'border-color':!selectedWalletsOpt ? color : 'inherit'}"
|
||||||
|
ng-click="selectedWalletsOpt = false">
|
||||||
<a href
|
<a href
|
||||||
|
ng-style="{'color':!selectedWalletsOpt ? color : 'inherit'}"
|
||||||
ng-click="create.setTotalCopayers(3)" translate>My contacts</a>
|
ng-click="create.setTotalCopayers(3)" translate>My contacts</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,114 @@
|
||||||
{{index.alternativeIsoCode}} </span>
|
{{index.alternativeIsoCode}} </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Activity -->
|
||||||
|
|
||||||
|
<h4 class="title m0" translate>Activity</h4>
|
||||||
|
<div class="row m20t" ng-show="!index.updatingTxHistory[index.walletId] && !index.txHistory[0]">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<div class="oh text-center">
|
||||||
|
<span ng-show="index.txHistoryError && !index.notAuthorized" ng-click='index.updateTxHistory()'>
|
||||||
|
<p class="size-12 m10b db text-gray" translate>Could not fetch transaction history</p>
|
||||||
|
<button class="outline round light-gray tiny" translate>Tap to retry</button>
|
||||||
|
</span>
|
||||||
|
<span ng-if="!index.txHistoryError" translate>
|
||||||
|
No transactions yet
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div ng-show="index.updatingTxHistory[index.walletId]">
|
||||||
|
<div ng-show="index.txProgress > 6" class="row m20t text-center">
|
||||||
|
<div class="circle-icon">
|
||||||
|
<img src="img/icon-sync.svg" alt="sync" width="70">
|
||||||
|
</div>
|
||||||
|
<div translate class="size-12 text-gray m20t small-10 small-centered columns">
|
||||||
|
Initial transaction history synchronization can take some minutes for wallets with many transactions.
|
||||||
|
<b> Please stand by.</b>
|
||||||
|
</div>
|
||||||
|
<div class="small-8 small-centered columns line-b p10 m20b"></div>
|
||||||
|
<div class="columns large-12 medium-12 small-12 m10b">
|
||||||
|
<div class="spinner">
|
||||||
|
<div class="rect1"></div>
|
||||||
|
<div class="rect2"></div>
|
||||||
|
<div class="rect3"></div>
|
||||||
|
<div class="rect4"></div>
|
||||||
|
<div class="rect5"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="size-14 text-gray m20t">
|
||||||
|
<b>{{index.txProgress}}</b> <br>
|
||||||
|
<span translate>Transactions Downloaded</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div ng-show="index.txHistory[0]">
|
||||||
|
<div ng-repeat="btx in index.txHistory"
|
||||||
|
ng-click="home.openTxModal(btx)"
|
||||||
|
class="row collapse last-transactions-content">
|
||||||
|
<div class="large-3 medium-3 small-3 columns">
|
||||||
|
<span class="label tu radius" ng-show="btx.action == 'received'"
|
||||||
|
ng-style="{'background-color':index.backgroundColor}" translate>Received</span>
|
||||||
|
<span class="label tu gray radius" ng-show="btx.action == 'sent'" translate>Sent</span>
|
||||||
|
<span class="label tu gray radius" ng-show="btx.action == 'moved'" translate>Moved</span>
|
||||||
|
<span class="label tu warning radius" ng-show="btx.action == 'invalid'" translate>Invalid</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="large-4 medium-4 small-4 columns">
|
||||||
|
<span class="size-16">
|
||||||
|
<span ng-if="btx.action == 'received'">+</span>
|
||||||
|
<span ng-if="btx.action == 'sent'">-</span>
|
||||||
|
<span class="size-12" ng-if="btx.action == 'invalid'" translate>
|
||||||
|
(possible double spend)
|
||||||
|
</span>
|
||||||
|
<span ng-if="btx.action != 'invalid'">
|
||||||
|
{{btx.amountStr}}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="large-4 medium-4 small-4 columns text-right">
|
||||||
|
<div class="m5t size-12 text-gray">
|
||||||
|
<time ng-if="btx.time">{{btx.time * 1000 | amTimeAgo}}</time>
|
||||||
|
<span translate class="text-warning"
|
||||||
|
ng-show="!btx.time && (!btx.confirmations || btx.confirmations == 0)">
|
||||||
|
Unconfirmed
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="large-1 medium-1 small-1 columns text-right">
|
||||||
|
<i class="icon-arrow-right3 size-18"></i>
|
||||||
|
</div>
|
||||||
|
<div class="size-14 text-gray columns m5t" ng-if="btx.message || btx.addressTo">
|
||||||
|
<div ng-show="btx.message">{{btx.message}}</div>
|
||||||
|
<div ng-show="!btx.message">
|
||||||
|
<span translate>To</span>: {{index.addressbook[btx.addressTo] || btx.addressTo}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row m20t text-center" ng-show="index.historyRendering">
|
||||||
|
<div class="columns large-12 medium-12 small-12">
|
||||||
|
<div class="spinner">
|
||||||
|
<div class="rect1"></div>
|
||||||
|
<div class="rect2"></div>
|
||||||
|
<div class="rect3"></div>
|
||||||
|
<div class="rect4"></div>
|
||||||
|
<div class="rect5"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row m20t">
|
||||||
|
<button type="submit" class="outline round small expand m0" ng-show="index.historyShowShowAll" ng-click="index.showAllHistory()" ng-style="{'background-color':index.backgroundColor}" translate>
|
||||||
|
<i class="icon-arrow-down4 ng-scope"></i>
|
||||||
|
Show all
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="extra-margin-bottom"></div>
|
<div class="extra-margin-bottom"></div>
|
||||||
</div> <!-- END WalletHome -->
|
</div> <!-- END WalletHome -->
|
||||||
|
|
||||||
|
|
@ -394,117 +502,6 @@
|
||||||
<div class="extra-margin-bottom"></div>
|
<div class="extra-margin-bottom"></div>
|
||||||
</div> <!-- END Send -->
|
</div> <!-- END Send -->
|
||||||
|
|
||||||
<!--
|
|
||||||
|
|
||||||
history
|
|
||||||
|
|
||||||
-->
|
|
||||||
<div id="history" class="history tab-view">
|
|
||||||
<div class="row m20t" ng-show="!index.txHistory[0] && !index.updatingTxHistory[index.walletId]">
|
|
||||||
<div class="large-12 columns">
|
|
||||||
<div class="oh text-center">
|
|
||||||
<span ng-show="index.txHistoryError && !index.notAuthorized" ng-click='index.updateTxHistory()'>
|
|
||||||
<p class="size-12 m10b db text-gray" translate>Could not fetch transaction history</p>
|
|
||||||
<button class="outline round light-gray tiny" translate>Tap to retry</button>
|
|
||||||
</span>
|
|
||||||
<span ng-if="!index.txHistoryError" translate>
|
|
||||||
No transactions yet
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div ng-show="index.updatingTxHistory[index.walletId]">
|
|
||||||
<div ng-show="index.txProgress > 6" class="row m20t text-center">
|
|
||||||
<div class="circle-icon">
|
|
||||||
<img src="img/icon-sync.svg" alt="sync" width="70">
|
|
||||||
</div>
|
|
||||||
<div translate class="size-12 text-gray m20t small-10 small-centered columns">
|
|
||||||
Initial transaction history synchronization can take some minutes for wallets with many transactions.
|
|
||||||
<b> Please stand by.</b>
|
|
||||||
</div>
|
|
||||||
<div class="small-8 small-centered columns line-b p10 m20b"></div>
|
|
||||||
<div class="columns large-12 medium-12 small-12 m10b">
|
|
||||||
<div class="spinner">
|
|
||||||
<div class="rect1"></div>
|
|
||||||
<div class="rect2"></div>
|
|
||||||
<div class="rect3"></div>
|
|
||||||
<div class="rect4"></div>
|
|
||||||
<div class="rect5"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="size-14 text-gray m20t">
|
|
||||||
<b>{{index.txProgress}}</b> <br>
|
|
||||||
<span translate>Transactions Downloaded</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div ng-show="index.txHistory[0]">
|
|
||||||
<div ng-repeat="btx in index.txHistory"
|
|
||||||
ng-click="home.openTxModal(btx)"
|
|
||||||
class="row collapse last-transactions-content">
|
|
||||||
<div class="large-3 medium-3 small-3 columns">
|
|
||||||
<span class="label tu radius" ng-show="btx.action == 'received'"
|
|
||||||
ng-style="{'background-color':index.backgroundColor}" translate>Received</span>
|
|
||||||
<span class="label tu gray radius" ng-show="btx.action == 'sent'" translate>Sent</span>
|
|
||||||
<span class="label tu gray radius" ng-show="btx.action == 'moved'" translate>Moved</span>
|
|
||||||
<span class="label tu warning radius" ng-show="btx.action == 'invalid'" translate>Invalid</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="large-4 medium-4 small-4 columns">
|
|
||||||
<span class="size-16">
|
|
||||||
<span ng-if="btx.action == 'received'">+</span>
|
|
||||||
<span ng-if="btx.action == 'sent'">-</span>
|
|
||||||
<span class="size-12" ng-if="btx.action == 'invalid'" translate>
|
|
||||||
(possible double spend)
|
|
||||||
</span>
|
|
||||||
<span ng-if="btx.action != 'invalid'">
|
|
||||||
{{btx.amountStr}}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="large-4 medium-4 small-4 columns text-right">
|
|
||||||
<div class="m5t size-12 text-gray">
|
|
||||||
<time ng-if="btx.time">{{btx.time * 1000 | amTimeAgo}}</time>
|
|
||||||
<span translate class="text-warning"
|
|
||||||
ng-show="!btx.time && (!btx.confirmations || btx.confirmations == 0)">
|
|
||||||
Unconfirmed
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="large-1 medium-1 small-1 columns text-right">
|
|
||||||
<i class="icon-arrow-right3 size-18"></i>
|
|
||||||
</div>
|
|
||||||
<div class="size-14 text-gray columns m5t" ng-if="btx.message || btx.addressTo">
|
|
||||||
<div ng-show="btx.message">{{btx.message}}</div>
|
|
||||||
<div ng-show="!btx.message">
|
|
||||||
<span translate>To</span>: {{index.addressbook[btx.addressTo] || btx.addressTo}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row m20t text-center" ng-show="index.historyRendering">
|
|
||||||
<div class="columns large-12 medium-12 small-12">
|
|
||||||
<div class="spinner">
|
|
||||||
<div class="rect1"></div>
|
|
||||||
<div class="rect2"></div>
|
|
||||||
<div class="rect3"></div>
|
|
||||||
<div class="rect4"></div>
|
|
||||||
<div class="rect5"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row m20t">
|
|
||||||
<button type="submit" class="outline round small expand m0" ng-show="index.historyShowShowAll" ng-click="index.showAllHistory()" ng-style="{'background-color':index.backgroundColor}" translate>
|
|
||||||
<i class="icon-arrow-down4 ng-scope"></i>
|
|
||||||
Show all
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="extra-margin-bottom"></div>
|
|
||||||
</div> <!-- END History -->
|
|
||||||
|
|
||||||
<div id="{{view.id}}" class="{{view.class}} tab-view" ng-repeat="view in index.addonViews" ng-include="view.template">
|
<div id="{{view.id}}" class="{{view.class}} tab-view" ng-repeat="view in index.addonViews" ng-include="view.template">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -653,12 +653,6 @@ input[type=number]::-webkit-outer-spin-button {
|
||||||
.label.alert {background-color: #ED4A43;}
|
.label.alert {background-color: #ED4A43;}
|
||||||
.label.gray {background-color: #4B6178;}
|
.label.gray {background-color: #4B6178;}
|
||||||
|
|
||||||
.history .label {
|
|
||||||
width: 57px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 65%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-alert {
|
.bg-alert {
|
||||||
background-color: #ED4A43;
|
background-color: #ED4A43;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,26 +20,22 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
};
|
};
|
||||||
|
|
||||||
self.menu = [{
|
self.menu = [{
|
||||||
'title': gettext('Home'),
|
|
||||||
'icon': 'icon-home',
|
|
||||||
'link': 'walletHome'
|
|
||||||
}, {
|
|
||||||
'title': gettext('Receive'),
|
'title': gettext('Receive'),
|
||||||
'icon': 'icon-receive2',
|
'icon': 'icon-receive2',
|
||||||
'link': 'receive'
|
'link': 'receive'
|
||||||
|
}, {
|
||||||
|
'title': gettext('Home'),
|
||||||
|
'icon': 'icon-home',
|
||||||
|
'link': 'walletHome'
|
||||||
}, {
|
}, {
|
||||||
'title': gettext('Send'),
|
'title': gettext('Send'),
|
||||||
'icon': 'icon-paperplane',
|
'icon': 'icon-paperplane',
|
||||||
'link': 'send'
|
'link': 'send'
|
||||||
}, {
|
|
||||||
'title': gettext('History'),
|
|
||||||
'icon': 'icon-history',
|
|
||||||
'link': 'history'
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
self.addonViews = addonManager.addonViews();
|
self.addonViews = addonManager.addonViews();
|
||||||
self.menu = self.menu.concat(addonManager.addonMenuItems());
|
self.menu = self.menu.concat(addonManager.addonMenuItems());
|
||||||
self.menuItemSize = self.menu.length > 5 ? 2 : 3;
|
self.menuItemSize = self.menu.length > 4 ? 2 : 4;
|
||||||
self.txTemplateUrl = addonManager.txTemplateUrl() || 'views/includes/transaction.html';
|
self.txTemplateUrl = addonManager.txTemplateUrl() || 'views/includes/transaction.html';
|
||||||
|
|
||||||
self.tab = 'walletHome';
|
self.tab = 'walletHome';
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
$scope.selectedAddressbook = {};
|
$scope.selectedAddressbook = {};
|
||||||
$scope.newAddress = address;
|
$scope.newAddress = address;
|
||||||
$scope.walletName = fc.credentials.walletName;
|
$scope.walletName = fc.credentials.walletName;
|
||||||
|
$scope.color = fc.backgroundColor;
|
||||||
$scope.addressbook = {
|
$scope.addressbook = {
|
||||||
'address': ($scope.newAddress || ''),
|
'address': ($scope.newAddress || ''),
|
||||||
'label': ''
|
'label': ''
|
||||||
|
|
@ -688,7 +689,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
|
|
||||||
// on touchdown elements
|
// on touchdown elements
|
||||||
$log.debug('Binding touchstart elements...');
|
$log.debug('Binding touchstart elements...');
|
||||||
['hamburger', 'menu-walletHome', 'menu-send', 'menu-receive', 'menu-history'].forEach(function(id) {
|
['hamburger', 'menu-walletHome', 'menu-send', 'menu-receive'].forEach(function(id) {
|
||||||
var e = document.getElementById(id);
|
var e = document.getElementById(id);
|
||||||
if (e) e.addEventListener('touchstart', function() {
|
if (e) e.addEventListener('touchstart', function() {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue