2020-08-25 14:44:29 -04:00
|
|
|
import QtQuick 2.3
|
2021-10-28 00:27:49 +03:00
|
|
|
|
|
|
|
import shared 1.0
|
|
|
|
import shared.popups 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
import shared.controls 1.0
|
2021-10-01 18:58:36 +03:00
|
|
|
|
2021-09-28 18:04:06 +03:00
|
|
|
import utils 1.0
|
2020-08-25 14:44:29 -04:00
|
|
|
|
2021-10-22 23:49:47 +03:00
|
|
|
//TODO remove dynamic scoping
|
2020-08-25 14:44:29 -04:00
|
|
|
Item {
|
2021-10-22 23:49:47 +03:00
|
|
|
id: root
|
2020-08-25 14:44:29 -04:00
|
|
|
width: parent.width
|
|
|
|
height: childrenRect.height
|
2021-10-22 23:49:47 +03:00
|
|
|
|
2023-06-29 14:35:18 -03:00
|
|
|
property var store // Expected ui/app/AppLayouts/Chat/stores/RootStore.qml
|
2022-01-04 13:06:05 +01:00
|
|
|
property var contactsStore
|
|
|
|
|
2021-12-08 23:20:43 +02:00
|
|
|
property var token
|
|
|
|
property string tokenAmount
|
|
|
|
property string fiatValue
|
2022-02-09 01:04:49 +01:00
|
|
|
property var selectedRecipient
|
2021-10-22 23:49:47 +03:00
|
|
|
property int state: Constants.addressRequested
|
2020-08-25 14:44:29 -04:00
|
|
|
|
|
|
|
Separator {
|
|
|
|
id: separator1
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: acceptText
|
|
|
|
color: Style.current.blue
|
2022-02-09 10:43:23 +01:00
|
|
|
text: root.state === Constants.addressRequested ?
|
2022-04-04 13:26:30 +02:00
|
|
|
qsTr("Accept and share address") :
|
|
|
|
qsTr("Accept and send")
|
2020-09-03 16:43:08 -04:00
|
|
|
padding: Style.current.halfPadding
|
2020-08-25 14:44:29 -04:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.weight: Font.Medium
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.top: separator1.bottom
|
|
|
|
font.pixelSize: 15
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: {
|
2023-09-05 17:27:30 +02:00
|
|
|
// ToDo launch send modal from here
|
2020-08-25 14:44:29 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Separator {
|
|
|
|
id: separator2
|
|
|
|
anchors.topMargin: 0
|
|
|
|
anchors.top: acceptText.bottom
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: declineText
|
|
|
|
color: Style.current.blue
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("Decline")
|
2020-08-25 14:44:29 -04:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.weight: Font.Medium
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.left: parent.left
|
2020-09-03 16:43:08 -04:00
|
|
|
padding: Style.current.halfPadding
|
2020-08-25 14:44:29 -04:00
|
|
|
anchors.top: separator2.bottom
|
|
|
|
font.pixelSize: 15
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: {
|
2022-02-09 01:04:49 +01:00
|
|
|
if (root.state === Constants.addressRequested) {
|
|
|
|
root.store.declineAddressRequest(messageId)
|
|
|
|
} else if (root.state === Constants.transactionRequested) {
|
|
|
|
root.store.declineRequest(messageId)
|
|
|
|
}
|
2020-08-25 14:44:29 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-10-19 11:57:38 +11:00
|
|
|
|
2021-01-18 14:44:33 +02:00
|
|
|
ConfirmationDialog {
|
|
|
|
id: gasEstimateErrorPopup
|
|
|
|
height: 220
|
|
|
|
onConfirmButtonClicked: {
|
|
|
|
gasEstimateErrorPopup.close();
|
|
|
|
}
|
|
|
|
}
|
2020-08-25 14:44:29 -04:00
|
|
|
}
|