mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Open room members dialog when clicking the encryption indicator
fixes #937
This commit is contained in:
parent
d0623131e5
commit
7238ca3765
1 changed files with 19 additions and 8 deletions
|
@ -134,22 +134,30 @@ Pane {
|
||||||
text: roomTopic
|
text: roomTopic
|
||||||
}
|
}
|
||||||
|
|
||||||
EncryptionIndicator {
|
AbstractButton {
|
||||||
Layout.column: 3
|
Layout.column: 3
|
||||||
Layout.row: 0
|
Layout.row: 0
|
||||||
Layout.rowSpan: 2
|
Layout.rowSpan: 2
|
||||||
Layout.preferredHeight: Nheko.avatarSize - Nheko.paddingMedium
|
Layout.preferredHeight: Nheko.avatarSize - Nheko.paddingMedium
|
||||||
Layout.preferredWidth: Nheko.avatarSize - Nheko.paddingMedium
|
Layout.preferredWidth: Nheko.avatarSize - Nheko.paddingMedium
|
||||||
sourceSize.height: Layout.preferredHeight * Screen.devicePixelRatio
|
|
||||||
sourceSize.width: Layout.preferredWidth * Screen.devicePixelRatio
|
contentItem: EncryptionIndicator {
|
||||||
visible: isEncrypted
|
sourceSize.height: parent.Layout.preferredHeight * Screen.devicePixelRatio
|
||||||
encrypted: isEncrypted
|
sourceSize.width: parent.Layout.preferredWidth * Screen.devicePixelRatio
|
||||||
trust: trustlevel
|
visible: isEncrypted
|
||||||
|
encrypted: isEncrypted
|
||||||
|
trust: trustlevel
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
|
|
||||||
|
background: null
|
||||||
|
|
||||||
|
ToolTip.delay: Nheko.tooltipDelay
|
||||||
ToolTip.text: {
|
ToolTip.text: {
|
||||||
if (!encrypted)
|
if (!isEncrypted)
|
||||||
return qsTr("This room is not encrypted!");
|
return qsTr("This room is not encrypted!");
|
||||||
|
|
||||||
switch (trust) {
|
switch (trustlevel) {
|
||||||
case Crypto.Verified:
|
case Crypto.Verified:
|
||||||
return qsTr("This room contains only verified devices.");
|
return qsTr("This room contains only verified devices.");
|
||||||
case Crypto.TOFU:
|
case Crypto.TOFU:
|
||||||
|
@ -158,6 +166,9 @@ Pane {
|
||||||
return qsTr("This room contains unverified devices!");
|
return qsTr("This room contains unverified devices!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
|
||||||
|
onClicked: TimelineManager.openRoomMembers(room)
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageButton {
|
ImageButton {
|
||||||
|
|
Loading…
Reference in a new issue