2023-06-06 15:32:53 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQml.Models 2.15
|
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
2023-06-06 15:32:53 +00:00
|
|
|
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 {
|
2024-10-15 19:26:12 +00:00
|
|
|
spacing: Theme.padding
|
2023-06-06 15:32:53 +00:00
|
|
|
rightButtons: ObjectModel {
|
|
|
|
StatusButton {
|
2024-04-19 13:07:01 +00:00
|
|
|
objectName: "cancelButton"
|
2023-06-06 15:32:53 +00:00
|
|
|
text: qsTr("Cancel")
|
|
|
|
type: StatusBaseButton.Type.Danger
|
|
|
|
onClicked: {
|
|
|
|
root.cancelClicked()
|
|
|
|
root.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StatusButton {
|
2024-04-19 13:07:01 +00:00
|
|
|
objectName: "signTransactionButton"
|
2023-06-06 15:32:53 +00:00
|
|
|
enabled: root.errorText === "" && !root.isFeeLoading
|
|
|
|
icon.name: "password"
|
|
|
|
text: qsTr("Sign transaction")
|
|
|
|
onClicked: {
|
|
|
|
root.signTransactionClicked()
|
|
|
|
root.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|