refactor(desktop): SaaS URL 集中配置化,消除 5 处硬编码
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- 新增 .env.development / .env.production (VITE_SAAS_URL) - saasStore.ts / LoginPage.tsx / saas-client.ts / SaaSLogin.tsx 统一读取 import.meta.env.VITE_SAAS_URL - 移除 LoginPage 中未使用的 isTauriRuntime import
This commit is contained in:
@@ -128,9 +128,7 @@ export type SaaSStore = SaaSStateSlice & SaaSActionsSlice;
|
||||
|
||||
// === Constants ===
|
||||
|
||||
const DEFAULT_SAAS_URL = import.meta.env.DEV
|
||||
? 'http://127.0.0.1:8080'
|
||||
: 'https://saas.zclaw.com';
|
||||
const DEFAULT_SAAS_URL = import.meta.env.VITE_SAAS_URL || 'http://127.0.0.1:8080';
|
||||
|
||||
// === Helpers ===
|
||||
|
||||
|
||||
Reference in New Issue
Block a user