add staging env
Some checks failed
Deploy / build-and-deploy (push) Has been cancelled

This commit is contained in:
2025-09-04 18:11:16 +08:00
parent 8ce1c87dff
commit 095626b857
7 changed files with 16 additions and 12 deletions

4
src/env.d.ts vendored
View File

@@ -1,5 +1,7 @@
interface ImportMetaEnv {
readonly MODE: "production" | "development" | "none"
readonly PUBLIC_WEB_URL: string
readonly PUBLIC_BASE_URL: string
readonly PUBLIC_ADMIN_URL: string
}
interface ImportMeta {

View File

@@ -35,15 +35,9 @@ export const STORAGE_KEY = {
FONTSIZE: "web-fontsize",
}
export const ADMIN_URL =
import.meta.env.MODE === "development"
? "http://localhost:8000/admin"
: "https://web.xuyue.cc/admin"
export const ADMIN_URL = import.meta.env.PUBLIC_ADMIN_URL
export const BASE_URL =
import.meta.env.MODE === "development"
? "http://localhost:8000/api"
: "https://web.xuyue.cc/api"
export const BASE_URL = import.meta.env.PUBLIC_BASE_URL
export enum TASK_TYPE {
Tutorial = "tutorial",