feat: extend verification badge to user profile and settings members list
CI / Build & Quality Checks (push) Successful in 10m22s

Extract MemberVerificationBadge into a shared component and render it in:
- UserRoomProfile: shield badge beside the display name on the profile card
- common-settings Members: badge next to each member in the room/space
  settings members page (accessible from the lobby)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 12:53:33 -04:00
parent 1ae286ee74
commit 2f7f933350
4 changed files with 56 additions and 35 deletions
@@ -10,6 +10,8 @@ import { usePowerLevels } from '../../hooks/usePowerLevels';
import { useRoom } from '../../hooks/useRoom';
import { useUserPresence } from '../../hooks/useUserPresence';
import { IgnoredUserAlert, MutualRoomsChip, OptionsChip, ServerChip, ShareChip } from './UserChips';
import { useCrossSigningActive } from '../../hooks/useCrossSigning';
import { MemberVerificationBadge } from '../MemberVerificationBadge';
import { useCloseUserRoomProfile } from '../../state/hooks/userRoomProfile';
import { PowerChip } from './PowerChip';
import { UserInviteAlert, UserBanAlert, UserModeration, UserKickAlert } from './UserModeration';
@@ -28,6 +30,7 @@ type UserRoomProfileProps = {
};
export function UserRoomProfile({ userId }: UserRoomProfileProps) {
const mx = useMatrixClient();
const crossSigningActive = useCrossSigningActive();
const useAuthentication = useMediaAuthentication();
const navigate = useNavigate();
const closeUserRoomProfile = useCloseUserRoomProfile();
@@ -35,6 +38,7 @@ export function UserRoomProfile({ userId }: UserRoomProfileProps) {
const ignored = ignoredUsers.includes(userId);
const room = useRoom();
const showEncryption = room.hasEncryptionStateEvent() && crossSigningActive;
const powerLevels = usePowerLevels(room);
const creators = useRoomCreators(room);
@@ -76,8 +80,9 @@ export function UserRoomProfile({ userId }: UserRoomProfileProps) {
/>
<Box direction="Column" gap="500" style={{ padding: config.space.S400 }}>
<Box direction="Column" gap="400">
<Box gap="400" alignItems="Start">
<Box gap="400" alignItems="Center">
<UserHeroName displayName={displayName} userId={userId} />
{showEncryption && <MemberVerificationBadge userId={userId} />}
{userId !== myUserId && (
<Box shrink="No">
<Button