Skip to content
Snippets Groups Projects
Commit 38188f87 authored by andrey.daragan's avatar andrey.daragan
Browse files

Merge branch 'features-2605' into 'master'

Features 2605

See merge request cellframe/cellframe-dashboard!48
parents c7dead42 a88e12c9
No related branches found
No related tags found
1 merge request!11Cellframe clone
......@@ -99,6 +99,8 @@ QVariant DapScreenHistoryModel::data(const QModelIndex &index, int role) const
QDateTime currentTime = QDateTime::currentDateTime();
QDateTime itemDate = m_elementList.at(index.row()).Date;
if(currentTime.date() == itemDate.date()) return QString("Today");
else if(currentTime.daysTo(itemDate) == -1) return QString("Yesterday");
else if(currentTime.date().year() < itemDate.date().year()) return itemDate.toString(MASK_FOR_MODEL_WITH_YEAR);
return itemDate.toString(MASK_FOR_MODEL);
}
case DisplayNameTokenRole: return m_elementList.at(index.row()).TokenName;
......
......@@ -10,7 +10,8 @@
#include "DapHistoryType.h"
#include "DapChainConvertor.h"
#define MASK_FOR_MODEL QString("MMMM, dd")
#define MASK_FOR_MODEL QString("MMMM, d")
#define MASK_FOR_MODEL_WITH_YEAR QString("MMMM, d, yyyy")
class DapScreenHistoryModel : public QAbstractListModel
{
......
......@@ -48,3 +48,6 @@ DapUiQmlWidgetLastActionsForm {
}
}
}
......@@ -10,55 +10,52 @@ Component {
height: 50 * pt
color: "transparent"
Rectangle {
id: dapData
width: childrenRect.width
height: childrenRect.height
Layout.alignment: Qt.AlignVCenter
anchors.left: dapContentDelegate.left
RowLayout {
anchors.fill: parent
anchors.rightMargin: 20 * pt
anchors.leftMargin: 16 * pt
anchors.top: parent.top
anchors.topMargin: 13
Column {
anchors.fill: parent
ColumnLayout {
Layout.fillHeight: true
Layout.fillWidth: true
spacing: 2
Text {
Layout.fillWidth: true
text: tokenName
color: "#5F5F63"
font.family: "Roboto Regular"
color: "#3E3853"
font.family: fontRobotoRegular.name
font.pixelSize: 14 * pt
elide: Text.ElideRight
}
Text {
Layout.fillWidth: true
text: txStatus
color: "#A7A7A7"
font.family: "Roboto"
color: "#757184"
font.family: fontRobotoRegular.name
font.pixelSize: 12 * pt
}
}
Text {
Layout.fillHeight: true
Layout.fillWidth: true
horizontalAlignment: Qt.AlignRight
verticalAlignment: Qt.AlignVCenter
color: "#3E3853"
text: cryptocurrency;
font.family: fontRobotoRegular.name
font.pixelSize: 12 * pt
}
}
Text {
anchors.left: dapData.right
anchors.top: parent.top
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.rightMargin: 20 * pt
horizontalAlignment: Qt.AlignRight
verticalAlignment: Qt.AlignVCenter
color: "#505559"
text: cryptocurrency;
font.family: "Roboto"
font.pixelSize: 14 * pt
}
Rectangle {
width: parent.width
height: 1 * pt
color: "#C7C9CC"
height: 1
color: "#E3E2E6"
anchors.bottom: parent.bottom
}
}
......
import QtQuick 2.9
import QtQml 2.12
import QtQml 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.12
......
......@@ -11,10 +11,7 @@ Rectangle {
color: "transparent"
Row {
anchors.top: parent.top
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.right: statusBarAddWalletButton.left
anchors.fill: parent
anchors.leftMargin: 30 * pt
anchors.topMargin: 10 * pt
anchors.bottomMargin: 10 * pt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment