From 5bdf5722a132f708ba29512ed8aa5b30fcac40df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=A1=E5=A4=8D=E4=B9=A0?= <2353956224@qq.com> Date: Fri, 17 Apr 2026 16:32:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Etk=E7=89=88=20=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=A7=81=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PermissionMask.vue | 11 +- src/layout/WorkbenchLayout.vue | 145 ++---- src/pages/LoginPage.vue | 1 + src/types/electron.d.ts | 6 +- src/utils/storage.js | 10 +- src/views/auto-dm/AutoDmTkWorkbench.vue | 576 +++++++++--------------- 6 files changed, 275 insertions(+), 474 deletions(-) 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 @@