fix(CreateCategoryPopup): move the delete button into footer
Adjust according to Figma design - the asset size should be 40x40 - fix the listview's horizontal alignment - fix the confirmation dialog(s!) title Fixes #9887
This commit is contained in:
parent
6768f62451
commit
cde9f810e6
|
@ -123,10 +123,11 @@ StatusModal {
|
|||
readonly property bool checked: channelItemCheckbox.checked
|
||||
objectName: "category_item_name_" + model.name
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.horizontalCenterOffset: 16
|
||||
height: visible ? implicitHeight : 0
|
||||
title: "#" + model.name
|
||||
asset.width: 30
|
||||
asset.height: 30
|
||||
asset.width: 40
|
||||
asset.height: 40
|
||||
asset.emoji: model.emoji
|
||||
asset.color: model.color
|
||||
asset.imgIsIdenticon: false
|
||||
|
@ -159,29 +160,6 @@ StatusModal {
|
|||
}
|
||||
}
|
||||
|
||||
StatusModalDivider {
|
||||
visible: deleteCategoryButton.visible
|
||||
topPadding: 8
|
||||
bottomPadding: 8
|
||||
}
|
||||
|
||||
StatusListItem {
|
||||
id: deleteCategoryButton
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: isEdit
|
||||
|
||||
title: qsTr("Delete category")
|
||||
asset.name: "delete"
|
||||
type: StatusListItem.Type.Danger
|
||||
onClicked: {
|
||||
Global.openPopup(deleteCategoryConfirmationDialogComponent, {
|
||||
title: qsTr("Delete %1 category").arg(root.contentItem.categoryName.input.text),
|
||||
confirmationText: qsTr("Are you sure you want to delete %1 category? Channels inside the category won’t be deleted.").arg(root.contentItem.categoryName.input.text)
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
height: 8
|
||||
width: parent.width
|
||||
|
@ -212,6 +190,17 @@ StatusModal {
|
|||
}
|
||||
|
||||
rightButtons: [
|
||||
StatusButton {
|
||||
visible: isEdit
|
||||
type: StatusBaseButton.Type.Danger
|
||||
text: qsTr("Delete Category")
|
||||
onClicked: {
|
||||
Global.openPopup(deleteCategoryConfirmationDialogComponent, {
|
||||
"header.title": qsTr("Delete '%1' category").arg(nameInput.text),
|
||||
confirmationText: qsTr("Are you sure you want to delete '%1' category? Channels inside the category won’t be deleted.").arg(nameInput.text)
|
||||
})
|
||||
}
|
||||
},
|
||||
StatusButton {
|
||||
objectName: "createOrEditCommunityCategoryBtn"
|
||||
enabled: isFormValid()
|
||||
|
|
|
@ -303,8 +303,8 @@ Item {
|
|||
type: StatusAction.Type.Danger
|
||||
onTriggered: {
|
||||
Global.openPopup(deleteCategoryConfirmationDialogComponent, {
|
||||
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.")
|
||||
"header.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
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue