feat: updates

This commit is contained in:
qier222 2023-01-28 11:54:57 +08:00
parent 7ce516877e
commit ccebe0a67a
No known key found for this signature in database
74 changed files with 56065 additions and 2810 deletions

View file

@ -3,6 +3,8 @@ import useAppleMusicArtist from '@/web/api/hooks/useAppleMusicArtist'
import { cx, css } from '@emotion/css'
import { useTranslation } from 'react-i18next'
import i18next from 'i18next'
import { useState } from 'react'
import DescriptionViewer from '@/web/components/DescriptionViewer'
const ArtistInfo = ({ artist, isLoading }: { artist?: Artist; isLoading: boolean }) => {
const { t, i18n } = useTranslation()
@ -12,6 +14,10 @@ const ArtistInfo = ({ artist, isLoading }: { artist?: Artist; isLoading: boolean
artist?.id || 0
)
const [isOpenDescription, setIsOpenDescription] = useState(false)
const description =
artistFromApple?.artistBio?.[i18n.language.replace('-', '_')] || artist?.briefDesc
return (
<div>
{/* Name */}
@ -61,15 +67,23 @@ const ArtistInfo = ({ artist, isLoading }: { artist?: Artist; isLoading: boolean
) : (
<div
className={cx(
'line-clamp-5 mt-6 text-14 font-bold text-white/40',
css`
height: 86px;
`
'line-clamp-5 mt-6 overflow-hidden whitespace-pre-wrap text-14 font-bold text-white/40 transition-colors duration-500 hover:text-white/60'
// css`
// height: 86px;
// `
)}
onClick={() => setIsOpenDescription(true)}
>
{artistFromApple?.artistBio?.[i18n.language.replace('-', '_')] || artist?.briefDesc}
{description}
</div>
))}
<DescriptionViewer
description={description || ''}
isOpen={isOpenDescription}
onClose={() => setIsOpenDescription(false)}
title={artist?.name || ''}
/>
</div>
)
}

View file

@ -79,7 +79,7 @@ const CollectionTabs = ({ showBg }: { showBg: boolean }) => {
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
className={cx(
'pointer-events-none fixed top-0 right-0 left-10 z-10 hidden lg:block',
'pointer-events-none fixed top-0 right-0 left-10 z-10',
css`
height: 230px;
background-repeat: repeat;