feat: 前端支持平台子路径,托管时从平台登录进入

This commit is contained in:
2026-11-03 12:30:24 +08:00
parent c38e649904
commit 5d4b86c558
17 changed files with 271 additions and 53 deletions
+7 -2
View File
@@ -1,8 +1,13 @@
import { appUrl } from "./base";
export let installed: boolean | null = null;
export let hosted = false;
export async function refreshInstalled() {
const response = await fetch("/api/install/status");
installed = Boolean((await response.json()).installed);
const response = await fetch(appUrl("/api/install/status"), { cache: "no-store" });
const status = (await response.json()) as { installed?: boolean; hosted?: boolean };
installed = Boolean(status.installed);
hosted = Boolean(status.hosted);
return installed;
}