Create component for showing a maximize version of a code snippet

This commit is contained in:
James Graham
2024-04-01 11:20:10 +00:00
parent 0552c798fb
commit 6a32d1e961
8 changed files with 225 additions and 0 deletions

View File

@@ -13,6 +13,29 @@ import org.kde.neochat
QQC2.Control {
id: root
/**
* @brief The message author.
*
* This should consist of the following:
* - id - The matrix ID of the author.
* - isLocalUser - Whether the author is the local user.
* - avatarSource - The mxc URL for the author's avatar in the current room.
* - avatarMediaId - The media ID of the author's avatar.
* - avatarUrl - The mxc URL for the author's avatar.
* - displayName - The display name of the author.
* - display - The name of the author.
* - color - The color for the author.
* - object - The Quotient::User object for the author.
*
* @sa Quotient::User
*/
required property var author
/**
* @brief The timestamp of the message.
*/
required property var time
/**
* @brief The display text of the message.
*/
@@ -113,6 +136,7 @@ QQC2.Control {
TapHandler {
acceptedButtons: Qt.LeftButton
onTapped: RoomManager.maximizeCode(root.author, root.time, root.display, root.componentAttributes.class)
onLongPressed: root.showMessageMenu()
}