feat: light mode user icon
Some checks failed
container-scan / Container Scan (pull_request) Failing after 1m25s
docker-build / docker (pull_request) Failing after 8m42s

This commit is contained in:
micha 2025-06-20 12:32:25 +02:00
parent 7c0e53458f
commit d6aa3ab7da
4 changed files with 15 additions and 3 deletions

View file

Before

Width:  |  Height:  |  Size: 833 B

After

Width:  |  Height:  |  Size: 833 B

Before After
Before After

View file

@ -0,0 +1,5 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 11C0 4.92487 4.92487 0 11 0H29C35.0751 0 40 4.92487 40 11V29C40 35.0751 35.0751 40 29 40H11C4.92487 40 0 35.0751 0 29V11Z" fill="#4154C0"/>
<path d="M31.6663 35V31.6667C31.6663 29.8986 30.964 28.2029 29.7137 26.9526C28.4635 25.7024 26.7678 25 24.9997 25H14.9997C13.2316 25 11.5359 25.7024 10.2856 26.9526C9.03539 28.2029 8.33301 29.8986 8.33301 31.6667V35" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M19.9997 18.3333C23.6816 18.3333 26.6663 15.3486 26.6663 11.6667C26.6663 7.98477 23.6816 5 19.9997 5C16.3178 5 13.333 7.98477 13.333 11.6667C13.333 15.3486 16.3178 18.3333 19.9997 18.3333Z" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 833 B

View file

@ -1 +1,2 @@
export { default as defaultusericon } from '@/assets/usericon/default/default-user-icon.svg';
export { default as user_default_dark } from '@/assets/usericon/default/default-user-icon_dark.svg';
export { default as user_default_light } from '@/assets/usericon/default/default-user-icon_light.svg';

View file

@ -1,6 +1,8 @@
import React from 'react';
import Image from 'next/image';
import { defaultusericon } from '@/assets/usericon/default/defaultusericon-export';
import { user_default_dark } from '@/assets/usericon/default/defaultusericon-export';
import { user_default_light } from '@/assets/usericon/default/defaultusericon-export';
import { useTheme } from 'next-themes';
type ParticipantListEntryProps = {
participant: string;
@ -10,9 +12,13 @@ type ParticipantListEntryProps = {
export default function ParticipantListEntry({
participant,
}: ParticipantListEntryProps) {
const { resolvedTheme } = useTheme();
const iconSrc =
resolvedTheme === 'dark' ? user_default_dark : user_default_light;
return (
<div className='flex items-center gap-2 py-1 ml-5'>
<Image src={defaultusericon} alt='Avatar' width={30} height={30} />
<Image src={iconSrc} alt='Avatar' width={30} height={30} />
<span>{participant}</span>
</div>
);