Set power level from userdetaildialog
Add the option to set powerlevel to userdetaildialog. This is done by making the powerleveldialog into it's own file and using that. implements network/neochat#570
This commit is contained in:
committed by
Tobias Fella
parent
e6a060c192
commit
bd4eeb405b
@@ -139,6 +139,29 @@ Kirigami.OverlaySheet {
|
||||
}
|
||||
}
|
||||
}
|
||||
Kirigami.BasicListItem {
|
||||
visible: room.canSendState("m.room.power_levels")
|
||||
action: Kirigami.Action {
|
||||
text: i18n("Set user power level")
|
||||
icon.name: "visibility"
|
||||
onTriggered: {
|
||||
let dialog = powerLevelDialog.createObject(applicationWindow().overlay, {
|
||||
room: root.room,
|
||||
userId: root.user.id,
|
||||
powerLevel: root.room.getUserPowerLevel(root.user.id)
|
||||
});
|
||||
dialog.open()
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: powerLevelDialog
|
||||
PowerLevelDialog {
|
||||
id: powerLevelDialog
|
||||
}
|
||||
}
|
||||
}
|
||||
Kirigami.BasicListItem {
|
||||
visible: user === room.localUser || room.canSendState("redact")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user