2024-06-29 20:24:05 +00:00
|
|
|
import QtQuick 2.15
|
2024-07-30 10:46:02 +00:00
|
|
|
import QtQuick.Controls 2.15
|
2024-06-29 20:24:05 +00:00
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
|
|
|
import StatusQ 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Core.Utils 0.1
|
|
|
|
|
|
|
|
import shared.popups.walletconnect 1.0
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: root
|
|
|
|
property alias name: appNameText.text
|
|
|
|
property url dAppUrl: ""
|
|
|
|
property url iconUrl: ""
|
2024-07-30 10:46:02 +00:00
|
|
|
property bool connectionSuccessful
|
|
|
|
property bool connectionAttempted
|
2024-06-29 20:24:05 +00:00
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
spacing: Theme.padding
|
2024-06-29 20:24:05 +00:00
|
|
|
|
|
|
|
RoundImageWithBadge {
|
|
|
|
objectName: "dappIcon"
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
Layout.preferredWidth: 72
|
|
|
|
Layout.preferredHeight: Layout.preferredWidth
|
|
|
|
|
|
|
|
imageUrl: iconUrl
|
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
spacing: 4
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
id: appNameText
|
|
|
|
objectName: "appNameText"
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.maximumWidth: root.width
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
elide: Text.ElideRight
|
|
|
|
font.bold: true
|
|
|
|
font.pixelSize: 17
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusFlatButton {
|
|
|
|
id: appUrlText
|
|
|
|
objectName: "appUrlControl"
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
Layout.maximumWidth: root.width
|
|
|
|
icon.name: "external-link"
|
|
|
|
icon.color: hovered ? Theme.palette.baseColor1 : Theme.palette.directColor1
|
|
|
|
textPosition: StatusBaseButton.TextPosition.Left
|
|
|
|
size: StatusBaseButton.Size.Tiny
|
|
|
|
textColor: Theme.palette.directColor1
|
|
|
|
hoverColor: "transparent"
|
|
|
|
spacing: 0
|
|
|
|
font.pixelSize: 15
|
|
|
|
font.weight: Font.Normal
|
|
|
|
horizontalPadding: 0
|
|
|
|
verticalPadding: 0
|
|
|
|
text: StringUtils.extractDomainFromLink(dAppUrl)
|
|
|
|
onClicked: {
|
|
|
|
Global.openLinkWithConfirmation(dAppUrl, text)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ConnectionStatusTag {
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
Layout.maximumWidth: root.width
|
|
|
|
objectName: "connectionStatusTag"
|
2024-07-30 10:46:02 +00:00
|
|
|
success: root.connectionSuccessful
|
|
|
|
visible: root.connectionAttempted
|
2024-06-29 20:24:05 +00:00
|
|
|
}
|
|
|
|
}
|
2024-07-30 10:46:02 +00:00
|
|
|
}
|