File tree Expand file tree Collapse file tree 4 files changed +23
-5
lines changed Expand file tree Collapse file tree 4 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export default {
6
6
} ,
7
7
playlist : {
8
8
created : 'Created Playlists' ,
9
+ mine : 'Mine' ,
9
10
trackCount : '{count} tracks' ,
10
11
playCount : 'Played {count} times'
11
12
} ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export default {
6
6
} ,
7
7
playlist : {
8
8
created : '创建的歌单' ,
9
+ mine : '我创建的' ,
9
10
trackCount : '{count}首' ,
10
11
playCount : '播放{count}次'
11
12
} ,
Original file line number Diff line number Diff line change @@ -159,9 +159,9 @@ const fetchUserPlaylists = async () => {
159
159
return ;
160
160
}
161
161
162
- const res = await getUserPlaylist (user .userId );
162
+ const res = await getUserPlaylist (user .userId , 999 );
163
163
if (res .data ?.playlist ) {
164
- playlists .value = res .data .playlist ;
164
+ playlists .value = res .data .playlist . filter (( item : any ) => item . userId === user . userId ) ;
165
165
}
166
166
} catch (error ) {
167
167
console .error (' 获取歌单失败:' , error );
Original file line number Diff line number Diff line change 43
43
preview-disabled
44
44
/>
45
45
<div class =" play-list-item-info" >
46
- <div class =" play-list-item-name" >{{ item.name }}</div >
46
+ <div class =" play-list-item-name" >
47
+ {{ item.name }}
48
+ <div v-if =" item.creator.userId === user.userId" class =" playlist-creator-tag" >
49
+ {{ t('user.playlist.mine') }}
50
+ </div >
51
+ </div >
47
52
<div class =" play-list-item-count" >
48
53
{{ t('user.playlist.trackCount', { count: item.trackCount }) }},{{
49
54
t('user.playlist.playCount', { count: item.playCount })
@@ -353,11 +358,22 @@ const showFollowList = () => {
353
358
}
354
359
355
360
& -info {
356
- @apply ml- 2;
361
+ @apply ml-2 flex- 1 ;
357
362
}
358
363
359
364
& -name {
360
- @apply text-gray-900 dark :text- white text- base;
365
+ @apply text-gray-900 dark :text- white text- base flex items- center gap- 2;
366
+
367
+ .playlist-creator-tag {
368
+ @apply inline-flex items-center justify-center px-2 rounded-full text-xs ;
369
+ @apply bg-light-300 text-primary dark :bg- dark- 300 dark :text- white;
370
+ @apply border border-primary /20 dark :border- primary/ 30 ;
371
+ height : 18px ;
372
+ font-size : 10px ;
373
+ font-weight : 500 ;
374
+ backdrop-filter : blur (4px );
375
+ -webkit-backdrop-filter : blur (4px );
376
+ }
361
377
}
362
378
363
379
& -count {
You can’t perform that action at this time.
0 commit comments