feat(wip): 前端, 以及編譯前端

TODO: 修復 webpack (in mian.ts)
This commit is contained in:
CrescentLeaf
2025-08-30 15:36:36 +08:00
parent 5666bcba24
commit ca6aea2902
16 changed files with 674 additions and 9 deletions

15
client/ui/Avatar.jsx Normal file
View File

@@ -0,0 +1,15 @@
export default function Avatar({ src, text, icon = 'person', ...props } = {}) {
return (
src ? <mdui-avatar {...props}>
<img src={src} alt={'(头像)' + text || ''} />
</mdui-avatar>
: (
text ? <mdui-avatar {...props}>
{
text.substring(0, 0)
}
</mdui-avatar>
: <mdui-avatar icon={icon} {...props} />
)
)
}