This commit is contained in:
Rizky 2024-01-25 16:14:53 +07:00
parent ce4b1a5f7a
commit 57b4bf9c24
3 changed files with 25 additions and 19 deletions

View File

@ -4,7 +4,6 @@ import { fetchViaProxy } from "../proxy";
export const loadApiProxyDef = async (_url: string, with_types: boolean) => {
const url = trim(_url, "/");
console.log(url, _url);
const raw = await fetchViaProxy(urlPath(url, "/_prasi/_"));
let ver = "";
if (raw && (raw as any).prasi) {

View File

@ -21,6 +21,8 @@ export default page({
return <Loading note="init" />;
}
w.isEditor = true;
if (!edInitSync(p)) {
return <Loading note="connecting-ws" />;
}

View File

@ -7,6 +7,7 @@ import { ViRoot } from "./root";
import { ErrorBox } from "./utils/error-box";
import { render_stat } from "./render/render";
const w = window as any;
export const Vi: FC<{
meta: Record<string, IMeta>;
mode: "mobile" | "desktop";
@ -36,6 +37,10 @@ export const Vi: FC<{
}) => {
const vi = useGlobal(ViGlobal, "VI");
vi.mode = mode;
w.isMobile = mode === "mobile";
w.isDesktop = mode === "desktop";
vi.on_status_changes = on_status_changed;
if (rs === "disabled") {