2022-03-23 12:08:49 +01:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
2022-03-18 15:47:51 +01:00
|
|
|
import StatusQ.Core.Theme 0.1
|
2022-03-23 12:08:49 +01:00
|
|
|
|
|
|
|
import utils 1.0
|
2023-04-04 13:31:04 +02:00
|
|
|
import shared.controls 1.0
|
2022-03-23 12:08:49 +01:00
|
|
|
|
2023-03-15 10:17:25 +01:00
|
|
|
import "../controls"
|
2023-04-26 17:53:49 +02:00
|
|
|
import "../popups"
|
2022-03-23 12:08:49 +01:00
|
|
|
|
|
|
|
Rectangle {
|
2023-04-26 17:53:49 +02:00
|
|
|
id: root
|
2022-03-23 12:08:49 +01:00
|
|
|
|
2022-07-20 14:15:05 +03:00
|
|
|
property var walletStore
|
2023-03-15 10:17:25 +01:00
|
|
|
property var networkConnectionStore
|
2022-03-23 12:08:49 +01:00
|
|
|
|
2023-09-20 15:01:37 +02:00
|
|
|
// Community-token related properties:
|
|
|
|
required property bool isCommunityOwnershipTransfer
|
|
|
|
property string communityName: ""
|
|
|
|
|
2023-04-26 17:53:49 +02:00
|
|
|
signal launchShareAddressModal()
|
2023-08-31 12:27:15 +02:00
|
|
|
signal launchSendModal()
|
|
|
|
signal launchBridgeModal()
|
2023-04-26 17:53:49 +02:00
|
|
|
|
2022-03-23 12:08:49 +01:00
|
|
|
color: Theme.palette.statusAppLayout.rightPanelBackgroundColor
|
|
|
|
|
|
|
|
StatusModalDivider {
|
|
|
|
anchors.top: parent.top
|
|
|
|
width: parent.width
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
anchors.centerIn: parent
|
2022-03-28 10:19:57 +02:00
|
|
|
height: parent.height
|
2022-03-23 12:08:49 +01:00
|
|
|
spacing: Style.current.padding
|
|
|
|
|
2023-04-04 13:31:04 +02:00
|
|
|
DisabledTooltipButton {
|
|
|
|
buttonType: DisabledTooltipButton.Flat
|
|
|
|
aliasedObjectName: "walletFooterSendButton"
|
|
|
|
icon: "send"
|
2023-09-20 15:01:37 +02:00
|
|
|
text: root.isCommunityOwnershipTransfer ? qsTr("Send Owner token to transfer %1 Community ownership").arg(root.communityName) : qsTr("Send")
|
2023-04-04 13:31:04 +02:00
|
|
|
interactive: networkConnectionStore.sendBuyBridgeEnabled
|
2023-08-31 12:27:15 +02:00
|
|
|
onClicked: root.launchSendModal()
|
2023-03-15 10:17:25 +01:00
|
|
|
tooltipText: networkConnectionStore.sendBuyBridgeToolTipText
|
2023-10-30 10:50:27 +01:00
|
|
|
visible: !walletStore.overview.isWatchOnlyAccount && walletStore.overview.canSend
|
2022-03-23 12:08:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusFlatButton {
|
|
|
|
icon.name: "receive"
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("Receive")
|
2022-03-23 12:08:49 +01:00
|
|
|
onClicked: function () {
|
2023-04-26 17:53:49 +02:00
|
|
|
launchShareAddressModal()
|
2022-03-23 12:08:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-04 13:31:04 +02:00
|
|
|
DisabledTooltipButton {
|
|
|
|
icon: "bridge"
|
|
|
|
buttonType: DisabledTooltipButton.Flat
|
|
|
|
text: qsTr("Bridge")
|
|
|
|
interactive: networkConnectionStore.sendBuyBridgeEnabled
|
2023-08-31 12:27:15 +02:00
|
|
|
onClicked: root.launchBridgeModal()
|
2023-03-15 10:17:25 +01:00
|
|
|
tooltipText: networkConnectionStore.sendBuyBridgeToolTipText
|
2023-10-30 10:50:27 +01:00
|
|
|
visible: !walletStore.overview.isWatchOnlyAccount && !root.isCommunityOwnershipTransfer && walletStore.overview.canSend
|
2022-11-23 18:58:22 +01:00
|
|
|
}
|
2022-12-13 14:42:52 +01:00
|
|
|
|
|
|
|
StatusFlatButton {
|
|
|
|
id: buySellBtn
|
2023-09-20 15:01:37 +02:00
|
|
|
|
|
|
|
visible: !root.isCommunityOwnershipTransfer
|
2022-12-13 14:42:52 +01:00
|
|
|
icon.name: "token"
|
|
|
|
text: qsTr("Buy")
|
|
|
|
onClicked: function () {
|
|
|
|
Global.openPopup(buySellModal);
|
|
|
|
}
|
|
|
|
}
|
2022-03-23 12:08:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: buySellModal
|
|
|
|
CryptoServicesModal {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|