fix(Chat): Confirmation button UI is broken when deleting 1-1 chat

fixes a `StatusModal` porting error that broke `title` in a couple of
popups/modals

Closes #11503
This commit is contained in:
Lukáš Tinkl 2023-07-13 15:24:01 +02:00 committed by Lukáš Tinkl
parent d4a4f96a8a
commit 5b118f43f8
5 changed files with 6 additions and 8 deletions

View File

@ -169,7 +169,7 @@ SplitView {
StatusModal {
id: imageCropperModal
header.title: workflowItem.title
headerSettings.title: workflowItem.title
anchors.centerIn: Overlay.overlay

View File

@ -206,8 +206,8 @@ Rectangle {
Component {
id: statusAppCommunityView
StatusAppCommunityView {
communityDetailModalTitle: demoCommunityDetailModal.header.title
communityDetailModalImage: demoCommunityDetailModal.header.asset.name
communityDetailModalTitle: demoCommunityDetailModal.headerSettings.title
communityDetailModalImage: demoCommunityDetailModal.headerSettings.asset.name
onChatInfoButtonClicked: {
demoCommunityDetailModal.open();
}

View File

@ -45,7 +45,7 @@ Rectangle {
component Modal: StatusModal {
anchors.centerIn: parent
header.title: `Popup with fixed width ${width}px`
headerSettings.title: `Popup with fixed width ${width}px`
rightButtons: [ StatusButton { text: "Button" } ]
}

View File

@ -293,7 +293,7 @@ Item {
type: StatusAction.Type.Danger
onTriggered: {
Global.openPopup(deleteCategoryConfirmationDialogComponent, {
"header.title": qsTr("Delete '%1' category").arg(categoryItem.name),
"headerSettings.title": qsTr("Delete '%1' category").arg(categoryItem.name),
confirmationText: qsTr("Are you sure you want to delete '%1' category? Channels inside the category won't be deleted.")
.arg(categoryItem.name),
categoryId: categoryItem.itemId
@ -527,7 +527,6 @@ Item {
ConfirmationDialog {
property string categoryId
confirmButtonObjectName: "confirmDeleteCategoryButton"
btnType: "warn"
showCancelButton: true
onClosed: {
destroy()

View File

@ -255,12 +255,11 @@ StatusMenu {
id: deleteChatConfirmationDialogComponent
ConfirmationDialog {
confirmButtonObjectName: "deleteChatConfirmationDialogDeleteButton"
btnType: "warn"
headerSettings.title: root.isCommunityChat ? qsTr("Delete #%1").arg(root.chatName) :
root.chatType === Constants.chatType.oneToOne ?
qsTr("Delete chat") :
qsTr("Leave chat")
confirmButtonLabel: root.isCommunityChat ? qsTr("Delete") : header.title
confirmButtonLabel: root.isCommunityChat ? qsTr("Delete") : headerSettings.title
confirmationText: root.isCommunityChat ? qsTr("Are you sure you want to delete #%1 channel?").arg(root.chatName) :
root.chatType === Constants.chatType.oneToOne ?
qsTr("Are you sure you want to delete this chat?"):