Add keybinds for message removal
This commit is contained in:
@@ -6,22 +6,20 @@ import "../Base"
|
||||
|
||||
BoxPopup {
|
||||
summary.text:
|
||||
isLast ?
|
||||
qsTr("Remove your last message?") :
|
||||
|
||||
eventIds.length > 1 ?
|
||||
qsTr("Remove selected messages?") :
|
||||
qsTr("Remove selected message?")
|
||||
qsTr("Remove %1 messages?").arg(eventIds.length) :
|
||||
|
||||
qsTr("Remove this message?")
|
||||
|
||||
details.color: theme.colors.warningText
|
||||
details.text:
|
||||
onlyOwnMessageWarning ?
|
||||
qsTr("Only your messages will be removed") :
|
||||
qsTr("Only your messages can be removed") :
|
||||
""
|
||||
|
||||
HLabeledTextField {
|
||||
id: reasonField
|
||||
label.text: qsTr("Reason (optional):")
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
okText: qsTr("Remove")
|
||||
box.focusButton: "ok"
|
||||
|
||||
@@ -31,9 +29,18 @@ BoxPopup {
|
||||
[roomId, reasonField.field.text, ...eventIds]
|
||||
)
|
||||
|
||||
|
||||
property string roomId: ""
|
||||
property string userId: ""
|
||||
|
||||
property var eventIds: []
|
||||
property bool onlyOwnMessageWarning: false
|
||||
property bool isLast: false
|
||||
|
||||
|
||||
HLabeledTextField {
|
||||
id: reasonField
|
||||
label.text: qsTr("Optional reason:")
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user