2023-07-20 10:38:49 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
import AppLayouts.Communities.controls 1.0
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
StatusGroupBox {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
title: qsTr("Fees")
|
2024-10-15 19:26:12 +00:00
|
|
|
icon: Theme.svg("gas")
|
2023-07-20 10:38:49 +00:00
|
|
|
|
|
|
|
// expected roles:
|
|
|
|
//
|
|
|
|
// title (string)
|
|
|
|
// feeText (string)
|
|
|
|
// error (bool), optional
|
|
|
|
property alias model: feesBox.model
|
2023-07-25 13:55:06 +00:00
|
|
|
readonly property alias count: feesBox.count
|
|
|
|
|
|
|
|
readonly property alias accountsSelector: footer.accountsSelector
|
|
|
|
property alias showAccountsSelector: footer.showAccountsSelector
|
2023-07-20 10:38:49 +00:00
|
|
|
|
|
|
|
property alias placeholderText: feesBox.placeholderText
|
|
|
|
|
|
|
|
property alias totalFeeText: footer.totalFeeText
|
|
|
|
|
|
|
|
property alias generalErrorText: footer.generalErrorText
|
|
|
|
property alias accountErrorText: footer.accountErrorText
|
|
|
|
|
2023-09-25 15:03:35 +00:00
|
|
|
property string accountSelectorText: qsTr("Select account to pay gas fees from")
|
|
|
|
|
2023-07-20 10:38:49 +00:00
|
|
|
FeesPanel {
|
|
|
|
id: feesBox
|
|
|
|
|
|
|
|
width: root.availableWidth
|
2024-10-15 19:26:12 +00:00
|
|
|
padding: Theme.padding
|
2023-07-25 09:32:04 +00:00
|
|
|
|
|
|
|
verticalPadding: 20
|
2023-07-20 10:38:49 +00:00
|
|
|
|
|
|
|
background: Rectangle {
|
2024-10-15 19:26:12 +00:00
|
|
|
radius: Theme.radius
|
2023-07-20 10:38:49 +00:00
|
|
|
color: Theme.palette.statusListItem.backgroundColor
|
|
|
|
}
|
|
|
|
|
|
|
|
footer: FeesBoxFooter {
|
|
|
|
id: footer
|
|
|
|
|
2023-07-25 13:55:06 +00:00
|
|
|
visible: feesBox.count && (root.showAccountsSelector || showTotal
|
|
|
|
|| root.generalErrorText)
|
2023-07-20 10:38:49 +00:00
|
|
|
|
|
|
|
showTotal: feesBox.count > 1
|
2023-09-25 15:03:35 +00:00
|
|
|
accountSelectorText: root.accountSelectorText
|
2023-07-20 10:38:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|