diff --git a/src/components/PermissionMask.vue b/src/components/PermissionMask.vue index 48ad210..4d1508b 100644 --- a/src/components/PermissionMask.vue +++ b/src/components/PermissionMask.vue @@ -93,7 +93,7 @@ const props = defineProps({ permissionKey: { type: String, required: true, - validator: (value) => ['bigBrother', 'crawl', 'webAi'].includes(value) + validator: (value) => ['bigBrother', 'crawl', 'webAi', 'autotk'].includes(value) }, title: { type: String, @@ -120,11 +120,17 @@ const visibleIndices = ref([]) const visibleContacts = ref([]) const guardKey = computed(() => `guard_${props.permissionKey}_${Date.now()}`) +const effectivePermissionKey = computed(() => { + if (props.permissionKey === 'webAi' && props.title.includes('TK')) { + return 'autotk' + } + return props.permissionKey +}) const permissionsData = ref(getPermissions()) const hasAccess = computed(() => { - return permissionsData.value[props.permissionKey] === 1 + return permissionsData.value[effectivePermissionKey.value] === 1 }) const pickRandomIndices = (sourceIndices, count) => { @@ -175,6 +181,7 @@ const refreshPage = async () => { bigBrother: res.bigBrother, crawl: res.crawl, webAi: res.webAi, + autotk: res.autotk ?? res.autoTK, }); } } diff --git a/src/layout/WorkbenchLayout.vue b/src/layout/WorkbenchLayout.vue index dae2de1..5605bf3 100644 --- a/src/layout/WorkbenchLayout.vue +++ b/src/layout/WorkbenchLayout.vue @@ -1,10 +1,7 @@