2023-05-19 09:51:47 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtQuick.Shapes 1.15
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2024-05-22 08:13:39 +00:00
|
|
|
import AppLayouts.Profile.stores 1.0 as ProfileStores
|
|
|
|
import AppLayouts.Wallet.stores 1.0 as WalletStores
|
|
|
|
|
2023-05-19 09:51:47 +00:00
|
|
|
/*!
|
|
|
|
\qmltype TransactionAddressTile
|
2023-05-31 09:25:16 +00:00
|
|
|
\inherits TransactionDataTile
|
2023-05-19 09:51:47 +00:00
|
|
|
\inqmlmodule shared.controls
|
|
|
|
\since shared.controls 1.0
|
|
|
|
\brief It displays list of addresses for wallet activity.
|
|
|
|
|
|
|
|
The \c TransactionAddressTile can display list of addresses formatted in specific way.
|
|
|
|
|
|
|
|
\qml
|
|
|
|
TransactionAddressTile {
|
|
|
|
title: qsTr("From")
|
|
|
|
width: parent.width
|
|
|
|
rootStore: WalletStores.RootStore
|
|
|
|
addresses: [
|
2024-05-16 16:37:54 +00:00
|
|
|
"eth:arb1:oeth:0x4de3f6278C0DdFd3F29df9DcD979038F5c7bbc35",
|
2023-05-19 09:51:47 +00:00
|
|
|
"0x4de3f6278C0DdFd3F29df9DcD979038F5c7bbc35",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
\endqml
|
|
|
|
*/
|
|
|
|
|
2023-05-31 09:25:16 +00:00
|
|
|
TransactionDataTile {
|
2023-05-19 09:51:47 +00:00
|
|
|
id: root
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\qmlproperty var TransactionAddressTile::addresses
|
|
|
|
This property holds list or model of addresses to display in the tile.
|
|
|
|
*/
|
|
|
|
property var addresses: []
|
|
|
|
/*!
|
|
|
|
\qmlproperty var TransactionAddressTile::rootStore
|
|
|
|
This property holds rootStore object used to retrive data for each address.
|
|
|
|
*/
|
2024-05-22 08:13:39 +00:00
|
|
|
property WalletStores.RootStore rootStore
|
2023-05-19 09:51:47 +00:00
|
|
|
|
|
|
|
/* /internal Property hold reference to contacts store to refresh contact data on any change. */
|
2024-05-22 08:13:39 +00:00
|
|
|
property ProfileStores.ContactsStore contactsStore
|
2023-05-19 09:51:47 +00:00
|
|
|
|
2023-05-31 09:25:16 +00:00
|
|
|
implicitHeight: transactionColumn.height + transactionColumn.spacing + root.topPadding + root.bottomPadding
|
|
|
|
buttonIconName: "more"
|
2023-05-19 09:51:47 +00:00
|
|
|
|
|
|
|
Column {
|
|
|
|
id: transactionColumn
|
|
|
|
anchors {
|
|
|
|
left: parent.left
|
|
|
|
leftMargin: root.leftPadding
|
|
|
|
right: parent.right
|
2023-05-31 09:25:16 +00:00
|
|
|
rightMargin: root.statusListItemComponentsSlot.width + root.rightPadding * 2
|
2023-05-19 09:51:47 +00:00
|
|
|
bottom: parent.bottom
|
|
|
|
bottomMargin: root.bottomPadding
|
|
|
|
}
|
|
|
|
height: childrenRect.height
|
|
|
|
spacing: 4
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: root.addresses
|
|
|
|
delegate: TransactionAddress {
|
|
|
|
width: parent.width
|
|
|
|
address: modelData
|
2023-05-22 10:16:39 +00:00
|
|
|
rootStore: root.rootStore
|
2023-05-19 09:51:47 +00:00
|
|
|
contactsStore: root.contactsStore
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|