From 8d0564008ae4e58e941bc4f8c906ccb54d558e38 Mon Sep 17 00:00:00 2001 From: nighca Date: Fri, 26 Jun 2026 11:22:19 +0800 Subject: [PATCH] Improve account admin route state --- spx-gui/src/apps/xbuilder/pages/admin/app.vue | 9 +++++++ .../src/apps/xbuilder/pages/admin/apps.vue | 18 ++++++++----- .../apps/xbuilder/pages/admin/audit-logs.vue | 24 ++++++++++------- .../src/apps/xbuilder/pages/admin/grant.vue | 12 +++++++++ .../src/apps/xbuilder/pages/admin/index.vue | 3 +++ .../src/apps/xbuilder/pages/admin/user.vue | 9 +++++++ .../src/apps/xbuilder/pages/admin/users.vue | 26 ++++++++++++------- 7 files changed, 77 insertions(+), 24 deletions(-) diff --git a/spx-gui/src/apps/xbuilder/pages/admin/app.vue b/spx-gui/src/apps/xbuilder/pages/admin/app.vue index 243b3e040..d7eeee2fd 100644 --- a/spx-gui/src/apps/xbuilder/pages/admin/app.vue +++ b/spx-gui/src/apps/xbuilder/pages/admin/app.vue @@ -5,6 +5,7 @@ import { RouterLink } from 'vue-router' import { useMessageHandle } from '@/utils/exception' import { useI18n } from '@/utils/i18n' import { useQuery } from '@/utils/query' +import { usePageTitle } from '@/utils/utils' import { useSignedInStateQuery } from '@/stores/user' import { UIButton, UIError, UILoading, UISwitch, UITextInput } from '@/components/ui' import CopyButton from '@/components/common/CopyButton.vue' @@ -39,6 +40,14 @@ const appQuery = useQuery( } ) const app = computed(() => appQuery.data.value) +usePageTitle(() => + app.value == null + ? { en: 'Account admin OAuth app', zh: '账号管理 OAuth 应用' } + : [ + { en: app.value.displayName, zh: app.value.displayName }, + { en: 'Account admin OAuth app', zh: '账号管理 OAuth 应用' } + ] +) const displayName = ref('') const status = ref('active') diff --git a/spx-gui/src/apps/xbuilder/pages/admin/apps.vue b/spx-gui/src/apps/xbuilder/pages/admin/apps.vue index 23d37ecb3..4f8c232dc 100644 --- a/spx-gui/src/apps/xbuilder/pages/admin/apps.vue +++ b/spx-gui/src/apps/xbuilder/pages/admin/apps.vue @@ -1,9 +1,11 @@