diff --git a/publish/changeLog.md b/publish/changeLog.md index d9813f9..722f6b4 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -6,6 +6,7 @@ ### 优化 - 支持mg源的歌词翻译(之前添加的歌曲需要去设置清空缓存才会刷新歌词) +- 添加歌曲列表更新操作的二次确认 ### 修复 diff --git a/src/lang/en_us.json b/src/lang/en_us.json index 2b4fd89..e4f7b68 100644 --- a/src/lang/en_us.json +++ b/src/lang/en_us.json @@ -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 😥", diff --git a/src/lang/zh_cn.json b/src/lang/zh_cn.json index 62c4a7d..5dd6133 100644 --- a/src/lang/zh_cn.json +++ b/src/lang/zh_cn.json @@ -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": "啊 加载失败了 😥", diff --git a/src/screens/Home/List/components/MyList.js b/src/screens/Home/List/components/MyList.js index 6956a82..e6a0674 100644 --- a/src/screens/Home/List/components/MyList.js +++ b/src/screens/Home/List/components/MyList.js @@ -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':