Add redacting event via context menu
This commit is contained in:
32
src/gui/Popups/RedactEvents.qml
Normal file
32
src/gui/Popups/RedactEvents.qml
Normal file
@@ -0,0 +1,32 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import "../Base"
|
||||
|
||||
BoxPopup {
|
||||
summary.text:
|
||||
eventIds.length > 1 ?
|
||||
qsTr("Remove selected messages?") :
|
||||
qsTr("Remove selected message?")
|
||||
|
||||
HLabeledTextField {
|
||||
id: reasonField
|
||||
label.text: qsTr("Reason (optional):")
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
okText: qsTr("Remove")
|
||||
box.focusButton: "ok"
|
||||
|
||||
onOk: py.callClientCoro(
|
||||
userId,
|
||||
"room_mass_redact",
|
||||
[roomId, reasonField.field.text, ...eventIds]
|
||||
)
|
||||
|
||||
property string roomId: ""
|
||||
property string userId: ""
|
||||
|
||||
property var eventIds: []
|
||||
}
|
Reference in New Issue
Block a user