feat: 优化网络绑定配置支持外部访问
主要修改点: 1. 网络绑定调整 - .env.example: WEB_HOST/VITE_WEB_HOST 从 127.0.0.1 改为 0.0.0.0 - server/src/app/core/config.py: 默认 web_host 从 127.0.0.1 改为 0.0.0.0 - web/package.json: Vite 脚本 host 从 127.0.0.1 改为 0.0.0.0 - web/vite.config.js: normalizeState 中 WEB_HOST 默认值从 127.0.0.1 改为 0.0.0.0 2. CORS 配置扩展 - .env.example: CORS_ORIGINS 添加 http://0.0.0.0:5173 3. Shell 脚本权限修复 - server/start.sh, start.sh: 添加可执行权限 (644 -> 755) 4. Setup 表单与验证逻辑简化 - web/src/composables/useSetupView.js: - 新增 readCurrentWebEndpoint() 从 window.location 自动检测当前 web host/port - 简化 runtimeInputsReady: 移除 web_host/web_port 必填验证,仅保留 server_host/server_port - 简化 buildRuntimeFingerprint(): 移除 web_host/web_port - buildPayload() 改用 readCurrentWebEndpoint() 解析 web 配置 - web/vite.config.js: - 新增 resolveRuntimePayload(): 运行时解析 web_host/web_port - 移除 validateRuntimePayload() 中的 web_host/web_port 字段验证 - 移除 testRuntimePorts() 中 web 端口冲突检测逻辑 - 移除 canReuseCurrentWebPort() 函数 5. CSS 清理 - web/src/assets/styles/views/setup-view.css: 移除未使用的 .setup-summary-grid 和 .setup-summary-item 样式
This commit is contained in:
@@ -426,46 +426,6 @@
|
||||
text-shadow: 0 2px 16px rgba(4, 9, 7, 0.22);
|
||||
}
|
||||
|
||||
.setup-summary-grid {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.setup-summary-item {
|
||||
padding: 16px 18px;
|
||||
border: 1px solid rgba(16, 185, 129, 0.14);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
background: rgba(248, 250, 252, 0.9);
|
||||
}
|
||||
|
||||
.setup-summary-item strong {
|
||||
display: block;
|
||||
color: #0f172a;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.setup-summary-item span {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
color: #64748b;
|
||||
font-size: 12px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.setup-summary-item .pi-check-circle {
|
||||
color: #10b981;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.setup-summary-item .pi-clock {
|
||||
color: #f59e0b;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.setup-error {
|
||||
margin-top: 22px;
|
||||
padding: 14px 16px;
|
||||
|
||||
Reference in New Issue
Block a user