support opening profile modal in contacts section
This commit is contained in:
parent
e7e77f58dc
commit
93361921b7
|
@ -10,6 +10,7 @@ Rectangle {
|
|||
property string address: "0x04d8c07dd137bd1b73a6f51df148b4f77ddaa11209d36e43d8344c0a7d6db1cad6085f27cfb75dd3ae21d86ceffebe4cf8a35b9ce8d26baa19dc264efe6d8f221b"
|
||||
property string identicon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="
|
||||
property bool selectable: false
|
||||
property var profileClick: function() {}
|
||||
|
||||
height: 64
|
||||
anchors.right: parent.right
|
||||
|
@ -54,4 +55,12 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
ButtonGroup.group: contactGroup
|
||||
}
|
||||
MouseArea {
|
||||
enabled: !selectable
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
profileClick(name, address, identicon)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import Qt.labs.platform 1.1
|
|||
import "./samples/"
|
||||
import "../../../../../imports"
|
||||
import "../../../../../shared"
|
||||
import "../../../Chat/components"
|
||||
|
||||
ListView {
|
||||
id: contactList
|
||||
|
@ -22,6 +23,11 @@ ListView {
|
|||
address: model.address
|
||||
identicon: model.identicon
|
||||
selectable: contactList.selectable
|
||||
profileClick: profilePopup.openPopup.bind(profilePopup)
|
||||
}
|
||||
|
||||
ProfilePopup {
|
||||
id: profilePopup
|
||||
}
|
||||
|
||||
ButtonGroup {
|
||||
|
|
Loading…
Reference in New Issue