mirror of https://github.com/halo-dev/halo
feat: improve built-in auth providers' i18n in detail page (#6816)
#### What type of PR is this? /area ui /kind improvement /milestone 2.20.x #### What this PR does / why we need it: 完善内置的认证提供商详情页面的 i18n,在 https://github.com/halo-dev/halo/pull/6814 中遗漏了详情页面。 <img width="653" alt="image" src="https://github.com/user-attachments/assets/7d4b4789-91d0-45e5-b5e7-98324ddc0899"> #### Does this PR introduce a user-facing change? ```release-note None ```pull/6817/head
parent
d0f3933095
commit
53b3124288
|
@ -136,15 +136,36 @@ const handleSaveConfigMap = async () => {
|
||||||
await handleFetchConfigMap();
|
await handleFetchConfigMap();
|
||||||
saving.value = false;
|
saving.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const displayName = computed(() => {
|
||||||
|
if (!authProvider.value) {
|
||||||
|
return t("core.common.status.loading");
|
||||||
|
}
|
||||||
|
|
||||||
|
return t(
|
||||||
|
`core.identity_authentication.fields.display_name.${authProvider.value?.metadata.name}`,
|
||||||
|
authProvider.value?.spec.displayName || ""
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
const description = computed(() => {
|
||||||
|
if (!authProvider.value) {
|
||||||
|
return t("core.common.status.loading");
|
||||||
|
}
|
||||||
|
|
||||||
|
return t(
|
||||||
|
`core.identity_authentication.fields.description.${authProvider.value?.metadata.name}`,
|
||||||
|
authProvider.value?.spec.description || ""
|
||||||
|
);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VPageHeader :title="authProvider?.spec.displayName">
|
<VPageHeader :title="displayName">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<VAvatar
|
<VAvatar
|
||||||
v-if="authProvider"
|
:src="authProvider?.spec.logo"
|
||||||
:src="authProvider.spec.logo"
|
:alt="authProvider?.spec.displayName"
|
||||||
:alt="authProvider.spec.displayName"
|
|
||||||
class="mr-2"
|
class="mr-2"
|
||||||
size="sm"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
|
@ -168,13 +189,13 @@ const handleSaveConfigMap = async () => {
|
||||||
:label="
|
:label="
|
||||||
$t('core.identity_authentication.detail.fields.display_name')
|
$t('core.identity_authentication.detail.fields.display_name')
|
||||||
"
|
"
|
||||||
:content="authProvider?.spec.displayName"
|
:content="displayName"
|
||||||
/>
|
/>
|
||||||
<VDescriptionItem
|
<VDescriptionItem
|
||||||
:label="
|
:label="
|
||||||
$t('core.identity_authentication.detail.fields.description')
|
$t('core.identity_authentication.detail.fields.description')
|
||||||
"
|
"
|
||||||
:content="authProvider?.spec.description"
|
:content="description"
|
||||||
/>
|
/>
|
||||||
<VDescriptionItem
|
<VDescriptionItem
|
||||||
:label="$t('core.identity_authentication.detail.fields.website')"
|
:label="$t('core.identity_authentication.detail.fields.website')"
|
||||||
|
|
|
@ -76,13 +76,13 @@ const handleChangeStatus = async () => {
|
||||||
<VEntityField
|
<VEntityField
|
||||||
:title="
|
:title="
|
||||||
$t(
|
$t(
|
||||||
`core.identity_authentication.list.fields.display_name.${authProvider.name}`,
|
`core.identity_authentication.fields.display_name.${authProvider.name}`,
|
||||||
authProvider.displayName
|
authProvider.displayName
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
:description="
|
:description="
|
||||||
$t(
|
$t(
|
||||||
`core.identity_authentication.list.fields.description.${authProvider.name}`,
|
`core.identity_authentication.fields.description.${authProvider.name}`,
|
||||||
authProvider.description || ''
|
authProvider.description || ''
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
|
|
@ -1135,7 +1135,6 @@ core:
|
||||||
title: Disable identity authentication method
|
title: Disable identity authentication method
|
||||||
disable_privileged:
|
disable_privileged:
|
||||||
tooltip: The authentication method reserved by the system cannot be disabled
|
tooltip: The authentication method reserved by the system cannot be disabled
|
||||||
list:
|
|
||||||
fields:
|
fields:
|
||||||
display_name:
|
display_name:
|
||||||
local: Login with credentials
|
local: Login with credentials
|
||||||
|
|
|
@ -1063,7 +1063,6 @@ core:
|
||||||
title: 停用认证方式
|
title: 停用认证方式
|
||||||
disable_privileged:
|
disable_privileged:
|
||||||
tooltip: 系统保留的认证方式,无法禁用
|
tooltip: 系统保留的认证方式,无法禁用
|
||||||
list:
|
|
||||||
fields:
|
fields:
|
||||||
display_name:
|
display_name:
|
||||||
local: 账号密码登录
|
local: 账号密码登录
|
||||||
|
|
|
@ -1040,7 +1040,6 @@ core:
|
||||||
title: 停用認證方式
|
title: 停用認證方式
|
||||||
disable_privileged:
|
disable_privileged:
|
||||||
tooltip: 系統保留的認證方式,無法禁用
|
tooltip: 系統保留的認證方式,無法禁用
|
||||||
list:
|
|
||||||
fields:
|
fields:
|
||||||
display_name:
|
display_name:
|
||||||
local: 帳號密碼登入
|
local: 帳號密碼登入
|
||||||
|
|
Loading…
Reference in New Issue