From ff7dcefc8d158ad04fdddb08b49fd377acaa8a58 Mon Sep 17 00:00:00 2001 From: "Rosy.iso" Date: Tue, 10 Mar 2026 12:56:43 +0100 Subject: [PATCH] implement /color's setting --- .../features/common-settings/cosmetics/Cosmetics.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/features/common-settings/cosmetics/Cosmetics.tsx b/src/app/features/common-settings/cosmetics/Cosmetics.tsx index a286f6ab..5d81b774 100644 --- a/src/app/features/common-settings/cosmetics/Cosmetics.tsx +++ b/src/app/features/common-settings/cosmetics/Cosmetics.tsx @@ -54,6 +54,7 @@ import FocusTrap from 'focus-trap-react'; import { ImageEditor } from '$components/image-editor'; import { stopPropagation } from '$utils/keyboard'; import { ModalWide } from '$styles/Modal.css'; +import { NameColorEditor } from '$features/settings/account/NameColorEditor'; const log = createLogger('Cosmetics'); @@ -314,6 +315,7 @@ export function Cosmetics({ requestClose }: CosmeticsProps) { const userId = mx.getUserId()!; const profile = useUserProfile(userId); const room = useRoom(); + const roomProfile = useUserProfile(userId, room); const creators = useRoomCreators(room); const member = room.getMember(userId)!; const powerLevels = usePowerLevels(room); @@ -322,6 +324,8 @@ export function Cosmetics({ requestClose }: CosmeticsProps) { const permissions = useRoomPermissions(creators, powerLevels); const canEditPermissions = permissions.stateEvent(StateEvent.RoomPowerLevels, mx.getSafeUserId()); + const commands = useCommands(mx, room); + const getLevel = (eventType: string) => (powerLevels as any).events?.[eventType] ?? 50; const handleToggle = useCallback( @@ -402,9 +406,10 @@ export function Cosmetics({ requestClose }: CosmeticsProps) { direction="Column" gap="400" > - commands[Command.Color].exe(color ?? 'clear')} />