Space preferences for whether or not you see DMs in a Space (#7250)

This commit is contained in:
Michael Telatynski 2021-12-17 09:26:32 +00:00 committed by GitHub
parent 5ee356daaa
commit 39c4b78371
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 911 additions and 350 deletions

View file

@ -29,6 +29,7 @@ import {
showCreateNewRoom,
showCreateNewSubspace,
showSpaceInvite,
showSpacePreferences,
showSpaceSettings,
} from "../../../utils/space";
import MatrixClientContext from "../../../contexts/MatrixClientContext";
@ -166,6 +167,14 @@ const SpaceContextMenu = ({ space, hideHeader, onFinished, ...props }: IProps) =
</>;
}
const onPreferencesClick = (ev: ButtonEvent) => {
ev.preventDefault();
ev.stopPropagation();
showSpacePreferences(space);
onFinished();
};
const onExploreRoomsClick = (ev: ButtonEvent) => {
ev.preventDefault();
ev.stopPropagation();
@ -193,6 +202,11 @@ const SpaceContextMenu = ({ space, hideHeader, onFinished, ...props }: IProps) =
label={canAddRooms ? _t("Manage & explore rooms") : _t("Explore rooms")}
onClick={onExploreRoomsClick}
/>
<IconizedContextMenuOption
iconClassName="mx_SpacePanel_iconPreferences"
label={_t("Preferences")}
onClick={onPreferencesClick}
/>
{ settingsOption }
{ leaveOption }
{ devtoolsOption }