e9c3dc1120
保留 SpacetimeDB 历史表、迁移白名单与旧业务源码 切换前端 active 入口并解除旧创作页面和路由编译链 移除旧后端路由、worker 与纯业务 crate 依赖 收敛 SpacetimeDB 模块为历史数据壳 同步 Nginx、Pingora、验证门禁与架构文档
26 lines
836 B
TypeScript
26 lines
836 B
TypeScript
import type { SelectionStage } from '../components/platform-entry/platformEntryActiveTypes';
|
|
import { setHostAppTitle } from './host-bridge/hostBridge';
|
|
|
|
const APP_TITLE_BRAND = '陶泥儿';
|
|
export const APP_HOME_TITLE =
|
|
'陶泥儿 Genarrative|美术编辑器与项目工作台';
|
|
|
|
const APP_TITLE_BY_SELECTION_STAGE: Record<SelectionStage, string> = {
|
|
platform: APP_HOME_TITLE,
|
|
project: '项目 - 陶泥儿',
|
|
'image-editor': '美术编辑器 - 陶泥儿',
|
|
};
|
|
|
|
export function resolveAppTitleForSelectionStage(stage: SelectionStage) {
|
|
return APP_TITLE_BY_SELECTION_STAGE[stage];
|
|
}
|
|
|
|
export function syncAppTitle(title: string) {
|
|
const normalizedTitle = title.trim() || APP_TITLE_BRAND;
|
|
if (typeof document !== 'undefined') {
|
|
document.title = normalizedTitle;
|
|
}
|
|
|
|
void setHostAppTitle({ title: normalizedTitle });
|
|
}
|