From 38401262cf91e1bcb11807e08d99977e5bdd3520 Mon Sep 17 00:00:00 2001 From: selsta Date: Thu, 10 Jan 2019 09:45:41 +0100 Subject: [PATCH 1/4] merchant: hide color stripe --- MiddlePanel.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/MiddlePanel.qml b/MiddlePanel.qml index 69d14d0f..ea2744de 100644 --- a/MiddlePanel.qml +++ b/MiddlePanel.qml @@ -169,6 +169,7 @@ Rectangle { // color stripe at the top Row { id: styledRow + visible: currentView !== merchantView height: 4 anchors.top: parent.top anchors.left: parent.left From 2d1882108f4f50651db3550d1fb6ded48ba520f2 Mon Sep 17 00:00:00 2001 From: selsta Date: Thu, 10 Jan 2019 09:58:36 +0100 Subject: [PATCH 2/4] merchant: round in ago() function --- js/Utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/Utils.js b/js/Utils.js index 8ba7fa85..8bf7660c 100644 --- a/js/Utils.js +++ b/js/Utils.js @@ -57,7 +57,11 @@ function ago(epoch) { var delta = now - epoch; if(delta < 60) { - return delta + " " + qsTr("seconds ago") + if (delta <= 1) { + return 1 + " " + qsTr("second ago") + } else { + return Math.floor(delta) + " " + qsTr("seconds ago") + } } else if (delta >= 60 && delta <= 3600) { if(delta >= 60 && delta < 120){ return 1 + " " + qsTr("minute ago") From aa826153742ba414edccab1e90e8b46061a34fd2 Mon Sep 17 00:00:00 2001 From: selsta Date: Thu, 10 Jan 2019 11:08:57 +0100 Subject: [PATCH 3/4] merchant: fix payment tracker sorting If the History page wasn't opened once before opening the Merchant page, sorting was messed up. --- src/libwalletqt/Wallet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 4aa442fa..85761e0b 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -507,6 +507,8 @@ TransactionHistorySortFilterModel *Wallet::historyModel() const m_historyModel->setTransactionHistory(this->history()); m_historySortFilterModel = new TransactionHistorySortFilterModel(w); m_historySortFilterModel->setSourceModel(m_historyModel); + m_historySortFilterModel->setSortRole(TransactionHistoryModel::TransactionBlockHeightRole); + m_historySortFilterModel->sort(0, Qt::DescendingOrder); } return m_historySortFilterModel; From 84c509c00d3d7ce7e5917fe7a37026b6349ddca7 Mon Sep 17 00:00:00 2001 From: selsta Date: Thu, 10 Jan 2019 10:39:22 +0100 Subject: [PATCH 4/4] merchant: fix timezone offset --- pages/merchant/Merchant.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/merchant/Merchant.qml b/pages/merchant/Merchant.qml index 5f816782..4dcd0d28 100644 --- a/pages/merchant/Merchant.qml +++ b/pages/merchant/Merchant.qml @@ -603,7 +603,7 @@ Item { var isout = model.data(idx, TransactionHistoryModel.TransactionIsOutRole); var timeDate = model.data(idx, TransactionHistoryModel.TransactionDateRole); var timeHour = model.data(idx, TransactionHistoryModel.TransactionTimeRole); - var timeEpoch = new Date(timeDate + "T" + timeHour + "Z") .getTime() / 1000; + var timeEpoch = new Date(timeDate + "T" + timeHour) .getTime() / 1000; var subaddrAccount = model.data(idx, TransactionHistoryModel.TransactionSubaddrAccountRole); var subaddrIndex = model.data(idx, TransactionHistoryModel.TransactionSubaddrIndexRole);