1
mirror of https://github.com/monero-project/monero-gui synced 2024-11-25 10:47:19 +01:00

Merge pull request #1894

3840126 merchant: hide color stripe (selsta)
2d18821 merchant: round in ago() function (selsta)
aa82615 merchant: fix payment tracker sorting (selsta)
84c509c merchant: fix timezone offset (selsta)
This commit is contained in:
luigi1111 2019-01-21 14:56:27 -06:00
commit 2b3be5ef9a
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
4 changed files with 9 additions and 2 deletions

View File

@ -166,6 +166,7 @@ Rectangle {
// color stripe at the top
Row {
id: styledRow
visible: currentView !== merchantView
height: 4
anchors.top: parent.top
anchors.left: parent.left

View File

@ -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")

View File

@ -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);

View File

@ -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;