From 322530e45fe22ddd9ea1ba88ca49ad5a368ae4fb Mon Sep 17 00:00:00 2001 From: Seven Date: Tue, 20 Jan 2026 07:09:11 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E5=92=8C=E6=8F=8F=E8=BF=B0=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E8=B0=B7=E6=AD=8C=E9=AA=8C=E8=AF=81=E5=92=8C=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=B5=81=E7=A8=8B=E4=BB=A5=E6=94=AF=E6=8C=81=E4=BA=8C?= =?UTF-8?q?=E6=AD=A5=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 +- src/components/common/google-auth.vue | 3 +- .../global-header/components/user-avatar.vue | 42 +++++++---- src/service/api/auth.ts | 4 +- src/store/modules/auth/index.ts | 75 ++++++++++++++----- vite.config.ts | 8 +- 6 files changed, 99 insertions(+), 37 deletions(-) diff --git a/.env b/.env index 95434f6..ae680af 100644 --- a/.env +++ b/.env @@ -2,9 +2,9 @@ # if use a sub directory, it must be end with "/", like "/admin/" but not "/admin" VITE_BASE_URL=/ -VITE_APP_TITLE=RiwsanAdmin +VITE_APP_TITLE=Financial -VITE_APP_DESC=RiwsanAdmin is trade palatform admin system +VITE_APP_DESC=Financial is trade palatform admin system # the prefix of the icon name VITE_ICON_PREFIX=icon diff --git a/src/components/common/google-auth.vue b/src/components/common/google-auth.vue index 6af3a36..202bdf5 100644 --- a/src/components/common/google-auth.vue +++ b/src/components/common/google-auth.vue @@ -20,6 +20,7 @@ const totpCode = ref(''); const loading = ref(false); const verifying = ref(false); const disabling = ref(false); +const { VITE_APP_TITLE } = import.meta.env; function generateQRCode(url: string) { return `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(url)}`; @@ -35,7 +36,7 @@ async function enableTwoFactor() { const { data } = await safeClient( authClient.twoFactor.enable({ password: props.password, - issuer: 'my-app-name' + issuer: VITE_APP_TITLE || 'financial-admin' }) ); loading.value = false; diff --git a/src/layouts/modules/global-header/components/user-avatar.vue b/src/layouts/modules/global-header/components/user-avatar.vue index ad712b3..f099a85 100644 --- a/src/layouts/modules/global-header/components/user-avatar.vue +++ b/src/layouts/modules/global-header/components/user-avatar.vue @@ -1,7 +1,7 @@