2023-06-06 15:32:53 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQml.Models 2.15
|
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Popups.Dialog 0.1
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
2023-07-20 10:38:49 +00:00
|
|
|
import AppLayouts.Communities.controls 1.0
|
2023-06-23 06:17:04 +00:00
|
|
|
import AppLayouts.Communities.panels 1.0
|
2023-06-14 15:25:48 +00:00
|
|
|
|
2023-06-06 15:32:53 +00:00
|
|
|
StatusDialog {
|
|
|
|
id: root
|
|
|
|
|
2023-07-20 10:38:49 +00:00
|
|
|
// expected roles:
|
|
|
|
//
|
|
|
|
// title (string)
|
|
|
|
// feeText (string)
|
|
|
|
// error (bool), optional
|
2023-06-14 15:25:48 +00:00
|
|
|
property alias model: feesPanel.model
|
2023-06-06 15:32:53 +00:00
|
|
|
|
2023-07-20 10:38:49 +00:00
|
|
|
property alias errorText: footer.errorText
|
|
|
|
property alias totalFeeText: footer.totalFeeText
|
|
|
|
property alias accountName: footer.accountName
|
2023-06-06 15:32:53 +00:00
|
|
|
|
|
|
|
signal signTransactionClicked()
|
|
|
|
signal cancelClicked()
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
|
|
|
|
property int minTextWidth: 50
|
|
|
|
}
|
|
|
|
|
|
|
|
implicitWidth: 600 // by design
|
|
|
|
|
2023-06-14 15:25:48 +00:00
|
|
|
contentItem: FeesPanel {
|
|
|
|
id: feesPanel
|
2023-07-20 10:38:49 +00:00
|
|
|
|
2023-07-26 22:39:13 +00:00
|
|
|
highlightFees: false
|
|
|
|
|
2023-07-20 10:38:49 +00:00
|
|
|
footer: FeesSummaryFooter {
|
|
|
|
id: footer
|
|
|
|
}
|
2023-06-06 15:32:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
footer: StatusDialogFooter {
|
|
|
|
spacing: Style.current.padding
|
|
|
|
rightButtons: ObjectModel {
|
|
|
|
StatusButton {
|
|
|
|
text: qsTr("Cancel")
|
|
|
|
type: StatusBaseButton.Type.Danger
|
|
|
|
onClicked: {
|
|
|
|
root.cancelClicked()
|
|
|
|
root.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StatusButton {
|
|
|
|
enabled: root.errorText === "" && !root.isFeeLoading
|
|
|
|
icon.name: "password"
|
|
|
|
text: qsTr("Sign transaction")
|
|
|
|
onClicked: {
|
|
|
|
root.signTransactionClicked()
|
|
|
|
root.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|