Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
HUAHUAI23 committed Nov 13, 2024
1 parent b0bca12 commit bc401b3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/desktop/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
"realName_verification": "Real Name Verification",
"realname_auth_now": "Click to verify your name",
"realname_auth_reminder": "Real-name authentication reminder",
"realname_auth_reminder_desc": "Real-name verification is required for regions in China. Without real-name verification, top-up will be restricted. Successful real-name verification will be rewarded with a 5 yuan Sealos balance.",
"realname_auth_reminder_desc": "Real-name verification is required for regions in China. Without real-name verification, top-up will be restricted. Successful real-name verification will be rewarded with a {{reward}} Sealos balance.",
"realname_auth_tips_a": "1. Please ensure that the name, ID number and mobile phone number filled in are consistent.",
"realname_auth_tips_b": "2. The number segments provided by some virtual operators may not pass verification. Please apply for a work order and pass manual verification.",
"realname_info": "RealName",
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"realName_verification": "实名认证",
"realname_auth_now": "点击进行实名",
"realname_auth_reminder": "实名认证提醒",
"realname_auth_reminder_desc": "国内可用区需要实名认证,未实名认证将会被限制充值,实名认证成功奖励sealos余额5元",
"realname_auth_reminder_desc": "国内可用区需要实名认证,未实名认证将会被限制充值,实名认证成功奖励 Sealos 余额 {{reward}} 元。",
"realname_auth_tips_a": "1、请确保所填写的姓名、身份证号码和手机号码信息一致。",
"realname_auth_tips_b": "2、部分虚拟运营商提供的号段可能无法验证通过,请申请工单通过人工协助认证。",
"realname_info": "实名信息",
Expand Down
6 changes: 5 additions & 1 deletion frontend/desktop/src/components/account/RealNameModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ import { DeleteIcon, PictureIcon, UploadIcon, AttachmentIcon } from '../icons';

export function useRealNameAuthNotification(props?: UseToastOptions) {
const { t } = useTranslation();
const { commonConfig } = useConfigStore((s) => s);
const realNameReward = commonConfig?.realNameReward;

const realNameAuthNotification = useToast({
position: 'top',
Expand Down Expand Up @@ -108,7 +110,9 @@ export function useRealNameAuthNotification(props?: UseToastOptions) {
lineHeight="20px"
letterSpacing="0.25px"
>
{t('common:realname_auth_reminder_desc')}
{t('common:realname_auth_reminder_desc', {
reward: realNameReward
})}
<RealNameModal onFormSuccess={props.onClose}>
<Text
as="span"
Expand Down
1 change: 1 addition & 0 deletions frontend/desktop/src/pages/api/platform/getCommonConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function genResCommonClientConfig(common: CommonConfigType): CommonClientConfigT
return {
enterpriseRealNameAuthEnabled: !!common.enterpriseRealNameAuthEnabled,
realNameAuthEnabled: !!common.realNameAuthEnabled,
realNameReward: common.realNameReward || 0,
guideEnabled: !!common.guideEnabled,
rechargeEnabled: !!common.rechargeEnabled,
cfSiteKey: common.cfSiteKey || '',
Expand Down
2 changes: 2 additions & 0 deletions frontend/desktop/src/types/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export type CommonConfigType = {
enterpriseRealNameAuthEnabled: boolean;
enterpriseSupportingMaterials: string;
realNameAuthEnabled: boolean;
realNameReward: number;
guideEnabled: boolean;
apiEnabled: boolean;
rechargeEnabled: boolean;
Expand Down Expand Up @@ -206,6 +207,7 @@ export const DefaultCommonClientConfig: CommonClientConfigType = {
enterpriseRealNameAuthEnabled: false,
enterpriseSupportingMaterials: '',
realNameAuthEnabled: false,
realNameReward: 0,
guideEnabled: false,
rechargeEnabled: false,
cfSiteKey: ''
Expand Down

0 comments on commit bc401b3

Please sign in to comment.