Room default power level awareness
This commit is contained in:
parent
9d397b62c5
commit
0459657575
4
TODO.md
4
TODO.md
|
@ -1,5 +1,9 @@
|
|||
# TODO
|
||||
|
||||
- warn about setting level of someone to 100
|
||||
- gray out if no permission to change
|
||||
- improve event text
|
||||
|
||||
- save and restore status in accounts.json
|
||||
- mark accounts as offline when closing mirage
|
||||
- document new x11 dependnecy (auto-idle)
|
||||
|
|
|
@ -1683,6 +1683,7 @@ class MatrixClient(nio.AsyncClient):
|
|||
invite_required = room.join_rule == "invite",
|
||||
guests_allowed = room.guest_access == "can_join",
|
||||
|
||||
default_power_level = levels.defaults.users_default,
|
||||
can_invite = levels.can_user_invite(self.user),
|
||||
can_kick = levels.can_user_kick(self.user),
|
||||
can_redact_all = levels.can_user_redact(self.user),
|
||||
|
|
|
@ -179,6 +179,7 @@ class Room(ModelItem):
|
|||
invite_required: bool = True
|
||||
guests_allowed: bool = True
|
||||
|
||||
default_power_level: int = 0
|
||||
can_invite: bool = False
|
||||
can_kick: bool = False
|
||||
can_redact_all: bool = False
|
||||
|
|
|
@ -51,8 +51,8 @@ AutoDirectionLayout {
|
|||
HButton {
|
||||
height: parent.height
|
||||
icon.name: "user-power-default"
|
||||
toolTip.text: qsTr("Default")
|
||||
checked: control.level >= 0 && control.level < 50
|
||||
toolTip.text: qsTr("Limited")
|
||||
checked: control.level < 50
|
||||
uncheckable: false
|
||||
onClicked: field.text = 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user