fix: code review 修复两处 bug 并优化启动提示

- fix(setup.bat): 修复 Node.js 解压路径错误
  xcopy 来源从 %TEMP%\node-v22-win-x64\* 改为
  %TEMP%\node-extract\node-v22-win-x64\*,
  否则解压后 xcopy 找不到文件,Node.js 安装必然失败
- fix(Config.html): 点击「启动 OpenClaw」后 toast 改为
  「配置已保存!请关闭此页面,回到启动窗口使用 U-Claw」,
  避免用户误以为点击后会自动启动而一直等待
  (portable / usb-release / u-claw-app 三个版本同步)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hfshfg
2026-04-01 09:48:44 +08:00
parent 3f6f960ffc
commit 4dac1ae4ab
4 changed files with 4 additions and 4 deletions

View File

@@ -613,7 +613,7 @@ async function launchOpenClaw() {
}
// 3. Launch
showToast('正在启动 OpenClaw...');
showToast('配置已保存!请关闭此页面,回到启动窗口使用 U-Claw');
try { await fetch('/api/done', { method: 'POST' }); } catch(e) {}
}
</script>

View File

@@ -46,7 +46,7 @@ if !errorlevel! neq 0 (
echo 解压中...
mkdir "%NODE_DIR%" 2>nul
powershell -command "Expand-Archive -Path '%TEMP%\%NODE_ZIP%' -DestinationPath '%TEMP%\node-extract' -Force"
xcopy /s /e /q /y "%TEMP%\node-%NODE_VER%-win-x64\*" "%NODE_DIR%\" >nul
xcopy /s /e /q /y "%TEMP%\node-extract\node-%NODE_VER%-win-x64\*" "%NODE_DIR%\" >nul
rmdir /s /q "%TEMP%\node-extract" 2>nul
del "%TEMP%\%NODE_ZIP%" 2>nul

View File

@@ -613,7 +613,7 @@ async function launchOpenClaw() {
}
// 3. Launch
showToast('正在启动 OpenClaw...');
showToast('配置已保存!请关闭此页面,回到启动窗口使用 U-Claw');
try { await fetch('/api/done', { method: 'POST' }); } catch(e) {}
}
</script>

View File

@@ -613,7 +613,7 @@ async function launchOpenClaw() {
}
// 3. Launch
showToast('正在启动 OpenClaw...');
showToast('配置已保存!请关闭此页面,回到启动窗口使用 U-Claw');
try { await fetch('/api/done', { method: 'POST' }); } catch(e) {}
}
</script>