mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-23 20:18:47 +00:00
closes #16912 Sending the dapps events to mixpanel | Event Name | Properties | Possible Values | Notes | | --- | --- | --- | --- | | dapps-health | state | - wc_available - wc_unavailable - chains_down - network_down - pair_error - connection_error - sign_error | | | | error | | string description | | dapps-navigation | flow | - dapps_list_opened - connect_initiated - disconnect_initiated - pair_initiated | | | | connector | - wallet_connect - browser_connect | | | dapps-connection | flow | - proposal_received - proposal_accepted - proposal_rejected - connected - disconnected | | | | networks | networks[string] - array of networks | Array of proposed or connected networks | | | methods | methods[string] - array of methods | Array of proposed methods | | | dapp | dapp uri | | | | connector | - wallet_connect - browser_connect | | | | isSiwe | boolean | | | dapps-sign | flow | - sign_received - sign_accepted - sign_rejected | | | | connector | - wallet_connect - browser_connect | | | | method | - personal_sign - eth_sign - eth_signTypedData_v4 - eth_signTypedData - eth_signTransaction - eth_sendTransaction | | | | dapp | string - dapp uri | | | | chainId | int - chain id | |
96 lines
2.1 KiB
QML
96 lines
2.1 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import utils 1.0
|
|
import shared.controls 1.0
|
|
import shared.popups.walletconnect 1.0
|
|
import shared.popups.walletconnect.controls 1.0
|
|
|
|
import StatusQ.Core 0.1
|
|
import StatusQ.Core.Theme 0.1
|
|
import StatusQ.Controls 0.1
|
|
import StatusQ.Components 0.1
|
|
import StatusQ.Components.private 0.1 as SQP
|
|
|
|
ComboBox {
|
|
id: root
|
|
|
|
signal dappListRequested()
|
|
signal connectDapp()
|
|
signal disconnectDapp(string dappUrl)
|
|
|
|
implicitHeight: 38
|
|
implicitWidth: 38
|
|
|
|
background: SQP.StatusComboboxBackground {
|
|
objectName: "dappsBackground"
|
|
active: root.down || root.hovered
|
|
Binding on color {
|
|
when: !root.enabled
|
|
value: Theme.palette.baseColor2
|
|
}
|
|
}
|
|
|
|
indicator: null
|
|
|
|
contentItem: Item {
|
|
objectName: "dappsContentItem"
|
|
StatusBadge {
|
|
objectName: "dappBadge"
|
|
anchors.top: parent.top
|
|
anchors.right: parent.right
|
|
anchors.margins: 5
|
|
width: 6
|
|
height: 6
|
|
visible: root.delegateModel.count > 0
|
|
}
|
|
|
|
StatusIcon {
|
|
objectName: "dappIcon"
|
|
anchors.centerIn: parent
|
|
width: 16
|
|
height: 16
|
|
icon: "dapp"
|
|
color: Theme.palette.baseColor1
|
|
}
|
|
}
|
|
|
|
delegate: DAppDelegate {
|
|
width: ListView.view.width
|
|
|
|
onDisconnectDapp: (dappUrl) => {
|
|
root.disconnectDapp(dappUrl)
|
|
}
|
|
}
|
|
|
|
popup: DAppsListPopup {
|
|
objectName: "dappsListPopup"
|
|
|
|
x: root.width - width
|
|
y: root.height + 4
|
|
|
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
|
|
|
delegateModel: root.delegateModel
|
|
|
|
onConnectDapp: {
|
|
root.connectDapp()
|
|
this.close()
|
|
}
|
|
|
|
onOpened: {
|
|
root.dappListRequested()
|
|
}
|
|
}
|
|
|
|
StatusToolTip {
|
|
id: tooltip
|
|
objectName: "dappTooltip"
|
|
visible: root.hovered && !root.down
|
|
text: qsTr("dApp connections")
|
|
orientation: StatusToolTip.Orientation.Bottom
|
|
y: root.height + 14
|
|
}
|
|
}
|