diff --git a/src/renderer/components/common/BilibiliItem.vue b/src/renderer/components/common/BilibiliItem.vue deleted file mode 100644 index 19d8fe3..0000000 --- a/src/renderer/components/common/BilibiliItem.vue +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - {{ formatDuration(item.duration) }} - - - - {{ item.author }} - - {{ formatNumber(item.view) }} - {{ formatNumber(item.danmaku) }} - - - - - - - - diff --git a/src/renderer/components/common/DonationList.vue b/src/renderer/components/common/DonationList.vue index b43243d..189e1b6 100644 --- a/src/renderer/components/common/DonationList.vue +++ b/src/renderer/components/common/DonationList.vue @@ -1,102 +1,139 @@ - - - - {{ t('donation.description') }} - {{ t('donation.message') }} - + + + + + {{ t('donation.description') }} + + + - + {{ t('donation.toDonateList') }} - - - - {{ t('common.alipay') }} - - - - - {{ t('common.wechat') }} - - - - {{ t('donation.title') }} - - - - - {{ t('donation.refresh') }} - - - - + + + - - - - - - - {{ donor.name }} - - - {{ donor.date }} - + + + + + {{ t('common.alipay') }} + - - - - - - {{ donor.message }} - - - - - - {{ donor.message }} - - - - - - - - {{ t('donation.noMessage') }} + + + + + + + {{ t('common.wechat') }} - - - - - - {{ isExpanded ? t('common.collapse') : t('common.expand') }} - + + + + + + {{ t('donation.title') }} + + + + {{ t('donation.refresh') }} + + + + + + + + + + + + + + + + + + + {{ donor.name }} + + + ¥{{ donor.amount }} + + + + + + + + + "{{ donor.message }}" + + + {{ donor.message }} + + + {{ donor.date }} + + + + + + diff --git a/src/renderer/components/common/MusicListNavigator.ts b/src/renderer/components/common/MusicListNavigator.ts index 6d33bf4..c67135b 100644 --- a/src/renderer/components/common/MusicListNavigator.ts +++ b/src/renderer/components/common/MusicListNavigator.ts @@ -13,7 +13,7 @@ export function navigateToMusicList( id?: string | number; type?: 'album' | 'playlist' | 'dailyRecommend' | string; name: string; - songList: any[]; + songList?: any[]; listInfo?: any; canRemove?: boolean; } @@ -23,7 +23,11 @@ export function navigateToMusicList( // 如果是每日推荐,不需要设置 musicStore,直接从 recommendStore 获取 if (type !== 'dailyRecommend') { - musicStore.setCurrentMusicList(songList, name, listInfo, canRemove); + if (songList) { + musicStore.setCurrentMusicList(songList, name, listInfo, canRemove); + } else { + musicStore.setBasicListInfo(name, listInfo, canRemove); + } } else { // 确保 musicStore 的数据被清空,避免显示旧的列表 musicStore.clearCurrentMusicList(); diff --git a/src/renderer/components/common/ResponsiveModal.vue b/src/renderer/components/common/ResponsiveModal.vue index 96a4443..641cb63 100644 --- a/src/renderer/components/common/ResponsiveModal.vue +++ b/src/renderer/components/common/ResponsiveModal.vue @@ -14,11 +14,7 @@ diff --git a/src/renderer/components/common/SearchItem.vue b/src/renderer/components/common/SearchItem.vue index b1b1751..dab44f5 100644 --- a/src/renderer/components/common/SearchItem.vue +++ b/src/renderer/components/common/SearchItem.vue @@ -1,26 +1,56 @@ - - + + + - - + + + + + + + + + + + + {{ item.size }} - - {{ item.name }} - {{ item.desc }} - - - - - {{ item.size }} + + + + + {{ item.name }} + + + {{ item.desc }} + + diff --git a/src/renderer/components/common/SongItem.vue b/src/renderer/components/common/SongItem.vue index d7957aa..65aec43 100644 --- a/src/renderer/components/common/SongItem.vue +++ b/src/renderer/components/common/SongItem.vue @@ -20,6 +20,7 @@ import { computed } from 'vue'; import type { SongResult } from '@/types/music'; import CompactSongItem from './songItemCom/CompactSongItem.vue'; +import HomeSongItem from './songItemCom/HomeSongItem.vue'; import ListSongItem from './songItemCom/ListSongItem.vue'; import MiniSongItem from './songItemCom/MiniSongItem.vue'; import StandardSongItem from './songItemCom/StandardSongItem.vue'; @@ -30,6 +31,7 @@ const props = withDefaults( mini?: boolean; list?: boolean; compact?: boolean; + home?: boolean; favorite?: boolean; selectable?: boolean; selected?: boolean; @@ -41,6 +43,7 @@ const props = withDefaults( mini: false, list: false, compact: false, + home: false, favorite: true, selectable: false, selected: false, @@ -57,6 +60,7 @@ const renderComponent = computed(() => { if (props.mini) return MiniSongItem; if (props.list) return ListSongItem; if (props.compact) return CompactSongItem; + if (props.home) return HomeSongItem; return StandardSongItem; }); diff --git a/src/renderer/components/common/songItemCom/CompactSongItem.vue b/src/renderer/components/common/songItemCom/CompactSongItem.vue index af3d002..27d4196 100644 --- a/src/renderer/components/common/songItemCom/CompactSongItem.vue +++ b/src/renderer/components/common/songItemCom/CompactSongItem.vue @@ -204,24 +204,24 @@ const formatDuration = (ms: number): string => { } &-title { - @apply flex-[2.5] min-w-0 text-sm cursor-pointer text-gray-900 dark:text-white; + @apply flex-[2.5] min-w-0 text-sm cursor-pointer text-gray-900 dark:text-white flex items-center; } &-artist { - @apply flex-[1.5] min-w-0 text-sm text-gray-500 dark:text-gray-400; + @apply flex-[1.5] min-w-0 text-sm text-gray-500 dark:text-gray-400 flex items-center; } &-album { - @apply flex-[1.5] min-w-0 text-sm text-gray-500 dark:text-gray-400; + @apply flex-[1.5] min-w-0 text-sm text-gray-500 dark:text-gray-400 flex items-center; } &-duration { - @apply w-14 flex-shrink-0 text-sm text-gray-500 dark:text-gray-400 justify-end; + @apply w-14 flex-shrink-0 text-sm text-gray-500 dark:text-gray-400 flex items-center justify-end; } } .song-item-operating-compact { - @apply border-none bg-transparent gap-2 flex items-center; + @apply border-none bg-transparent gap-3 flex items-center justify-end min-w-[160px]; .song-item-operating-like, .song-item-operating-play, diff --git a/src/renderer/components/common/songItemCom/HomeSongItem.vue b/src/renderer/components/common/songItemCom/HomeSongItem.vue new file mode 100644 index 0000000..0b5ff2c --- /dev/null +++ b/src/renderer/components/common/songItemCom/HomeSongItem.vue @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + {{ item.name }} + + + + + {{ artist.name }} + + / + + + + + + + + + + + + + + + + +
{{ item.author }}
{{ t('donation.description') }}
{{ t('donation.message') }}
+ {{ t('donation.description') }} +
{{ item.name }}
{{ item.desc }}
+ {{ item.desc }} +