feat: updates

This commit is contained in:
qier222 2023-03-03 03:12:27 +08:00
parent 9a52681687
commit 840a5b8e9b
No known key found for this signature in database
104 changed files with 1645 additions and 13494 deletions

View file

@ -8,10 +8,12 @@ import BasicContextMenu from '../ContextMenus/BasicContextMenu'
import { AnimatePresence } from 'framer-motion'
import toast from 'react-hot-toast'
import { useTranslation } from 'react-i18next'
import { useNavigate } from 'react-router-dom'
const Avatar = ({ className }: { className?: string }) => {
const { data: user } = useUser()
const { t } = useTranslation()
const navigate = useNavigate()
const avatarUrl = user?.profile?.avatarUrl
? resizeImage(user?.profile?.avatarUrl ?? '', 'sm')
@ -36,10 +38,7 @@ const Avatar = ({ className }: { className?: string }) => {
}
setShowMenu(true)
}}
className={cx(
'app-region-no-drag rounded-full',
className || 'h-12 w-12'
)}
className={cx('app-region-no-drag rounded-full', className || 'h-12 w-12')}
/>
<AnimatePresence>
{avatarRef.current && showMenu && (
@ -63,7 +62,7 @@ const Avatar = ({ className }: { className?: string }) => {
type: 'item',
label: t`settings.settings`,
onClick: () => {
toast('开发中')
navigate('/settings')
},
},
{