summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-06-24 01:04:54 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-06-24 01:04:54 +0200
commitfa653bc078ca80508b5de27ac02c77980dda4c45 (patch)
tree6e46f203e41eb592870e4ab9a8409ec0db1af04f /resources/qml
parentBump arm job count (diff)
downloadnheko-fa653bc078ca80508b5de27ac02c77980dda4c45.tar.xz
Allow viewing and changing the history visibility
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/dialogs/RoomSettings.qml31
1 files changed, 31 insertions, 0 deletions
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
@@ -378,6 +378,37 @@ ApplicationWindow {
                 }
 
                 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
                 }