HLabeledTextField → extensible HLabeledItem
This commit is contained in:
@@ -23,7 +23,7 @@ BoxPopup {
|
||||
okText: qsTr("Remove")
|
||||
// box.focusButton: "ok"
|
||||
|
||||
onOpened: reasonField.field.forceActiveFocus()
|
||||
onOpened: reasonField.item.forceActiveFocus()
|
||||
onOk: {
|
||||
const idsForSender = {} // {senderId: [event.id, ...]}
|
||||
|
||||
@@ -38,7 +38,7 @@ BoxPopup {
|
||||
py.callClientCoro(
|
||||
mainUI.accountIds.includes(senderId) ? senderId : preferUserId,
|
||||
"room_mass_redact",
|
||||
[roomId, reasonField.field.text, ...eventClientIds]
|
||||
[roomId, reasonField.item.text, ...eventClientIds]
|
||||
)
|
||||
}
|
||||
|
||||
@@ -51,10 +51,14 @@ BoxPopup {
|
||||
property bool isLast: false
|
||||
|
||||
|
||||
HLabeledTextField {
|
||||
HLabeledItem {
|
||||
id: reasonField
|
||||
label.text: qsTr("Optional reason:")
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
HTextField {
|
||||
width: parent.width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,12 +24,12 @@ BoxPopup {
|
||||
|
||||
qsTr("Ban")
|
||||
|
||||
onOpened: reasonField.field.forceActiveFocus()
|
||||
onOpened: reasonField.item.forceActiveFocus()
|
||||
onOk: py.callClientCoro(
|
||||
userId,
|
||||
operation === RemoveMemberPopup.Operation.Ban ?
|
||||
"room_ban" : "room_kick",
|
||||
[roomId, targetUserId, reasonField.field.text || null],
|
||||
[roomId, targetUserId, reasonField.item.text || null],
|
||||
)
|
||||
|
||||
|
||||
@@ -45,10 +45,14 @@ BoxPopup {
|
||||
utils.coloredNameHtml(targetDisplayName, targetUserId)
|
||||
|
||||
|
||||
HLabeledTextField {
|
||||
HLabeledItem {
|
||||
id: reasonField
|
||||
label.text: qsTr("Optional reason:")
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
HTextField {
|
||||
width: parent.width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user