From d56a25eb3c20c4677861030afb2cd5bdf2411742 Mon Sep 17 00:00:00 2001 From: alger Date: Fri, 23 May 2025 20:08:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8=E7=94=A8=E6=88=B7=E6=AD=8C?= =?UTF-8?q?=E5=8D=95=E4=B8=AD=E6=B7=BB=E5=8A=A0=E2=80=9C=E6=88=91=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E7=9A=84=E2=80=9D=E6=A0=87=E7=AD=BE=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7=E6=AD=8C=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/en-US/user.ts | 1 + src/i18n/lang/zh-CN/user.ts | 1 + .../components/common/PlaylistDrawer.vue | 4 ++-- src/renderer/views/user/index.vue | 22 ++++++++++++++++--- 4 files changed, 23 insertions(+), 5 deletions(-) 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 {