feat(GroupInfo): allow user to visit group member profile page

Closes #638
This commit is contained in:
Pascal Precht 2020-08-06 15:37:09 +02:00 committed by Iuri Matias
parent 156aaba0aa
commit 17396c85cb
2 changed files with 22 additions and 0 deletions

View File

@ -179,10 +179,22 @@ Rectangle {
GroupInfoPopup { GroupInfoPopup {
id: groupInfoPopup id: groupInfoPopup
profileClick: {
profilePopup.openPopup.bind(profilePopup)
}
onClosed: { onClosed: {
mouseArea.menuOpened = false mouseArea.menuOpened = false
} }
} }
ProfilePopup {
id: profilePopup
onClosed: {
if (!groupInfoPopup.opened) {
groupInfoPopup.open()
}
}
}
} }
} }
} }

View File

@ -12,6 +12,7 @@ ModalPopup {
property int memberCount: 1 property int memberCount: 1
readonly property int maxMembers: 10 readonly property int maxMembers: 10
property var pubKeys: [] property var pubKeys: []
property var profileClick: function() {}
function resetSelectedMembers(){ function resetSelectedMembers(){
pubKeys = []; pubKeys = [];
@ -276,7 +277,16 @@ ModalPopup {
elide: Text.ElideRight elide: Text.ElideRight
Layout.fillWidth: true Layout.fillWidth: true
font.pixelSize: 13 font.pixelSize: 13
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
popup.profileClick(model.userName, model.pubKey, model.identicon)
popup.close()
}
}
} }
} }
Column { Column {
StyledText { StyledText {