From 44819280ce85c1e4161f36ed809440fda08a8ff0 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 11 Apr 2024 16:04:49 +0800 Subject: [PATCH] =?UTF-8?q?perf(X-Pack):=20=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E5=85=8D=E7=99=BB=E5=BD=95=E7=A6=81=E7=94=A8=E7=99=BB=E5=87=BA?= =?UTF-8?q?=E5=92=8C=E6=94=B9=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/layout/components/AccountOperator.vue | 12 +++++++++++- core/core-frontend/src/utils/logout.ts | 2 +- core/core-frontend/src/utils/utils.ts | 4 ++++ core/core-frontend/src/views/login/index.vue | 8 ++++++-- de-xpack | 2 +- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/core/core-frontend/src/layout/components/AccountOperator.vue b/core/core-frontend/src/layout/components/AccountOperator.vue index 141c35d4ee..3a3c1f7a8a 100644 --- a/core/core-frontend/src/layout/components/AccountOperator.vue +++ b/core/core-frontend/src/layout/components/AccountOperator.vue @@ -26,6 +26,8 @@ interface LinkItem { } const linkList = ref([{ id: 5, label: t('common.about'), method: 'toAbout' }] as LinkItem[]) +const inPlatformClient = computed(() => !!wsCache.get('de-platform-client')) + const logout = async () => { await logoutApi() logoutHandler() @@ -43,6 +45,14 @@ const xpackLinkLoaded = items => { } } items.forEach(item => linkList.value.push(item)) + if (inPlatformClient.value) { + len = linkList.value.length + while (len--) { + if (linkList.value[len]?.id === 2) { + linkList.value.splice(len, 1) + } + } + } linkList.value.sort(compare('id')) } @@ -153,7 +163,7 @@ if (uid.value === '1') { -