From 337c06b339b2715a1a8168a4e600f50e0bcbf23d Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 17 Jan 2025 08:37:12 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20feat:=20=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0token.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/vben5/apps/app-antd/src/locales/index.ts | 3 ++- .../app-antd/src/locales/langs/en-US/component.json | 3 +++ .../app-antd/src/locales/langs/zh-CN/component.json | 3 +++ apps/vben5/apps/app-antd/src/preferences.ts | 1 + .../packages/effects/hooks/src/use-app-config.ts | 11 +++++++++-- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/vben5/apps/app-antd/src/locales/index.ts b/apps/vben5/apps/app-antd/src/locales/index.ts index c71aba29e..60e61112a 100644 --- a/apps/vben5/apps/app-antd/src/locales/index.ts +++ b/apps/vben5/apps/app-antd/src/locales/index.ts @@ -16,7 +16,7 @@ import antdEnLocale from 'ant-design-vue/es/locale/en_US'; import antdDefaultLocale from 'ant-design-vue/es/locale/zh_CN'; import dayjs from 'dayjs'; -import { getLocalizationApi } from '#/api/core'; +import { useAbpConfigApi } from '#/api/core/useAbpConfigApi'; const antdLocale = ref(antdDefaultLocale); @@ -101,6 +101,7 @@ async function loadAntdLocale(lang: SupportedLanguagesType) { */ async function loadAbpLocale(lang: SupportedLanguagesType) { const abpStore = useAbpStore(); + const { getLocalizationApi } = useAbpConfigApi(); let localization = abpStore.localization; if (lang !== localization?.currentCulture.cultureName) { diff --git a/apps/vben5/apps/app-antd/src/locales/langs/en-US/component.json b/apps/vben5/apps/app-antd/src/locales/langs/en-US/component.json index 51e47b151..ec06e040c 100644 --- a/apps/vben5/apps/app-antd/src/locales/langs/en-US/component.json +++ b/apps/vben5/apps/app-antd/src/locales/langs/en-US/component.json @@ -116,5 +116,8 @@ "requiresAllDesc": "If checked, you need to have all the selected permissions.", "permissions": "Required Permissions" } + }, + "table": { + "selectedItemWellBeDeleted": "Multiple items selected will be deleted!" } } diff --git a/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/component.json b/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/component.json index b3eaaf65c..4a14cb108 100644 --- a/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/component.json +++ b/apps/vben5/apps/app-antd/src/locales/langs/zh-CN/component.json @@ -116,5 +116,8 @@ "requiresAllDesc": "如果勾选,则需要拥有所有选择的权限.", "permissions": "需要的权限" } + }, + "table": { + "selectedItemWellBeDeleted": "选择的多个项目将被删除!" } } diff --git a/apps/vben5/apps/app-antd/src/preferences.ts b/apps/vben5/apps/app-antd/src/preferences.ts index b2e9ace43..498967adc 100644 --- a/apps/vben5/apps/app-antd/src/preferences.ts +++ b/apps/vben5/apps/app-antd/src/preferences.ts @@ -8,6 +8,7 @@ import { defineOverridesPreferences } from '@vben/preferences'; export const overridesPreferences = defineOverridesPreferences({ // overrides app: { + enableRefreshToken: true, name: import.meta.env.VITE_APP_TITLE, }, }); diff --git a/apps/vben5/packages/effects/hooks/src/use-app-config.ts b/apps/vben5/packages/effects/hooks/src/use-app-config.ts index dfe1e28d6..a07404d72 100644 --- a/apps/vben5/packages/effects/hooks/src/use-app-config.ts +++ b/apps/vben5/packages/effects/hooks/src/use-app-config.ts @@ -15,11 +15,18 @@ export function useAppConfig( ? window._VBEN_ADMIN_PRO_APP_CONF_ : (env as VbenAdminProAppConfigRaw); - const { VITE_GLOB_API_URL, VITE_GLOB_CLIENT_ID, VITE_GLOB_CLIENT_SECRET } = - config; + const { + VITE_GLOB_API_URL, + VITE_GLOB_AUTHORITY, + VITE_GLOB_AUDIENCE, + VITE_GLOB_CLIENT_ID, + VITE_GLOB_CLIENT_SECRET, + } = config; return { apiURL: VITE_GLOB_API_URL, + authority: VITE_GLOB_AUTHORITY, + audience: VITE_GLOB_AUDIENCE, clientId: VITE_GLOB_CLIENT_ID, clientSecret: VITE_GLOB_CLIENT_SECRET, };