@@ -5,6 +5,12 @@ import { classNames } from '~/utils/classNames';
55import { profileStore } from '~/lib/stores/profile' ;
66import type { TabType , Profile } from './types' ;
77
8+ const BetaLabel = ( ) => (
9+ < span className = "px-1.5 py-0.5 rounded-full bg-purple-500/10 dark:bg-purple-500/20 text-[10px] font-medium text-purple-600 dark:text-purple-400 ml-2" >
10+ BETA
11+ </ span >
12+ ) ;
13+
814interface AvatarDropdownProps {
915 onSelectTab : ( tab : TabType ) => void ;
1016}
@@ -15,55 +21,52 @@ export const AvatarDropdown = ({ onSelectTab }: AvatarDropdownProps) => {
1521 return (
1622 < DropdownMenu . Root >
1723 < DropdownMenu . Trigger asChild >
18- < motion . button
19- className = "group flex items-center justify-center"
20- whileHover = { { scale : 1.02 } }
21- whileTap = { { scale : 0.98 } }
22- >
23- < div
24- className = { classNames (
25- 'w-10 h-10' ,
26- 'rounded-full overflow-hidden' ,
27- 'bg-gray-100/50 dark:bg-gray-800/50' ,
28- 'flex items-center justify-center' ,
29- 'ring-1 ring-gray-200/50 dark:ring-gray-700/50' ,
30- 'group-hover:ring-purple-500/50 dark:group-hover:ring-purple-500/50' ,
31- 'group-hover:bg-purple-500/10 dark:group-hover:bg-purple-500/10' ,
32- 'transition-all duration-200' ,
33- 'relative' ,
34- ) }
35- >
36- { profile ?. avatar ? (
37- < div className = "w-full h-full" >
38- < img
39- src = { profile . avatar }
40- alt = { profile ?. username || 'Profile' }
41- className = { classNames (
42- 'w-full h-full' ,
43- 'object-cover' ,
44- 'transform-gpu' ,
45- 'image-rendering-crisp' ,
46- 'group-hover:brightness-110' ,
47- 'group-hover:scale-105' ,
48- 'transition-all duration-200' ,
49- ) }
50- loading = "eager"
51- decoding = "sync"
52- />
53- < div
54- className = { classNames (
55- 'absolute inset-0' ,
56- 'ring-1 ring-inset ring-black/5 dark:ring-white/5' ,
57- 'group-hover:ring-purple-500/20 dark:group-hover:ring-purple-500/20' ,
58- 'group-hover:bg-purple-500/5 dark:group-hover:bg-purple-500/5' ,
59- 'transition-colors duration-200' ,
60- ) }
61- />
62- </ div >
63- ) : (
64- < div className = "i-ph:robot-fill w-6 h-6 text-gray-400 dark:text-gray-400 group-hover:text-purple-500 dark:group-hover:text-purple-400 transition-colors" />
65- ) }
66- </ div >
24+ < motion . button className = "group outline-none relative" whileHover = { { scale : 1.02 } } whileTap = { { scale : 0.98 } } >
25+ { profile ?. avatar ? (
26+ < div
27+ className = { classNames (
28+ 'w-10 h-10' ,
29+ 'rounded-full overflow-hidden' ,
30+ 'bg-white dark:bg-gray-800' ,
31+ 'transition-all duration-200' ,
32+ 'relative' ,
33+ 'shadow-sm' ,
34+ ) }
35+ >
36+ < img
37+ src = { profile . avatar }
38+ alt = { profile ?. username || 'Profile' }
39+ className = { classNames (
40+ 'w-full h-full' ,
41+ 'object-cover' ,
42+ 'transform-gpu' ,
43+ 'image-rendering-crisp' ,
44+ 'group-hover:brightness-110' ,
45+ 'group-hover:scale-105' ,
46+ 'transition-all duration-200' ,
47+ ) }
48+ loading = "eager"
49+ decoding = "sync"
50+ />
51+ </ div >
52+ ) : (
53+ < div
54+ className = { classNames (
55+ 'w-10 h-10' ,
56+ 'rounded-full' ,
57+ 'flex items-center justify-center' ,
58+ 'bg-white dark:bg-gray-800' ,
59+ 'text-gray-400 dark:text-gray-500' ,
60+ 'group-hover:text-purple-500 dark:group-hover:text-purple-400' ,
61+ 'transition-all duration-200' ,
62+ 'shadow-sm' ,
63+ ) }
64+ >
65+ < div className = "i-ph:question w-6 h-6" />
66+ </ div >
67+ ) }
68+ { /* Add subtle circular highlight effect */ }
69+ < div className = "absolute inset-0 rounded-full bg-gradient-to-b from-white/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity" />
6770 </ motion . button >
6871 </ DropdownMenu . Trigger >
6972
@@ -86,7 +89,7 @@ export const AvatarDropdown = ({ onSelectTab }: AvatarDropdownProps) => {
8689 'border-b border-gray-200/50 dark:border-gray-800/50' ,
8790 ) }
8891 >
89- < div className = "w-10 h-10 rounded-full overflow-hidden bg-gray-100/50 dark:bg-gray-800/50 flex-shrink-0 " >
92+ < div className = "w-10 h-10 rounded-full overflow-hidden flex-shrink-0 bg-white dark:bg-gray-800 shadow-sm " >
9093 { profile ?. avatar ? (
9194 < img
9295 src = { profile . avatar }
@@ -96,8 +99,8 @@ export const AvatarDropdown = ({ onSelectTab }: AvatarDropdownProps) => {
9699 decoding = "sync"
97100 />
98101 ) : (
99- < div className = "w-full h-full flex items-center justify-center" >
100- < div className = "i-ph:robot-fill w-6 h-6 text-gray-400 dark:text-gray-400 group-hover:text-purple-500 dark:group-hover:text-purple-400 transition-colors" / >
102+ < div className = "w-full h-full flex items-center justify-center text-gray-400 dark:text-gray-500 font-medium text-lg " >
103+ < span className = "relative -top-0.5" > ? </ span >
101104 </ div >
102105 ) }
103106 </ div >
@@ -121,7 +124,7 @@ export const AvatarDropdown = ({ onSelectTab }: AvatarDropdownProps) => {
121124 ) }
122125 onClick = { ( ) => onSelectTab ( 'profile' ) }
123126 >
124- < div className = "i-ph:robot-fill w-4 h-4 text-gray-400 group-hover:text-purple-500 dark:group-hover:text-purple-400 transition-colors" />
127+ < div className = "i-ph:user-circle w-4 h-4 text-gray-400 group-hover:text-purple-500 dark:group-hover:text-purple-400 transition-colors" />
125128 Edit Profile
126129 </ DropdownMenu . Item >
127130
@@ -137,7 +140,7 @@ export const AvatarDropdown = ({ onSelectTab }: AvatarDropdownProps) => {
137140 ) }
138141 onClick = { ( ) => onSelectTab ( 'settings' ) }
139142 >
140- < div className = "i-ph:gear-six-fill w-4 h-4 text-gray-400 group-hover:text-purple-500 dark:group-hover:text-purple-400 transition-colors" />
143+ < div className = "i-ph:gear-six w-4 h-4 text-gray-400 group-hover:text-purple-500 dark:group-hover:text-purple-400 transition-colors" />
141144 Settings
142145 </ DropdownMenu . Item >
143146
@@ -155,8 +158,9 @@ export const AvatarDropdown = ({ onSelectTab }: AvatarDropdownProps) => {
155158 ) }
156159 onClick = { ( ) => onSelectTab ( 'task-manager' ) }
157160 >
158- < div className = "i-ph:activity-fill w-4 h-4 text-gray-400 group-hover:text-purple-500 dark:group-hover:text-purple-400 transition-colors" />
161+ < div className = "i-ph:activity w-4 h-4 text-gray-400 group-hover:text-purple-500 dark:group-hover:text-purple-400 transition-colors" />
159162 Task Manager
163+ < BetaLabel />
160164 </ DropdownMenu . Item >
161165
162166 < DropdownMenu . Item
@@ -171,8 +175,9 @@ export const AvatarDropdown = ({ onSelectTab }: AvatarDropdownProps) => {
171175 ) }
172176 onClick = { ( ) => onSelectTab ( 'service-status' ) }
173177 >
174- < div className = "i-ph:heartbeat-fill w-4 h-4 text-gray-400 group-hover:text-purple-500 dark:group-hover:text-purple-400 transition-colors" />
178+ < div className = "i-ph:heartbeat w-4 h-4 text-gray-400 group-hover:text-purple-500 dark:group-hover:text-purple-400 transition-colors" />
175179 Service Status
180+ < BetaLabel />
176181 </ DropdownMenu . Item >
177182 </ DropdownMenu . Content >
178183 </ DropdownMenu . Portal >
0 commit comments