diff --git a/src/i18n/lang/en-US/user.ts b/src/i18n/lang/en-US/user.ts index 49b7f5d..90bf1d8 100644 --- a/src/i18n/lang/en-US/user.ts +++ b/src/i18n/lang/en-US/user.ts @@ -6,6 +6,7 @@ export default { }, playlist: { created: 'Created Playlists', + mine: 'Mine', trackCount: '{count} tracks', playCount: 'Played {count} times' }, diff --git a/src/i18n/lang/zh-CN/user.ts b/src/i18n/lang/zh-CN/user.ts index cb847a4..778187a 100644 --- a/src/i18n/lang/zh-CN/user.ts +++ b/src/i18n/lang/zh-CN/user.ts @@ -6,6 +6,7 @@ export default { }, playlist: { created: '创建的歌单', + mine: '我创建的', trackCount: '{count}首', playCount: '播放{count}次' }, diff --git a/src/renderer/components/common/PlaylistDrawer.vue b/src/renderer/components/common/PlaylistDrawer.vue index e83193c..8b1b815 100644 --- a/src/renderer/components/common/PlaylistDrawer.vue +++ b/src/renderer/components/common/PlaylistDrawer.vue @@ -159,9 +159,9 @@ const fetchUserPlaylists = async () => { return; } - const res = await getUserPlaylist(user.userId); + const res = await getUserPlaylist(user.userId, 999); if (res.data?.playlist) { - playlists.value = res.data.playlist; + playlists.value = res.data.playlist.filter((item: any) => item.userId === user.userId); } } catch (error) { console.error('获取歌单失败:', error); diff --git a/src/renderer/views/user/index.vue b/src/renderer/views/user/index.vue index 6993573..b0ea052 100644 --- a/src/renderer/views/user/index.vue +++ b/src/renderer/views/user/index.vue @@ -43,7 +43,12 @@ preview-disabled />
-
{{ item.name }}
+
+ {{ item.name }} +
+ {{ t('user.playlist.mine') }} +
+
{{ t('user.playlist.trackCount', { count: item.trackCount }) }},{{ t('user.playlist.playCount', { count: item.playCount }) @@ -353,11 +358,22 @@ const showFollowList = () => { } &-info { - @apply ml-2; + @apply ml-2 flex-1; } &-name { - @apply text-gray-900 dark:text-white text-base; + @apply text-gray-900 dark:text-white text-base flex items-center gap-2; + + .playlist-creator-tag { + @apply inline-flex items-center justify-center px-2 rounded-full text-xs; + @apply bg-light-300 text-primary dark:bg-dark-300 dark:text-white; + @apply border border-primary/20 dark:border-primary/30; + height: 18px; + font-size: 10px; + font-weight: 500; + backdrop-filter: blur(4px); + -webkit-backdrop-filter: blur(4px); + } } &-count {