summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-08-13 23:13:09 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-08-13 23:19:54 +0200
commit18ea01e198d112de00ac70e1e1c357424706d10a (patch)
tree356bcdbebb2acbf639392c98589a03b979fec9f5 /resources
parentFix lambda to function pointer in coeurl on Linux (diff)
downloadnheko-18ea01e198d112de00ac70e1e1c357424706d10a.tar.xz
Show if there are unverified devices in a room
Also fixes some issues where nested transactions will poison the
verification cache.
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/RoomList.qml1
-rw-r--r--resources/qml/TimelineView.qml1
-rw-r--r--resources/qml/TopBar.qml26
3 files changed, 27 insertions, 1 deletions
diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml

index 576383e2..8fbfce91 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml
@@ -35,6 +35,7 @@ Page { function onCurrentRoomChanged() { if (Rooms.currentRoom) roomlist.positionViewAtIndex(Rooms.roomidToIndex(Rooms.currentRoom.roomId), ListView.Contain); + } target: Rooms diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 5e99ee5c..104da160 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml
@@ -88,6 +88,7 @@ Item { Loader { active: room || roomPreview Layout.fillWidth: true + sourceComponent: MessageView { implicitHeight: msgView.height - typingIndicator.height } diff --git a/resources/qml/TopBar.qml b/resources/qml/TopBar.qml
index 8543d02a..0faaea9c 100644 --- a/resources/qml/TopBar.qml +++ b/resources/qml/TopBar.qml
@@ -15,6 +15,8 @@ Rectangle { property string roomName: room ? room.roomName : qsTr("No room selected") property string avatarUrl: room ? room.roomAvatarUrl : "" property string roomTopic: room ? room.roomTopic : "" + property bool isEncrypted: room ? room.isEncrypted : false + property int trustlevel: room ? room.trustlevel : Crypto.Unverified Layout.fillWidth: true implicitHeight: topLayout.height + Nheko.paddingMedium * 2 @@ -92,11 +94,33 @@ Rectangle { text: roomTopic } + EncryptionIndicator { + Layout.column: 3 + Layout.row: 0 + Layout.rowSpan: 2 + visible: isEncrypted + encrypted: isEncrypted + trust: trustlevel + ToolTip.text: { + if (!encrypted) + return qsTr("This room is not encrypted!"); + + switch (trust) { + case Crypto.Verified: + return qsTr("This room contains only verified devices."); + case Crypto.TOFU: + return qsTr("This rooms contain verified devices and devices which have never changed their master key."); + default: + return qsTr("This room contains unverified devices!"); + } + } + } + ImageButton { id: roomOptionsButton visible: !!room - Layout.column: 3 + Layout.column: 4 Layout.row: 0 Layout.rowSpan: 2 Layout.alignment: Qt.AlignVCenter