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:
commit
2b3be5ef9a
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user