chore: add object names for links preview and add button (#14853)

This commit is contained in:
Valentina1133 2024-05-20 17:11:37 +07:00 committed by GitHub
parent b764446568
commit 03712af3b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,7 @@ StatusStackModal {
rightButtons: [finishButton]
finishButton: StatusButton {
text: qsTr("Add")
objectName: "addButton"
enabled: linkTarget.valid && (!customTitle.visible || customTitle.valid)
onClicked: {
root.addLinkRequested(d.selectedLinkTypeText || customTitle.text, // text for custom link, otherwise the link typeId

View File

@ -122,12 +122,14 @@ CalloutCard {
StatusAction {
text: qsTr("Show for this message")
objectName: "showForThisMessagePreviewMenuItem"
icon.name: "show"
onTriggered: contextMenu.enableLinkPreviewForThisMessage()
}
StatusAction {
text: qsTr("Always show previews")
objectName: "alwaysShowPreviewMenuItem"
icon.name: "show"
onTriggered: contextMenu.enableLinkPreview()
}
@ -136,6 +138,7 @@ CalloutCard {
StatusAction {
text: qsTr("Never show previews")
objectName: "neverShowPreviewsMenuItem"
icon.name: "hide"
type: StatusAction.Type.Danger
onTriggered: contextMenu.disableLinkPreview()