From e5442fa24ad9a4896da7e3d8e171eb576e7ae040 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 9 Nov 2026 16:49:53 +0800 Subject: [PATCH] fix: portal auth setting --- .../portal-setting/components/ButtonPortalAuthSetting.vue | 7 ++++--- .../settings/authentication/components/LoginSetting.vue | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ui/src/views/system/chat-management/portal-setting/components/ButtonPortalAuthSetting.vue b/ui/src/views/system/chat-management/portal-setting/components/ButtonPortalAuthSetting.vue index 40b181d2357..b06e8911654 100644 --- a/ui/src/views/system/chat-management/portal-setting/components/ButtonPortalAuthSetting.vue +++ b/ui/src/views/system/chat-management/portal-setting/components/ButtonPortalAuthSetting.vue @@ -2,7 +2,8 @@ import { computed, reactive, ref, useTemplateRef } from 'vue' import type { FormInstance, FormRules } from 'element-plus' import { LOGIN_METHOD } from '@/api/enums' -import type { PortalAuthConfig, PortalSetting, PortalSettingPayload } from '@/api/types' +import { LOGIN_METHOD_LABELS } from '@/constants' +import type { LoginMethod, PortalAuthConfig, PortalSetting, PortalSettingPayload } from '@/api/types' const props = defineProps<{ disabled: boolean; setting: PortalSetting; saving: boolean; save: (payload: PortalSettingPayload) => Promise }>() @@ -115,7 +116,7 @@ defineExpose({ open }) - {{ loginMethodOption.label }} + {{ LOGIN_METHOD_LABELS[loginMethodOption.value as LoginMethod] || loginMethodOption.label }} @@ -125,7 +126,7 @@ defineExpose({ open }) v-for="loginMethodOption in defaultLoginMethodOptions" :key="loginMethodOption.value" :value="loginMethodOption.value" - :label="loginMethodOption.label" + :label="LOGIN_METHOD_LABELS[loginMethodOption.value as LoginMethod] || loginMethodOption.label" /> diff --git a/ui/src/views/system/settings/authentication/components/LoginSetting.vue b/ui/src/views/system/settings/authentication/components/LoginSetting.vue index aae724083c6..e2928680278 100644 --- a/ui/src/views/system/settings/authentication/components/LoginSetting.vue +++ b/ui/src/views/system/settings/authentication/components/LoginSetting.vue @@ -4,9 +4,10 @@ import { pick } from 'lodash' import CurrentUserApi from '@/api/admin/auth/current-user' import AuthSettingApi from '@/api/admin/system/settings/auth-setting' import UserGroupsApi from '@/api/admin/system/user-groups' -import type { ListItem, LoginAuthSettingPayload, SystemUserGroup } from '@/api/types' +import type { ListItem, LoginAuthSettingPayload, LoginMethod, SystemUserGroup } from '@/api/types' import type { FormInstance, FormRules } from 'element-plus' import { LOGIN_METHOD, ROLE_TYPE } from '@/api/enums' +import { LOGIN_METHOD_LABELS } from '@/constants' import { MsgSuccess } from '@/utils/message' import { useStore } from '@/stores' import perm from '@/permission' @@ -171,7 +172,7 @@ onActivated(() => { - {{ loginMethodOption.label }} + {{ LOGIN_METHOD_LABELS[loginMethodOption.value as LoginMethod] || loginMethodOption.label }} @@ -182,7 +183,7 @@ onActivated(() => { v-for="loginMethodOption in defaultLoginMethodOptions" :key="loginMethodOption.value" :value="loginMethodOption.value" - :label="loginMethodOption.label" + :label="LOGIN_METHOD_LABELS[loginMethodOption.value as LoginMethod] || loginMethodOption.label" />