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] rightButtons: [finishButton]
finishButton: StatusButton { finishButton: StatusButton {
text: qsTr("Add") text: qsTr("Add")
objectName: "addButton"
enabled: linkTarget.valid && (!customTitle.visible || customTitle.valid) enabled: linkTarget.valid && (!customTitle.visible || customTitle.valid)
onClicked: { onClicked: {
root.addLinkRequested(d.selectedLinkTypeText || customTitle.text, // text for custom link, otherwise the link typeId root.addLinkRequested(d.selectedLinkTypeText || customTitle.text, // text for custom link, otherwise the link typeId

View File

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