From 64aa048807515db6c17ad3823374496c73cb9386 Mon Sep 17 00:00:00 2001 From: GouJ Date: Sat, 26 Sep 2026 21:03:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BB=E5=AF=BC=E8=88=AA=E6=8C=89?= =?UTF-8?q?=E5=88=B6=E4=BD=9C=E9=98=B6=E6=AE=B5=E6=98=BE=E7=A4=BA=E5=8F=AF?= =?UTF-8?q?=E7=94=A8=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/App.vue b/src/App.vue index 6975327..956cbab 100644 --- a/src/App.vue +++ b/src/App.vue @@ -99,8 +99,8 @@ const { preference, theme, overrides } = useTheme() const projectId = computed(() => String(route.params.projectId || '')) const projectAccess = shallowRef(null) provide(projectAccessKey, projectAccess) -const workflowsUnlocked = computed( - () => projectAccess.value?.projectId === projectId.value && projectAccess.value.completed +const currentProjectAccess = computed(() => + projectAccess.value?.projectId === projectId.value ? projectAccess.value : null ) const apiBase = import.meta.env.VITE_API_BASE_URL || '/api' const workflowItems = [ @@ -135,7 +135,8 @@ const menuOptions = computed(() => { ? [ { type: 'divider' as const, key: 'divider' }, ...workflowItems.map(([path, label, icon]) => { - const disabled = path !== 'create-drama' && !workflowsUnlocked.value + const sectionAccess = currentProjectAccess.value?.sections[path] + const disabled = sectionAccess ? !sectionAccess.enabled : path !== 'create-drama' const target = '/projects/' + projectId.value + '/' + path return { key: target, @@ -144,7 +145,7 @@ const menuOptions = computed(() => { disabled ? h( 'span', - { class: 'admin-menu-label', title: '剧本完成后可用', 'aria-disabled': 'true' }, + { class: 'admin-menu-label', title: sectionAccess?.reason || '请先完成前面的制作步骤', 'aria-disabled': 'true' }, label ) : h(RouterLink, { to: target }, () => @@ -229,11 +230,11 @@ const menuOptions = computed(() => { block class="admin-settings-button" :class="{ 'is-collapsed': collapsed }" - aria-label="后端连接" + aria-label="连接设置" @click="openSettings" > - 后端连接 + 连接设置 @@ -261,7 +262,7 @@ const menuOptions = computed(() => {
- +
API 地址