From fa653bc078ca80508b5de27ac02c77980dda4c45 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 24 Jun 2023 01:04:54 +0200 Subject: Allow viewing and changing the history visibility --- resources/qml/dialogs/RoomSettings.qml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'resources/qml') diff --git a/resources/qml/dialogs/RoomSettings.qml b/resources/qml/dialogs/RoomSettings.qml index 1f011bf1..a2400722 100644 --- a/resources/qml/dialogs/RoomSettings.qml +++ b/resources/qml/dialogs/RoomSettings.qml @@ -377,6 +377,37 @@ ApplicationWindow { Layout.fillWidth: true } + Label { + text: qsTr("History visibility") + Layout.fillWidth: true + color: palette.text + } + + ComboBox { + id: visComboBox + model: [qsTr("Readable to anyone without joining the room"), qsTr("Past messages visible to all current members"), qsTr("Only visible to members who were invited or joined when the message was sent"), qsTr("Only visible to members who were joined when the message was sent")] + currentIndex: roomSettings.historyVisibility + onActivated: { + roomSettings.changeHistoryVisibility(index); + } + Layout.fillWidth: true + WheelHandler{} // suppress scrolling changing values + enabled: roomSettings.canChangeHistoryVisibility + + delegate: ItemDelegate { + text: modelData + width: implicitWidth + highlighted: visComboBox.highlightedIndex === index + ToolTip.text: modelData + ToolTip.visible: hovered + ToolTip.delay: Nheko.tooltipDelay + } + + ToolTip.text: displayText + ToolTip.visible: hovered + ToolTip.delay: Nheko.tooltipDelay + } + Label { text: qsTr("Encryption") color: palette.text -- cgit 1.5.1