f9d8142068
启动客户端时先检查平台登录态,未登录展示登录页,登录后进入启动器首页 独立客户端登录使用平台 auth 接口并对 refresh 做并发去重 Tauri 开发启动改为短命令 agc:serve,并先拉起配套 SpacetimeDB 与 api-server AGC Vite 代理读取 dev-stack 状态并暴露本地 marker,复用时校验 API target 恢复启动器项目目录输入、最近项目刷新移除和非空文件夹提醒交互 补充启动器和登录 gate 测试,并更新 AI 游戏创作 App 开发文档
27 lines
710 B
TypeScript
27 lines
710 B
TypeScript
import React from 'react';
|
|
import { createRoot } from 'react-dom/client';
|
|
|
|
import { App, AuthenticatedClient, WorkspaceLauncher } from './App';
|
|
import './styles.css';
|
|
|
|
function shouldRenderMainApp() {
|
|
const params = new URLSearchParams(window.location.search);
|
|
return (
|
|
params.has('main') || params.has('dev') || window.location.hash === '#dev'
|
|
);
|
|
}
|
|
|
|
createRoot(document.getElementById('root') as HTMLElement).render(
|
|
<React.StrictMode>
|
|
<AuthenticatedClient>
|
|
{({ user, logout }) =>
|
|
shouldRenderMainApp() ? (
|
|
<App />
|
|
) : (
|
|
<WorkspaceLauncher currentUser={user} onLogout={logout} />
|
|
)
|
|
}
|
|
</AuthenticatedClient>
|
|
</React.StrictMode>,
|
|
);
|