You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
135 lines
4.4 KiB
135 lines
4.4 KiB
import QtQuick 2.7
|
|
import QtQuick.Controls 2.0
|
|
import QtQuick.Layouts 1.2
|
|
|
|
import "common"
|
|
|
|
Item {
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
anchors.fill: parent
|
|
property var txModelData: []
|
|
property int sideMargin: 20
|
|
ListModel { id: txListViewModel }
|
|
spacing: 0
|
|
|
|
ListView {
|
|
visible: true
|
|
id: txListview
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
spacing: 10
|
|
model: txListViewModel
|
|
interactive: false
|
|
|
|
delegate: Rectangle {
|
|
id: delegate
|
|
anchors.left: parent ? parent.left : undefined
|
|
anchors.right: parent ? parent.right : undefined
|
|
height: 54
|
|
color: "#2c435d"
|
|
|
|
RowLayout {
|
|
spacing: 0
|
|
clip: true
|
|
height: parent.height
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
|
|
Rectangle {
|
|
Layout.preferredWidth: 56
|
|
Layout.fillHeight: true
|
|
color: "#406288"
|
|
|
|
Image {
|
|
width: 32
|
|
height: 32
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
source: confirmed ? "qrc:/checkmark_icon" : "qrc:/expired_icon"
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
Layout.preferredWidth: 300
|
|
Layout.leftMargin: 10
|
|
Layout.rightMargin: 10
|
|
Layout.fillHeight: true
|
|
color: "transparent"
|
|
|
|
MyText {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
fontSize: 12
|
|
text: date
|
|
|
|
Component.onCompleted: {
|
|
parent.Layout.preferredWidth = width;
|
|
}
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
Layout.fillHeight: true
|
|
Layout.leftMargin: 10
|
|
color: "transparent"
|
|
|
|
MyText {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
fontSize: 14
|
|
property bool txNote: description !== undefined
|
|
text: txNote ? description : "..."
|
|
fontColor: txNote ? "white" : "#e5e5e5"
|
|
|
|
Component.onCompleted: {
|
|
parent.Layout.preferredWidth = width;
|
|
}
|
|
}
|
|
}
|
|
|
|
Item {
|
|
Layout.fillWidth: true
|
|
}
|
|
|
|
Rectangle {
|
|
Layout.preferredWidth: 420
|
|
Layout.fillHeight: true
|
|
color: "#406288"
|
|
|
|
MyText {
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: 10
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
fontSize: 14
|
|
fontBold: true
|
|
text: {
|
|
let symbol = isout ? "+" : "-"
|
|
return symbol + amount +" WOW";
|
|
}
|
|
fontColor: isout ? "#00d304" : "red"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Item {
|
|
Layout.fillHeight: true
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
txListViewModel.append({"isout": true, "amount": 32.232, "description": "Some random tx message","name": "lol 123", "isout": false, "confirmed": true, "date": "2021-03-04 21:23"});
|
|
txListViewModel.append({"isout": false, "amount": 32.242622, "name": "lol 456", "isout": true, "confirmed": false, "date": "2021-03-04 14:10"});
|
|
txListViewModel.append({"isout": true, "amount": 232.2332, "description": "Payment to laura", "name": "lol 123", "isout": false, "confirmed": true, "date": "2021-02-28 15:36"});
|
|
txListViewModel.append({"isout": false, "amount": 532.111, "name": "lol 456", "isout": true, "confirmed": false, "date": "2021-01-02 08:28"});
|
|
txListViewModel.append({"isout": false, "amount": 16, "name": "lol 456", "isout": true, "confirmed": false, "date": "2020-01-03 11:10"});
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
z: parent.z - 1
|
|
color: "transparent"
|
|
anchors.fill: parent
|
|
}
|
|
} |