feat: 完成短剧项目空间与结构化资产创作闭环 (#38)
* feat(canvas): 短剧项目空间 - 建立项目章节与画布关联 MVP * feat(canvas): 短剧项目空间 - 完善项目资产、镜头与流程闭环 Refs #30 * fix(deploy): 本地部署 - 修复前端构建并忽略本地 PostgreSQL 配置 * feat(*): 短剧项目空间 - 完成项目、章节、资产、角色与画布创作闭环 Refs #30 --------- Co-authored-by: ddCat <ddcat666@88.com>
This commit is contained in:
16
web/src/lib/settings-navigation.ts
Normal file
16
web/src/lib/settings-navigation.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
export type SettingsSection = "channels" | "models" | "preferences" | "storage";
|
||||
|
||||
export function settingsPath(section: SettingsSection = "channels", continueCreation = false) {
|
||||
const params = new URLSearchParams({ section });
|
||||
if (continueCreation) params.set("continue", "1");
|
||||
return `/settings?${params.toString()}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* 画布深层组件没有路由上下文出口时统一跳转到正式设置页,避免重新引入全局配置弹窗。
|
||||
*/
|
||||
export function navigateToSettings(options?: { section?: SettingsSection; continueCreation?: boolean }) {
|
||||
const to = settingsPath(options?.section, options?.continueCreation);
|
||||
const event = new CustomEvent<{ to: string }>("workspace:navigate", { detail: { to }, cancelable: true });
|
||||
if (window.dispatchEvent(event)) window.location.assign(to);
|
||||
}
|
||||
Reference in New Issue
Block a user