fix(short-drama-agent-front): 修复资产库请求与管理流程
This commit is contained in:
1 parent
41d1cfe3ed
commit
f8b0fbb8ca
10 files changed
+672
-77
No files matched your search
@@ -9,7 +9,7 @@ import { NScrollbar, NButton, NPageHeader, NSpin, NEllipsis, NSkeleton } from 'n
|
||||
import { EmptyState, WorkspaceRefreshButton } from '../../components/ui'
|
||||
import { projectContextKey, useProjectData } from './context'
|
||||
import { getOperation, operationErrorText } from '../workflows/operations'
|
||||
import { projectAccessKey, projectSectionFromPath, type ProjectAccess } from './access'
|
||||
import { projectAccessKey, projectSectionFromPath, type ProjectAccess, type ProjectSectionAccess } from './access'
|
||||
import { useProjectStageAccess } from './useProjectStageAccess'
|
||||
import { useWorkflowExecution } from '../workflows/execution'
|
||||
import { clearEpisodeSourceInvalidations, invalidateEpisodeSource } from '../storyboard/model'
|
||||
@@ -116,8 +116,15 @@ watchEffect(() => {
|
||||
})
|
||||
const stageAccess = useProjectStageAccess(id, context.stageReadiness)
|
||||
const complete = stageAccess.scriptReady
|
||||
/** 当前路由所属的制作步骤;项目素材不是制作步骤。 */
|
||||
const currentSection = computed(() => projectSectionFromPath(route.path))
|
||||
const currentAccess = computed(() => {
|
||||
/** 仅正式项目素材路由独立开放,未知路由不能借null步骤绕过限制。 */
|
||||
const isProjectAssets = computed(
|
||||
() => route.path.replace(/\/+$/, '') === `/projects/${encodeURIComponent(id.value)}/assets`
|
||||
)
|
||||
/** 已知素材页可读取,具体写入仍由其项目互斥和归属检查决定。 */
|
||||
const currentAccess = computed<ProjectSectionAccess | null>(() => {
|
||||
if (isProjectAssets.value) return { enabled: true, reason: '' }
|
||||
const section = currentSection.value
|
||||
return section ? stageAccess.sections.value[section] : null
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user