Re-arrange the file and message context menus, add separators

Like the room context menu, this is a jumbled list of actions that could
use some organization. Also, the text for "Copy Text" and "Copy Link" is
clearer.
This commit is contained in:
Joshua Goins
2024-11-16 11:23:39 -05:00
parent d34f89fc4b
commit 0deb7495f0
2 changed files with 31 additions and 10 deletions

View File

@@ -59,21 +59,30 @@ DelegateContextMenu {
});
}
},
Kirigami.Action {
separator: true
},
DelegateContextMenu.RemoveMessageAction {},
Kirigami.Action {
text: i18n("Copy")
text: i18nc("@action:inmenu", "Copy Text")
icon.name: "edit-copy"
onTriggered: Clipboard.saveText(root.selectedText.length > 0 ? root.selectedText : root.plainText)
},
DelegateContextMenu.ReportMessageAction {},
DelegateContextMenu.ShowUserAction {},
DelegateContextMenu.ViewSourceAction {},
Kirigami.Action {
text: i18n("Copy Link")
text: i18nc("@action:inmenu", "Copy Message Link")
icon.name: "edit-copy"
onTriggered: {
Clipboard.saveText("https://matrix.to/#/" + currentRoom.id + "/" + root.eventId);
}
},
DelegateContextMenu.ReportMessageAction {},
DelegateContextMenu.ShowUserAction {},
Kirigami.Action {
separator: true
visible: viewSourceAction.visible
},
DelegateContextMenu.ViewSourceAction {
id: viewSourceAction
}
]
}