添加歌曲列表更新操作的二次确认

This commit is contained in:
lyswhut 2022-06-15 09:22:53 +08:00
parent aa568c339a
commit 4dc6d0aaac
4 changed files with 10 additions and 1 deletions

View File

@ -6,6 +6,7 @@
### 优化
- 支持mg源的歌词翻译之前添加的歌曲需要去设置清空缓存才会刷新歌词
- 添加歌曲列表更新操作的二次确认
### 修复

View File

@ -67,6 +67,7 @@
"list_select_single": "Single Select",
"list_select_unall": "Reverse Selection",
"list_sync": "Update",
"list_sync_confirm_tip": "This will replace the songs in {{name}} with the songs in the online list, are you sure you want to update?",
"list_update_error": "Update failed",
"list_update_success": "Update completed",
"load_failed": "Ah, loading failed 😥",

View File

@ -68,6 +68,7 @@
"list_select_single": "单选",
"list_select_unall": "反选",
"list_sync": "更新",
"list_sync_confirm_tip": "这将会把 {{name}} 内的歌曲替换成在线列表的歌曲,你确认要更新吗?",
"list_update_error": "更新失败",
"list_update_success": "更新成功",
"load_failed": "啊 加载失败了 😥",

View File

@ -261,7 +261,13 @@ const List = memo(({ setVisiblePanel, currentList, handleCancelMultiSelect }) =>
handleImportAndExportList('export', selectedListRef.current.index)
break
case 'sync':
handleSyncSourceList(selectedListRef.current.index)
confirmDialog({
message: t('list_sync_confirm_tip', { name: selectedListRef.current.name }),
confirmButtonText: t('list_remove_tip_button'),
}).then(isSync => {
if (!isSync) return
handleSyncSourceList(selectedListRef.current.index)
})
break
// case 'changePosition':