dev 分支暂存
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { usePersonaStore } from '@/store/personaStore';
|
||||
import type { CyreneForm } from '@/types/persona';
|
||||
|
||||
interface CyreneAvatarProps {
|
||||
size?: 'sm' | 'md' | 'lg';
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const FORM_AVATAR: Record<CyreneForm, string> = {
|
||||
mimi: '🌸',
|
||||
default: '🌺',
|
||||
de_moi_ge: '🌌',
|
||||
};
|
||||
|
||||
const SIZE_CLASS = {
|
||||
sm: 'w-8 h-8 text-lg',
|
||||
md: 'w-12 h-12 text-2xl',
|
||||
lg: 'w-20 h-20 text-4xl',
|
||||
};
|
||||
|
||||
export function CyreneAvatar({ size = 'md', className = '' }: CyreneAvatarProps) {
|
||||
const { currentForm } = usePersonaStore();
|
||||
const emoji = FORM_AVATAR[currentForm] || '🌸';
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`${SIZE_CLASS[size]} rounded-full bg-gradient-to-br from-pink-200 to-pink-400 dark:from-pink-800 dark:to-pink-600 flex items-center justify-center shadow-md ${className}`}
|
||||
title={`昔涟 · ${currentForm === 'mimi' ? '迷迷' : currentForm === 'de_moi_ge' ? '德谬歌' : '小昔涟'}`}
|
||||
>
|
||||
<span role="img" aria-label="昔涟">
|
||||
{emoji}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import { usePersonaStore, getMoodEmoji } from '@/store/personaStore';
|
||||
import type { Mood } from '@/types/persona';
|
||||
|
||||
const MOOD_LABEL: Record<Mood, string> = {
|
||||
happy: '心情愉快',
|
||||
thoughtful: '正在思考',
|
||||
worried: '有点担心你',
|
||||
playful: '想逗你玩',
|
||||
nostalgic: '有些怀旧',
|
||||
};
|
||||
|
||||
export function MoodIndicator() {
|
||||
const { mood } = usePersonaStore();
|
||||
const emoji = getMoodEmoji(mood);
|
||||
const label = MOOD_LABEL[mood] || mood;
|
||||
|
||||
return (
|
||||
<div className="flex items-center gap-1 text-xs text-gray-400">
|
||||
<span>{emoji}</span>
|
||||
<span>{label}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user