mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 18:41:35 +08:00
fix(settings): run batch updates per-tool and lock actions while busy
Update All previously sent every tool to the backend as one script, where set -e (or errorlevel on Windows) aborts the whole batch on the first failure, skipping the rest and not refreshing versions for tools that did succeed. Run each tool as its own call instead: failures are isolated, each tool's version refreshes as soon as it finishes, and the result is summarized in a toast (success / partial / failure) listing which tools failed. Also derive an isAnyBusy flag and disable all install/update buttons, the refresh button and the WSL shell selectors while any action is running, so users can't trigger concurrent global npm/pip writes. Add the toolActionPartial i18n key (zh/en/ja).
This commit is contained in:
@@ -670,6 +670,7 @@
|
||||
"toolUpdate": "Update",
|
||||
"toolReady": "Ready",
|
||||
"toolActionDone": "{{action}} completed for {{count}} tool(s)",
|
||||
"toolActionPartial": "{{action}} succeeded for {{succeeded}}, failed for {{failed}}",
|
||||
"toolActionFailed": "Install/update command failed",
|
||||
"envBadge": {
|
||||
"wsl": "WSL",
|
||||
|
||||
@@ -670,6 +670,7 @@
|
||||
"toolUpdate": "更新",
|
||||
"toolReady": "準備完了",
|
||||
"toolActionDone": "{{count}} 個のツールの{{action}}が完了しました",
|
||||
"toolActionPartial": "{{succeeded}} 個成功、{{failed}} 個失敗({{action}})",
|
||||
"toolActionFailed": "インストール/更新コマンドの実行に失敗しました",
|
||||
"envBadge": {
|
||||
"wsl": "WSL",
|
||||
|
||||
@@ -670,6 +670,7 @@
|
||||
"toolUpdate": "升级",
|
||||
"toolReady": "已就绪",
|
||||
"toolActionDone": "{{count}} 个工具{{action}}完成",
|
||||
"toolActionPartial": "{{succeeded}} 个{{action}}成功,{{failed}} 个失败",
|
||||
"toolActionFailed": "安装/升级命令执行失败",
|
||||
"envBadge": {
|
||||
"wsl": "WSL",
|
||||
|
||||
Reference in New Issue
Block a user