2024-05-06 19:55:11 +02:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtGraphicalEffects 1.15
|
|
|
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
|
|
|
import shared.controls 1.0
|
|
|
|
|
|
|
|
Popup {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
objectName: "dappsPopup"
|
|
|
|
|
|
|
|
property int menuWidth: 312
|
|
|
|
|
2024-05-06 22:22:43 +02:00
|
|
|
signal pairWCDapp()
|
2024-05-06 19:55:11 +02:00
|
|
|
|
|
|
|
contentWidth: root.menuWidth
|
|
|
|
contentHeight: list.height
|
|
|
|
modal: false
|
|
|
|
padding: 8
|
|
|
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnOutsideClick | Popup.CloseOnPressOutside
|
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
id: bckgContent
|
|
|
|
|
|
|
|
color: Theme.palette.statusMenu.backgroundColor
|
|
|
|
radius: 8
|
|
|
|
layer.enabled: true
|
|
|
|
layer.effect: DropShadow {
|
|
|
|
anchors.fill: parent
|
|
|
|
source: bckgContent
|
|
|
|
horizontalOffset: 0
|
|
|
|
verticalOffset: 4
|
|
|
|
radius: 12
|
|
|
|
samples: 25
|
|
|
|
spread: 0.2
|
|
|
|
color: Theme.palette.dropShadow
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: list
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
width: parent.width
|
|
|
|
spacing: 8
|
|
|
|
|
|
|
|
ShapeRectangle {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.preferredHeight: implicitHeight
|
|
|
|
text: qsTr("Connected dApps will appear here")
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.preferredHeight: implicitHeight
|
|
|
|
|
|
|
|
text: qsTr("Connect a dApp via WalletConnect")
|
|
|
|
onClicked: {
|
2024-05-06 22:22:43 +02:00
|
|
|
root.pairWCDapp()
|
2024-05-06 19:55:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|