From 4f1205a4f5ff1b3380955e07ae29a5554af77747 Mon Sep 17 00:00:00 2001 From: bechi Date: Thu, 30 Oct 2014 12:08:42 -0300 Subject: [PATCH 1/3] fix UI style & manage wallet --- css/src/main.css | 29 ++++++++++++++++------------- views/includes/head.html | 16 +++++++++------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/css/src/main.css b/css/src/main.css index fd1a09464..bba0062a1 100644 --- a/css/src/main.css +++ b/css/src/main.css @@ -133,7 +133,7 @@ header .alt-currency { } .head { - padding-left: 20px; + padding: 0.9rem 0; -moz-box-shadow: 0px 0px 2px 0px rgba(0,0,0,0.10); box-shadow: 0px 0px 2px 0px rgba(0,0,0,0.10); background-color: #FFF; @@ -146,7 +146,7 @@ header .alt-currency { .head .title h1 { float: left; - padding: 12px 10px; + padding-left: 2rem; margin: 0; } @@ -157,29 +157,32 @@ header .alt-currency { .head .menu a.dropdown { display: block; - height: 62px; - width: 140px; - padding: 12px 5px; + margin: 0 1rem 0 2rem; + height: 48px; + width: 100px; text-align: center; } .head .menu a.dropdown:hover, .head .menu a.dropdown.hover { border-bottom: 1px solid #fff; + top: 0; } .head .menu ul { + border: none; position: absolute; - right: 0; - width: 160px; + right: 14px; + width: 100px; list-style-type: none; - top: 61px; + top: 47px; } .head .menu ul.hover { background: #FFFFFF; - -moz-box-shadow: 0px 0px 2px 0px rgba(0,0,0,0.25); - box-shadow: 0px 0px 2px 0px rgba(0,0,0,0.25); + -moz-box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.25); + box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.25); + border: none; } .head .menu ul li a { @@ -499,6 +502,7 @@ a.button-setup { .size-21 { font-size: 21px; } .size-24 { font-size: 24px; } .size-36 { font-size: 36px; } +.size-42 { font-size: 42px; } .size-48 { font-size: 48px; } .size-60 { font-size: 60px; } .size-72 { font-size: 72px; } @@ -575,7 +579,7 @@ a.button-setup { padding-bottom: 0.5rem; } -.line-dashed { +.p-dashed { border-top: 1px dashed #3C5269; margin: 1rem 0; padding: 1rem 0; @@ -1099,8 +1103,7 @@ button.gray:focus, } .photo-container { - margin-right: 10px; - padding-top: 0.4rem; + margin-right: 3px; display: inline-block; width: 35px; height: 35px; diff --git a/views/includes/head.html b/views/includes/head.html index 41c0cad7b..18cf9b318 100644 --- a/views/includes/head.html +++ b/views/includes/head.html @@ -2,19 +2,21 @@

{{$root.title}}

+ + +
+ {{'Manage wallets' | translate }} +
From 9d798a25473e1b8369d085ed77a411967e407399 Mon Sep 17 00:00:00 2001 From: bechi Date: Thu, 30 Oct 2014 14:26:11 -0300 Subject: [PATCH 2/3] sidebar balance locked --- css/src/main.css | 22 +++++++++++++++++++--- views/includes/sidebar.html | 14 +++++++++----- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/css/src/main.css b/css/src/main.css index bba0062a1..d9725935f 100644 --- a/css/src/main.css +++ b/css/src/main.css @@ -175,7 +175,7 @@ header .alt-currency { right: 14px; width: 100px; list-style-type: none; - top: 47px; + top: 47px;nt } .head .menu ul.hover { @@ -612,6 +612,19 @@ a.button-setup { color: #B6E9DF; } +.founds .locked { + font-size: 11px; + z-index: -99999; + background-color: #213140; + position: absolute; + top: 52px; + width: 250px; + left: 0; + padding: 0.3rem 0.7rem; + color: white; + border-bottom: 1px solid #374756; +} + .hidden { visibility: hidden; } @@ -1118,7 +1131,7 @@ a:hover .photo-container { color: #fff; } -.side-nav {padding-top: 38px;} +.side-nav {padding-top: 50px;} .side-nav li { font-size: 16px; @@ -1127,6 +1140,10 @@ a:hover .photo-container { margin-bottom: 10px; } +.side-nav li>a:first-child:not(.button) { + padding-left: 40px; +} + .side-nav li.active>a:first-child:not(.button) { color: #2C3E50; background-color: #F8F8FB; @@ -1134,7 +1151,6 @@ a:hover .photo-container { .side-nav li>a:first-child:not(.button), .side-nav li a:not(.button) { color: #fff; - padding-left: 40px; } .side-nav li>a:first-child:not(.button) i { diff --git a/views/includes/sidebar.html b/views/includes/sidebar.html index d91f21911..571e9bf14 100644 --- a/views/includes/sidebar.html +++ b/views/includes/sidebar.html @@ -20,12 +20,16 @@ {{totalBalance || 0 |noFractionNumber}} {{$root.wallet.settings.unitName}} {{totalBalanceAlternative |noFractionNumber:2}} {{alternativeIsoCode}} -
- {{'Locked'|translate}}   +
+ + + {{'Locked'|translate}}   + - {{lockedBalance || 0|noFractionNumber}} {{$root.wallet.settings.unitName}} -   - + {{lockedBalance || 0|noFractionNumber}} {{$root.wallet.settings.unitName}} - {{lockedBalanceAlternative |noFractionNumber:2}} {{alternativeIsoCode}} + + +
From 24ea10c36cd51f3cf41e8d0b45d32fe6ae81e48b Mon Sep 17 00:00:00 2001 From: bechi Date: Thu, 30 Oct 2014 16:46:39 -0300 Subject: [PATCH 3/3] history section --- css/src/main.css | 11 +++--- css/src/mobile.css | 5 +++ js/controllers/transactions.js | 3 ++ js/models/Wallet.js | 3 +- views/includes/sidebar.html | 2 +- views/transactions.html | 61 ++++++++++++++++------------------ 6 files changed, 47 insertions(+), 38 deletions(-) diff --git a/css/src/main.css b/css/src/main.css index d9725935f..68afbaa55 100644 --- a/css/src/main.css +++ b/css/src/main.css @@ -170,7 +170,8 @@ header .alt-currency { } .head .menu ul { - border: none; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; position: absolute; right: 14px; width: 100px; @@ -182,7 +183,6 @@ header .alt-currency { background: #FFFFFF; -moz-box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.25); box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.25); - border: none; } .head .menu ul li a { @@ -808,10 +808,13 @@ input[type=number]::-webkit-outer-spin-button { background-color: #1ABC9C; } +.label { + font-weight: 700; + padding: 0.3rem 0.4rem; +} + .label.alert { background-color: #C0392A; - padding: 0.3rem 0.4rem; - font-weight: 700; } .bg-alert { diff --git a/css/src/mobile.css b/css/src/mobile.css index 68765adde..89c1513e9 100644 --- a/css/src/mobile.css +++ b/css/src/mobile.css @@ -195,5 +195,10 @@ height: auto; } + .label { + font-size: 80%; + padding: 0.15rem 0.2rem; + } + } diff --git a/js/controllers/transactions.js b/js/controllers/transactions.js index 019a93616..e15aac4f2 100644 --- a/js/controllers/transactions.js +++ b/js/controllers/transactions.js @@ -62,6 +62,9 @@ angular.module('copayApp.controllers').controller('TransactionsController', return; } + _.each(res, function (r) { + r.ts = r.minedTs || r.sentTs; + }); $scope.blockchain_txs = w.cached_txs = res; $scope.loading = false; setTimeout(function() { diff --git a/js/models/Wallet.js b/js/models/Wallet.js index 0b6fe5b1f..609698d0a 100644 --- a/js/models/Wallet.js +++ b/js/models/Wallet.js @@ -2854,7 +2854,7 @@ Wallet.prototype.getTransactionHistory = function(cb) { tx.amountSat = Math.abs(amount); tx.amount = tx.amountSat * satToUnit; tx.sentTs = proposal ? proposal.sentTs : undefined; - tx.minedTs = tx.time * 1000; + tx.minedTs = !_.isNaN(tx.time) ? tx.time * 1000 : undefined; }; if (addresses.length > 0) { @@ -2864,6 +2864,7 @@ Wallet.prototype.getTransactionHistory = function(cb) { var history = _.map(txs, function(tx) { decorateTx(tx); + console.log(tx); return tx; }); return cb(null, history); diff --git a/views/includes/sidebar.html b/views/includes/sidebar.html index 571e9bf14..cc473b2d0 100644 --- a/views/includes/sidebar.html +++ b/views/includes/sidebar.html @@ -77,7 +77,7 @@ - {{'Add Wallet' | translate }} +
    diff --git a/views/transactions.html b/views/transactions.html index 817ce39e3..bd01be246 100644 --- a/views/transactions.html +++ b/views/transactions.html @@ -30,43 +30,40 @@
    No transactions yet.
    -
    -
    -
    -
    +
    +
    +
    +   + +
    + +
    + {{btx.amount| noFractionNumber}} {{$root.wallet.settings.unitName}} + {{btx.action}} +
    + +
    +   + {{ (btx.action == 'received' ? 'on' : 'to') | translate }} {{btx.labelTo}} +
    + +
    + {{btx.comment}} +
    + +
    + Unconfirmed + {{btx.confirmations || 0}} Confirmations + Confirmed +
    + + -
    -
    - broadcasted - -
    -
    - mined - -
    -
    -
    -
    -
    - {{btx.action}} {{ (btx.action == 'received' ? 'on' : 'to') | translate }} {{btx.labelTo}} - {{btx.comment}} -
    - +