feat(avatar): enhance SpaceAvatar component with emoji support

- Updated SpaceAvatar component to allow emoji-based avatars, enabling users to select emojis as their space avatar.
- Added new props and computed properties to handle emoji logic and display.
- Enhanced UI to include an emoji picker and clear option for avatars.
- Updated localization strings in English and Chinese for new avatar features.
- Adjusted styles for emoji display and interaction.

This update improves user personalization options for avatars, enhancing the overall user experience in the application.
This commit is contained in:
wizardchen
2026-02-02 00:30:27 +08:00
committed by lyingbug
parent 72173432c9
commit 342e56735f
15 changed files with 767 additions and 352 deletions
+2 -16
View File
@@ -1,17 +1,3 @@
<svg width="20" height="20" viewBox="0 0 56 40" fill="none" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<defs>
<radialGradient id="orbGreen" cx="0.35" cy="0.35" r="0.7" gradientUnits="objectBoundingBox">
<stop offset="0%" stop-color="#6ee7a0"/>
<stop offset="45%" stop-color="#07C05F"/>
<stop offset="100%" stop-color="#047857"/>
</radialGradient>
</defs>
<!-- 连接线:粗实线 -->
<path d="M14 13 L24 10 M32 10 L42 13" stroke="#07C05F" stroke-width="2.2" stroke-linecap="round" opacity="0.95"/>
<path d="M28 14 L28 22 M20 18 L26 24 M36 18 L30 24" stroke="#07C05F" stroke-width="1.8" stroke-linecap="round" opacity="0.9"/>
<!-- 节点:立体球体 -->
<circle cx="10" cy="12" r="5" fill="url(#orbGreen)" stroke="#059669" stroke-width="0.8"/>
<circle cx="28" cy="8" r="6" fill="url(#orbGreen)" stroke="#059669" stroke-width="0.9"/>
<circle cx="46" cy="14" r="5" fill="url(#orbGreen)" stroke="#059669" stroke-width="0.8"/>
<circle cx="28" cy="28" r="7" fill="url(#orbGreen)" stroke="#059669" stroke-width="0.9"/>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 10C8.8 7.5 7.8 3.8 4.8 3.8C2.2 3.8 0.8 6.8 0.8 10C0.8 13.2 2.2 16.2 4.8 16.2C7.8 16.2 8.8 12.5 10 10C11.2 7.5 12.5 5.5 14.5 5.5C16.5 5.5 18 7.5 18 10C18 12.5 16.5 14.5 14.5 14.5C12.5 14.5 11.2 12.5 10 10Z" stroke="#07C05F" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 421 B

+2 -20
View File
@@ -1,21 +1,3 @@
<svg width="20" height="20" viewBox="0 0 56 40" fill="none" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<defs>
<radialGradient id="orbGray" cx="0.35" cy="0.35" r="0.7" gradientUnits="objectBoundingBox">
<stop offset="0%" stop-color="#b5b5b5"/>
<stop offset="45%" stop-color="#6b6b6b"/>
<stop offset="100%" stop-color="#3d3d3d"/>
</radialGradient>
<linearGradient id="lineGray" x1="0%" y1="0%" x2="100%" y2="0%" gradientUnits="objectBoundingBox">
<stop offset="0%" stop-color="#5c5c5c"/>
<stop offset="100%" stop-color="#4a4a4a"/>
</linearGradient>
</defs>
<!-- 连接线:粗实线增强空间感 -->
<path d="M14 13 L24 10 M32 10 L42 13" stroke="#5c5c5c" stroke-width="2.2" stroke-linecap="round" opacity="0.9"/>
<path d="M28 14 L28 22 M20 18 L26 24 M36 18 L30 24" stroke="#5c5c5c" stroke-width="1.8" stroke-linecap="round" opacity="0.85"/>
<!-- 节点:立体球体 -->
<circle cx="10" cy="12" r="5" fill="url(#orbGray)" stroke="#4a4a4a" stroke-width="0.8"/>
<circle cx="28" cy="8" r="6" fill="url(#orbGray)" stroke="#4a4a4a" stroke-width="0.9"/>
<circle cx="46" cy="14" r="5" fill="url(#orbGray)" stroke="#4a4a4a" stroke-width="0.8"/>
<circle cx="28" cy="28" r="7" fill="url(#orbGray)" stroke="#4a4a4a" stroke-width="0.9"/>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 10C8.8 7.5 7.8 3.8 4.8 3.8C2.2 3.8 0.8 6.8 0.8 10C0.8 13.2 2.2 16.2 4.8 16.2C7.8 16.2 8.8 12.5 10 10C11.2 7.5 12.5 5.5 14.5 5.5C16.5 5.5 18 7.5 18 10C18 12.5 16.5 14.5 14.5 14.5C12.5 14.5 11.2 12.5 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 426 B