const { directs } = initMatrix.roomList;
const mx = initMatrix.matrixClient;
const parentRoom = mx.getRoom(parentId);
- const canManage = parentRoom?.currentState.maySendStateEvent('m.space.child', mx.getUserId()) || false;
-
const isSpace = roomInfo.room_type === 'm.space';
const roomId = roomInfo.room_id;
+ const canManage = parentRoom?.currentState.maySendStateEvent('m.space.child', mx.getUserId()) || false;
+ const isSuggested = parentRoom?.currentState.getStateEvents('m.space.child', roomId)?.getContent().suggested === true;
+
const room = mx.getRoom(roomId);
const isJoined = !!(room?.getMyMembership() === 'join' || null);
const name = room?.name || roomInfo.name || roomInfo.canonical_alias || roomId;
>
{roomAvatarJSX}
{roomNameJSX}
+ {isSuggested && <Text variant="b2">Suggested</Text>}
</button>
{roomInfo.topic && expandBtnJsx}
{
&__btn {
@extend .cp-fx__item-one;
display: flex;
+ align-items: center;
& .avatar__border--active {
box-shadow: none;
}
- & .text {
+ & > .text-b1 {
+ @extend .cp-fx__item-one;
@extend .cp-txt__ellipsis;
min-width: 0;
margin: 0 var(--sp-extra-tight);
}
+ & > .text-b2 {
+ margin: 0 var(--sp-extra-tight);
+ padding: 1px var(--sp-ultra-tight);
+ color: var(--bg-positive);
+ box-shadow: var(--bs-positive-border);
+ border-radius: 4px;
+ }
}
& .ic-btn {