diff --git a/TODO.md b/TODO.md index 1b1b2247..b88433d5 100644 --- a/TODO.md +++ b/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) diff --git a/src/backend/matrix_client.py b/src/backend/matrix_client.py index a218382f..892d678e 100644 --- a/src/backend/matrix_client.py +++ b/src/backend/matrix_client.py @@ -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), diff --git a/src/backend/models/items.py b/src/backend/models/items.py index 87287029..fdc4b5ca 100644 --- a/src/backend/models/items.py +++ b/src/backend/models/items.py @@ -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 diff --git a/src/gui/Base/PowerLevelControl.qml b/src/gui/Base/PowerLevelControl.qml index 019eb0fc..4b457a2a 100644 --- a/src/gui/Base/PowerLevelControl.qml +++ b/src/gui/Base/PowerLevelControl.qml @@ -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 }