mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-30 04:40:18 +08:00
feat: multi-OpenClaw CLI detection/binding + i18n infrastructure
Multi-OpenClaw Detection & Binding: - Add resolve_openclaw_cli_path() and classify_cli_source() in utils.rs - Support openclawCliPath binding in clawpanel.json (user selects CLI) - VersionInfo now includes cli_path, cli_source, all_installations - scan_all_installations() detects all OpenClaw installs on system - Dashboard shows CLI source label + multi-install warning - Settings page: CLI binding UI with auto-detect and manual selection - dev-api.js synced with cli_path/cli_source fields for Web mode i18n Infrastructure: - Create src/lib/i18n.js core module (t(), setLang(), initI18n()) - Create src/locales/zh-CN.json and src/locales/en.json - Sidebar fully i18n-ized (nav labels, sections, instance switcher) - Dashboard stat cards fully i18n-ized - Settings page: language switcher UI (live reload) - initI18n() called in main.js on startup
This commit is contained in:
@@ -21,4 +21,18 @@ pub struct VersionInfo {
|
||||
pub ahead_of_recommended: bool,
|
||||
pub panel_version: String,
|
||||
pub source: String,
|
||||
/// 当前实际使用的 CLI 完整路径
|
||||
pub cli_path: Option<String>,
|
||||
/// CLI 安装来源标签: standalone / npm-zh / npm-official / unknown
|
||||
pub cli_source: Option<String>,
|
||||
/// 所有检测到的 OpenClaw 安装(路径 + 来源 + 版本)
|
||||
pub all_installations: Option<Vec<OpenClawInstallation>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct OpenClawInstallation {
|
||||
pub path: String,
|
||||
pub source: String,
|
||||
pub version: Option<String>,
|
||||
pub active: bool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user