From 47ce8a4846564c9345f8d4f8fae32646c55c0d93 Mon Sep 17 00:00:00 2001 From: James Graham Date: Sat, 25 Feb 2023 15:01:05 +0000 Subject: [PATCH] Add button to copy the room Id to clipboard --- src/qml/RoomSettings/General.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/qml/RoomSettings/General.qml b/src/qml/RoomSettings/General.qml index cc6b52378..1117ce256 100644 --- a/src/qml/RoomSettings/General.qml +++ b/src/qml/RoomSettings/General.qml @@ -121,8 +121,24 @@ Kirigami.ScrollablePage { } } MobileForm.FormTextDelegate { + id: roomIdDelegate text: i18n("Room ID") description: room.id + + contentItem.children: QQC2.Button { + visible: roomIdDelegate.hovered + text: i18n("Copy room ID to clipboard") + icon.name: "edit-copy" + display: QQC2.AbstractButton.IconOnly + + onClicked: { + Clipboard.saveText(room.id) + } + + QQC2.ToolTip.text: text + QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay + QQC2.ToolTip.visible: hovered + } } MobileForm.FormTextDelegate { text: i18n("Room version")