refactor: 根级 src/src-tauri/server 布局 + 设置左导航搜索 + 语言切换 + DataGrip 高亮 + 断连横幅移除

This commit is contained in:
logan committed 2026-10-14 20:51:59 +08:00
1 parent 456fa6954b
commit b3542cb458
32 files changed
+148 -58

No files matched your search

+6 -6
View File
@@ -10,14 +10,14 @@
# ./run.sh stop|restart|status|help
#
# 产品形态:浏览器 = 官网/docs;操作 = 桌面 Tauri。
# apps/web 的 Vite 仅作桌面打包/devUrl 源,不要用浏览器当工作台。
# src 的 Vite 仅作桌面打包/devUrl 源,不要用浏览器当工作台。
set -euo pipefail
PROJECT_NAME="OpsxDB"
SERVER_PORT="${OPSXDB_SERVER_PORT:-8788}"
WEB_PORT="${OPSXDB_WEB_PORT:-5174}"
SERVER_DIR="apps/server"
SERVER_DIR="server"
SERVER_BIN="opsxdb-server"
SERVER_LABEL="com.opsx.db.server"
WEB_LABEL="com.opsx.db.web"
@@ -119,9 +119,9 @@ ensure_npm() {
warning "缺少 node_modules,正在 npm install..."
npm install
fi
if [ ! -d "$SCRIPT_DIR/apps/desktop/node_modules" ]; then
if [ ! -d "$SCRIPT_DIR/node_modules" ]; then
warning "desktop 缺少依赖,正在安装..."
npm --prefix "$SCRIPT_DIR/apps/desktop" install
npm install
fi
}
@@ -183,7 +183,7 @@ start_vite_for_desktop() {
ensure_npm
kill_port "$WEB_PORT"
# Vite 用 nohup:launchctl submit 在本机对 npm -w 经常交不出进程(web.log 空、40s 超时)
nohup /bin/bash -lc "export PATH=\"$NODE_BIN_DIR:/opt/homebrew/bin:/usr/local/bin:\$PATH\"; cd \"$SCRIPT_DIR\" && exec npm run dev -w @opsxdb/web" >>"$WEB_LOG" 2>&1 </dev/null &
nohup /bin/bash -lc "export PATH=\"$NODE_BIN_DIR:/opt/homebrew/bin:/usr/local/bin:\$PATH\"; cd \"$SCRIPT_DIR\" && exec npm run" >>"$WEB_LOG" 2>&1 </dev/null &
wait_http "http://127.0.0.1:$WEB_PORT/" "Web UI" 80
success "桌面 UI(Vite) UP http://127.0.0.1:${WEB_PORT}(请用 ./run.sh gui,勿当工作台)"
}
@@ -264,7 +264,7 @@ package_desktop() {
error "无法检测 rustc host triple"
return 1
fi
local bin_dir="$SCRIPT_DIR/apps/desktop/src-tauri/binaries"
local bin_dir="$SCRIPT_DIR/src-tauri/binaries"
mkdir -p "$bin_dir"
cp "$SCRIPT_DIR/$SERVER_DIR/bin/$SERVER_BIN" "$bin_dir/opsxdb-server-$triple"
chmod +x "$bin_dir/opsxdb-server-$triple"