mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-18 09:37:59 +00:00
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
|
readonly property bool checked: channelItemCheckbox.checked
|
||||||
objectName: "category_item_name_" + model.name
|
objectName: "category_item_name_" + model.name
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.horizontalCenterOffset: 16
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
title: "#" + model.name
|
title: "#" + model.name
|
||||||
asset.width: 30
|
asset.width: 40
|
||||||
asset.height: 30
|
asset.height: 40
|
||||||
asset.emoji: model.emoji
|
asset.emoji: model.emoji
|
||||||
asset.color: model.color
|
asset.color: model.color
|
||||||
asset.imgIsIdenticon: false
|
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 {
|
Item {
|
||||||
height: 8
|
height: 8
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@ -212,6 +190,17 @@ StatusModal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rightButtons: [
|
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 {
|
StatusButton {
|
||||||
objectName: "createOrEditCommunityCategoryBtn"
|
objectName: "createOrEditCommunityCategoryBtn"
|
||||||
enabled: isFormValid()
|
enabled: isFormValid()
|
||||||
|
@ -303,8 +303,8 @@ Item {
|
|||||||
type: StatusAction.Type.Danger
|
type: StatusAction.Type.Danger
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
Global.openPopup(deleteCategoryConfirmationDialogComponent, {
|
Global.openPopup(deleteCategoryConfirmationDialogComponent, {
|
||||||
title: qsTr("Delete %1 category").arg(categoryItem.name),
|
"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.")
|
confirmationText: qsTr("Are you sure you want to delete '%1' category? Channels inside the category won't be deleted.")
|
||||||
.arg(categoryItem.name),
|
.arg(categoryItem.name),
|
||||||
categoryId: categoryItem.itemId
|
categoryId: categoryItem.itemId
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user