Skip to content

Commit b32408b

Browse files
committed
✨ feat: 歌单列表相添加布局切换、播放全部、收藏、添加到播放列表
1 parent 3c792ce commit b32408b

File tree

7 files changed

+498
-41
lines changed

7 files changed

+498
-41
lines changed

src/i18n/lang/en-US/comp.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,17 @@ export default {
104104
},
105105
musicList: {
106106
searchSongs: 'Search Songs',
107-
noSearchResults: 'No search results'
107+
noSearchResults: 'No search results',
108+
switchToNormal: 'Switch to normal layout',
109+
switchToCompact: 'Switch to compact layout',
110+
playAll: 'Play All',
111+
collect: 'Collect',
112+
collectSuccess: 'Collect Success',
113+
cancelCollectSuccess: 'Cancel Collect Success',
114+
cancelCollect: 'Cancel Collect',
115+
addToPlaylist: 'Add to Playlist',
116+
addToPlaylistSuccess: 'Add to Playlist Success',
117+
operationFailed: 'Operation Failed',
118+
songsAlreadyInPlaylist: 'Songs already in playlist'
108119
}
109120
};

src/i18n/lang/zh-CN/comp.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ export default {
102102
},
103103
musicList: {
104104
searchSongs: '搜索歌曲',
105-
noSearchResults: '没有找到相关歌曲'
105+
noSearchResults: '没有找到相关歌曲',
106+
switchToNormal: '切换到默认布局',
107+
switchToCompact: '切换到紧凑布局',
108+
playAll: '播放全部',
109+
collect: '收藏',
110+
collectSuccess: '收藏成功',
111+
cancelCollectSuccess: '取消收藏成功',
112+
operationFailed: '操作失败',
113+
cancelCollect: '取消收藏',
114+
addToPlaylist: '添加到播放列表',
115+
addToPlaylistSuccess: '添加到播放列表成功',
116+
songsAlreadyInPlaylist: '歌曲已存在于播放列表中'
106117
}
107118
};

src/renderer/api/music.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,11 @@ export function getPlaylistDetail(id: string) {
201201
}
202202
});
203203
}
204+
205+
export function subscribePlaylist(params: { t: number; id: number }) {
206+
return request({
207+
url: '/playlist/subscribe',
208+
method: 'post',
209+
params
210+
});
211+
}

0 commit comments

Comments
 (0)