* fix: 限制FMCard上的歌名长度

避免曲名过长将其他部分顶出卡片外

* fix: Library取词逻辑

* fix: 歌词页面Player UI

* fix: 搜索页面专辑发布日期

* fix: 修复私人FM启动时总是加载新的数据,导致数据过多的问题

* update

* 更改FM的初始化顺序

* Update player.ts

* fix: 将FMCard的歌名长度限制为两行
This commit is contained in:
memorydream 2022-04-10 23:37:36 +08:00 committed by GitHub
parent 70d1de0e0f
commit a95524ff34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 21 deletions

View file

@ -29,8 +29,11 @@ const PlayingTrack = () => {
() => playerSnapshot.trackListSource,
[playerSnapshot.trackListSource]
)
const hasListSource = playerSnapshot.mode !== PlayerMode.FM && trackListSource?.type
const toTrackListSource = () => {
if (!trackListSource?.type) return
if (!hasListSource) return
navigate(`/${trackListSource.type}/${trackListSource.id}`)
state.uiStates.showLyricPanel = false
@ -40,19 +43,24 @@ const PlayingTrack = () => {
<div>
<div
onClick={toTrackListSource}
className='line-clamp-1 text-[22px] font-semibold text-white hover:underline'
className={classNames(
'line-clamp-1 text-[22px] font-semibold text-white',
hasListSource && 'hover:underline'
)}
>
{track?.name}
</div>
<div className='line-clamp-1 -mt-0.5 inline-flex max-h-7 text-white opacity-60'>
<ArtistInline artists={track?.ar ?? []} />
<span>
{' '}
-{' '}
<span onClick={toAlbum} className='hover:underline'>
{track?.al.name}
{!!track?.al?.id && (
<span>
{' '}
-{' '}
<span onClick={toAlbum} className='hover:underline'>
{track?.al.name}
</span>
</span>
</span>
)}
</div>
</div>
)