mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-07-12 05:07:31 +08:00
feat(local-music): 支持从本地列表移除单曲并防止扫描失败误删(#713)
- 右键菜单新增'从本地列表移除'(本地歌曲自动切换文案,仅移除条目不删文件,5 语言文案)
- localMusic store 新增 removeEntry action
- 扫描失败的文件夹不再参与'已删除清理',避免移动盘/网络盘暂时不可用时整夹歌曲被误删
- 注:'刷新不清理已删除歌曲'主症状已由 c28368f 修复,本次补齐评论区诉求与防护
Closes #713
This commit is contained in:
@@ -59,6 +59,12 @@ const userStore = useUserStore();
|
||||
// 后者不具备响应性,登录/登出后菜单禁用状态不会刷新(#706)
|
||||
const hasRealAuth = computed(() => !!userStore.user && userStore.loginType !== 'uid');
|
||||
|
||||
// 本地歌曲:移除菜单项显示"从本地列表移除"而非"从歌单中删除"(#713)
|
||||
const isLocalSong = computed(
|
||||
() =>
|
||||
typeof props.item.playMusicUrl === 'string' && props.item.playMusicUrl.startsWith('local://')
|
||||
);
|
||||
|
||||
// 渲染歌曲预览
|
||||
const renderSongPreview = () => {
|
||||
return h(
|
||||
@@ -198,7 +204,9 @@ const dropdownOptions = computed<MenuOption[]>(() => {
|
||||
key: 'd2'
|
||||
},
|
||||
{
|
||||
label: t('songItem.menu.removeFromPlaylist'),
|
||||
label: isLocalSong.value
|
||||
? t('localMusic.removeFromLibrary')
|
||||
: t('songItem.menu.removeFromPlaylist'),
|
||||
key: 'remove',
|
||||
icon: () => h('i', { class: 'iconfont ri-delete-bin-line' })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user