diff --git a/TODO.md b/TODO.md index 44be0469..78cb3008 100644 --- a/TODO.md +++ b/TODO.md @@ -89,8 +89,7 @@ - Server selection - Register/Forgot? for SignIn dialog - Add room - - Leave room - - Forget room warning popup + - Leave/forget room warning popup - Prevent using the SendBox if no permission (power levels) - Prevent using an alias if that user is not in the room or no permission - Spinner when loading account, past room events, images or clicking buttons diff --git a/src/icons/light-thin/forget-room.svg b/src/icons/light-thin/room-forget.svg similarity index 100% rename from src/icons/light-thin/forget-room.svg rename to src/icons/light-thin/room-forget.svg diff --git a/src/qml/Base/HMenuItem.qml b/src/qml/Base/HMenuItem.qml index 9d2b6cb7..42012f5c 100644 --- a/src/qml/Base/HMenuItem.qml +++ b/src/qml/Base/HMenuItem.qml @@ -6,8 +6,8 @@ MenuItem { spacing: theme.spacing leftPadding: spacing rightPadding: spacing - topPadding: spacing / 1.5 - bottomPadding: spacing / 1.5 + topPadding: spacing / 1.75 + bottomPadding: spacing / 1.75 readonly property alias iconItem: contentItem.icon diff --git a/src/qml/Chat/Banners/LeftBanner.qml b/src/qml/Chat/Banners/LeftBanner.qml index 6559952f..9fea14cc 100644 --- a/src/qml/Chat/Banners/LeftBanner.qml +++ b/src/qml/Chat/Banners/LeftBanner.qml @@ -14,7 +14,7 @@ Banner { { name: "forget", text: qsTr("Forget"), - iconName: "forget-room", + iconName: "room-forget", } ] diff --git a/src/qml/SidePane/DelegateRoom.qml b/src/qml/SidePane/DelegateRoom.qml index 4440700a..21815608 100644 --- a/src/qml/SidePane/DelegateRoom.qml +++ b/src/qml/SidePane/DelegateRoom.qml @@ -78,11 +78,20 @@ HTileDelegate { contextMenu: HMenu { HMenuItem { + visible: ! model.data.left icon.name: invited ? "invite-decline" : "room-leave" text: invited ? qsTr("Decline invite") : qsTr("Leave") onTriggered: py.callClientCoro( model.user_id, "room_leave", [model.data.room_id] ) } + + HMenuItem { + icon.name: "room-forget" + text: qsTr("Forget") + onTriggered: py.callClientCoro( + model.user_id, "room_forget", [model.data.room_id] + ) + } } }