feat(local-music): 支持从本地列表移除单曲并防止扫描失败误删(#713)

- 右键菜单新增'从本地列表移除'(本地歌曲自动切换文案,仅移除条目不删文件,5 语言文案)
- localMusic store 新增 removeEntry action
- 扫描失败的文件夹不再参与'已删除清理',避免移动盘/网络盘暂时不可用时整夹歌曲被误删
- 注:'刷新不清理已删除歌曲'主症状已由 c28368f 修复,本次补齐评论区诉求与防护

Closes #713
This commit is contained in:
alger
2026-07-05 14:35:00 +08:00
parent 2d693cee17
commit 3fc25ba9a4
8 changed files with 70 additions and 7 deletions
@@ -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' })
}