force show update notification modal & fix login page text (#3512)
* fix login page English text * update notification modal
This commit is contained in:
@@ -10,9 +10,6 @@
|
|||||||
"avatar_selection_exception": "Abnormal avatar selection",
|
"avatar_selection_exception": "Abnormal avatar selection",
|
||||||
"balance": "balance",
|
"balance": "balance",
|
||||||
"billing_standard": "Standards",
|
"billing_standard": "Standards",
|
||||||
"bind_notification_error": "Abnormal binding notification account",
|
|
||||||
"bind_notification_hint": "Please bind the notification receiving account to ensure that you can normally receive notifications such as package expiration reminders and ensure the normal operation of your services.",
|
|
||||||
"bind_notification_success": "Binding notification account successful",
|
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"change": "change",
|
"change": "change",
|
||||||
"choose_avatar": "Click to select avatar",
|
"choose_avatar": "Click to select avatar",
|
||||||
@@ -40,7 +37,6 @@
|
|||||||
"month": "moon",
|
"month": "moon",
|
||||||
"new_password": "New Password",
|
"new_password": "New Password",
|
||||||
"notification_receiving": "Notify",
|
"notification_receiving": "Notify",
|
||||||
"notification_receiving_hint": "Notification reception",
|
|
||||||
"old_password": "Old Password",
|
"old_password": "Old Password",
|
||||||
"openai_account_configuration": "OpenAI account configuration",
|
"openai_account_configuration": "OpenAI account configuration",
|
||||||
"openai_account_setting_exception": "Setting OpenAI account exception",
|
"openai_account_setting_exception": "Setting OpenAI account exception",
|
||||||
|
|||||||
@@ -1038,6 +1038,12 @@
|
|||||||
"support.user.User self info": "Profile",
|
"support.user.User self info": "Profile",
|
||||||
"support.user.auth.Sending Code": "Sending Code",
|
"support.user.auth.Sending Code": "Sending Code",
|
||||||
"support.user.captcha_placeholder": "Please enter the verification code",
|
"support.user.captcha_placeholder": "Please enter the verification code",
|
||||||
|
"support.user.info.notification_receiving_hint": "Notification reception",
|
||||||
|
"support.user.info.bind_notification_hint": "Please bind the notification receiving account to ensure that you can receive notifications such as package expiration reminders, etc., to ensure the normal operation of your service.",
|
||||||
|
"support.user.info.verification_code": "Verification Code",
|
||||||
|
"support.user.info.code_required": "Verification code cannot be empty",
|
||||||
|
"support.user.info.bind_notification_error": "Abnormal binding notification account",
|
||||||
|
"support.user.info.bind_notification_success": "Binding notification account successful",
|
||||||
"support.user.inform.System message": "System Message",
|
"support.user.inform.System message": "System Message",
|
||||||
"support.user.login.Email": "Email",
|
"support.user.login.Email": "Email",
|
||||||
"support.user.login.Github": "GitHub Login",
|
"support.user.login.Github": "GitHub Login",
|
||||||
@@ -1050,7 +1056,7 @@
|
|||||||
"support.user.login.Provider error": "Login Error, Please Try Again",
|
"support.user.login.Provider error": "Login Error, Please Try Again",
|
||||||
"support.user.login.Username": "Username",
|
"support.user.login.Username": "Username",
|
||||||
"support.user.login.Wechat": "WeChat Login",
|
"support.user.login.Wechat": "WeChat Login",
|
||||||
"support.user.login.can_not_login": "Cannot Log In, Click to Contact",
|
"support.user.login.can_not_login": "Cannot log in? Click here to contact us",
|
||||||
"support.user.login.error": "Login Error",
|
"support.user.login.error": "Login Error",
|
||||||
"support.user.login.security_failed": "Security Verification Failed",
|
"support.user.login.security_failed": "Security Verification Failed",
|
||||||
"support.user.login.wx_qr_login": "WeChat QR Code Login",
|
"support.user.login.wx_qr_login": "WeChat QR Code Login",
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
{
|
{
|
||||||
"Chinese_ip_tip": "It is detected that you are a mainland Chinese IP, click to jump to visit the mainland China version.",
|
"Chinese_ip_tip": "It is detected that you are a mainland Chinese IP, click to jump to visit the mainland China version.",
|
||||||
"Login": "Login",
|
"Login": "Login",
|
||||||
"agree": "agree",
|
"forget_password": "Find Password",
|
||||||
"cookies_tip": " This website uses cookies to provide a better service experience. By continuing to use the site, you agree to our Cookie Policy.",
|
|
||||||
"forget_password": "Find password",
|
|
||||||
"login_failed": "Login failed",
|
"login_failed": "Login failed",
|
||||||
"login_success": "Login successful",
|
"login_success": "Login successful",
|
||||||
"no_remind": "Don't remind again",
|
"no_remind": "Don't remind again",
|
||||||
"password_condition": "Password maximum 60 characters",
|
"password_condition": "Password maximum 60 characters",
|
||||||
"password_tip": "Password must be at least 6 characters long and contain at least two combinations: numbers, letters, or special characters",
|
"password_tip": "Password must be at least 6 characters long and contain at least two combinations: numbers, letters, or special characters",
|
||||||
"policy_tip": "By useing, you agree to our",
|
"policy_tip": "By using this service, you agree to our",
|
||||||
"privacy": "Privacy policy",
|
"privacy": "Privacy Policy",
|
||||||
"privacy_policy": "Privacy Policy",
|
|
||||||
"redirect": "Jump",
|
"redirect": "Jump",
|
||||||
"register": "Register",
|
"register": "Register",
|
||||||
"root_password_placeholder": "The root user password is the value of the environment variable DEFAULT_ROOT_PSW",
|
"root_password_placeholder": "The root user password is the value of the environment variable DEFAULT_ROOT_PSW",
|
||||||
"terms": "Terms",
|
"terms": "Terms",
|
||||||
"use_root_login": "Log in as root user"
|
"use_root_login": "Log in as root user",
|
||||||
|
"agree": "agree",
|
||||||
|
"cookies_tip": " This website uses cookies to provide a better service experience. By continuing to use the site, you agree to our Cookie Policy.",
|
||||||
|
"privacy_policy": "Privacy Policy"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
"login.Dingtalk": "DingTalk Login",
|
"login.Dingtalk": "DingTalk Login",
|
||||||
"manage_team": "Manage team",
|
"manage_team": "Manage team",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"notification.Bind Notification Pipe Hint": "Please bind a notification receiving account to ensure you receive notifications such as plan expiration reminders, ensuring your service runs smoothly.",
|
|
||||||
"notification.remind_owner_bind": "Please remind the creator to bind a notification account",
|
"notification.remind_owner_bind": "Please remind the creator to bind a notification account",
|
||||||
"operations": "Actions",
|
"operations": "Actions",
|
||||||
"owner": "owner",
|
"owner": "owner",
|
||||||
@@ -67,7 +66,7 @@
|
|||||||
"register.confirm": "Confirm Registration",
|
"register.confirm": "Confirm Registration",
|
||||||
"register.register_account": "Register {{account}} Account",
|
"register.register_account": "Register {{account}} Account",
|
||||||
"register.success": "Registration Successful",
|
"register.success": "Registration Successful",
|
||||||
"register.to_login": "Already have an account? Login",
|
"register.to_login": "Already have an account? Go to Login",
|
||||||
"search_user": "Search Username",
|
"search_user": "Search Username",
|
||||||
"sso_auth_failed": "SSO authentication failed",
|
"sso_auth_failed": "SSO authentication failed",
|
||||||
"synchronization.button": "Sync Now",
|
"synchronization.button": "Sync Now",
|
||||||
|
|||||||
@@ -10,9 +10,6 @@
|
|||||||
"avatar_selection_exception": "头像选择异常",
|
"avatar_selection_exception": "头像选择异常",
|
||||||
"balance": "余额",
|
"balance": "余额",
|
||||||
"billing_standard": "计费标准",
|
"billing_standard": "计费标准",
|
||||||
"bind_notification_error": "绑定通知账号异常",
|
|
||||||
"bind_notification_hint": "请绑定通知接收账号,以确保您能正常接收套餐过期提醒等通知,保障您的服务正常运行。",
|
|
||||||
"bind_notification_success": "绑定通知账号成功",
|
|
||||||
"cancel": "取消",
|
"cancel": "取消",
|
||||||
"change": "变更",
|
"change": "变更",
|
||||||
"choose_avatar": "点击选择头像",
|
"choose_avatar": "点击选择头像",
|
||||||
@@ -40,7 +37,6 @@
|
|||||||
"month": "月",
|
"month": "月",
|
||||||
"new_password": "新密码",
|
"new_password": "新密码",
|
||||||
"notification_receiving": "通知接收",
|
"notification_receiving": "通知接收",
|
||||||
"notification_receiving_hint": "通知接收",
|
|
||||||
"old_password": "旧密码",
|
"old_password": "旧密码",
|
||||||
"package_and_usage": "套餐与用量",
|
"package_and_usage": "套餐与用量",
|
||||||
"package_details": "套餐详情",
|
"package_details": "套餐详情",
|
||||||
|
|||||||
@@ -1042,6 +1042,12 @@
|
|||||||
"support.user.auth.Sending Code": "正在发送",
|
"support.user.auth.Sending Code": "正在发送",
|
||||||
"support.user.captcha_placeholder": "请输入验证码",
|
"support.user.captcha_placeholder": "请输入验证码",
|
||||||
"support.user.inform.System message": "系统消息",
|
"support.user.inform.System message": "系统消息",
|
||||||
|
"support.user.info.notification_receiving_hint": "通知接收",
|
||||||
|
"support.user.info.bind_notification_hint": "请绑定通知接收账号,以确保您能正常接收套餐过期提醒等通知,保障您的服务正常运行。",
|
||||||
|
"support.user.info.verification_code": "验证码",
|
||||||
|
"support.user.info.code_required": "验证码不能为空",
|
||||||
|
"support.user.info.bind_notification_success": "绑定通知账号成功",
|
||||||
|
"support.user.info.bind_notification_error": "绑定通知账号异常",
|
||||||
"support.user.login.Email": "邮箱",
|
"support.user.login.Email": "邮箱",
|
||||||
"support.user.login.Github": "GitHub 登录",
|
"support.user.login.Github": "GitHub 登录",
|
||||||
"support.user.login.Google": "Google 登录",
|
"support.user.login.Google": "Google 登录",
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
"login.Dingtalk": "钉钉登录",
|
"login.Dingtalk": "钉钉登录",
|
||||||
"manage_team": "管理团队",
|
"manage_team": "管理团队",
|
||||||
"name": "名称",
|
"name": "名称",
|
||||||
"notification.Bind Notification Pipe Hint": "请绑定通知接收账号,以确保您能正常接收套餐过期提醒等通知,保障您的服务正常运行。",
|
|
||||||
"notification.remind_owner_bind": "请提醒创建者绑定通知账号",
|
"notification.remind_owner_bind": "请提醒创建者绑定通知账号",
|
||||||
"operations": "操作",
|
"operations": "操作",
|
||||||
"owner": "所有者",
|
"owner": "所有者",
|
||||||
|
|||||||
@@ -10,9 +10,6 @@
|
|||||||
"avatar_selection_exception": "頭像選擇異常",
|
"avatar_selection_exception": "頭像選擇異常",
|
||||||
"balance": "餘額",
|
"balance": "餘額",
|
||||||
"billing_standard": "計費標準",
|
"billing_standard": "計費標準",
|
||||||
"bind_notification_error": "綁定通知帳號異常",
|
|
||||||
"bind_notification_hint": "請綁定通知接收帳號,確保您能正常接收套餐過期提醒等通知,保障您的服務正常運作。",
|
|
||||||
"bind_notification_success": "綁定通知帳號成功",
|
|
||||||
"cancel": "取消",
|
"cancel": "取消",
|
||||||
"change": "變更",
|
"change": "變更",
|
||||||
"choose_avatar": "點選選擇頭像",
|
"choose_avatar": "點選選擇頭像",
|
||||||
@@ -40,7 +37,6 @@
|
|||||||
"month": "月",
|
"month": "月",
|
||||||
"new_password": "新密碼",
|
"new_password": "新密碼",
|
||||||
"notification_receiving": "通知接收",
|
"notification_receiving": "通知接收",
|
||||||
"notification_receiving_hint": "通知接收",
|
|
||||||
"old_password": "舊密碼",
|
"old_password": "舊密碼",
|
||||||
"openai_account_configuration": "OpenAI 帳號配置",
|
"openai_account_configuration": "OpenAI 帳號配置",
|
||||||
"openai_account_setting_exception": "設定 OpenAI 帳號異常",
|
"openai_account_setting_exception": "設定 OpenAI 帳號異常",
|
||||||
|
|||||||
@@ -1039,6 +1039,12 @@
|
|||||||
"support.user.auth.Sending Code": "正在傳送驗證碼",
|
"support.user.auth.Sending Code": "正在傳送驗證碼",
|
||||||
"support.user.captcha_placeholder": "請輸入驗證碼",
|
"support.user.captcha_placeholder": "請輸入驗證碼",
|
||||||
"support.user.inform.System message": "系統訊息",
|
"support.user.inform.System message": "系統訊息",
|
||||||
|
"support.user.info.notification_receiving_hint": "通知接收",
|
||||||
|
"support.user.info.bind_notification_hint": "請綁定通知接收帳號,確保您能正常接收套餐過期提醒等通知,保障您的服務正常運作。",
|
||||||
|
"support.user.info.verification_code": "驗證碼",
|
||||||
|
"support.user.info.code_required": "驗證碼不能為空",
|
||||||
|
"support.user.info.bind_notification_success": "綁定通知帳號成功",
|
||||||
|
"support.user.info.bind_notification_error": "綁定通知帳號異常",
|
||||||
"support.user.login.Email": "電子郵件",
|
"support.user.login.Email": "電子郵件",
|
||||||
"support.user.login.Github": "GitHub 登入",
|
"support.user.login.Github": "GitHub 登入",
|
||||||
"support.user.login.Google": "Google 登入",
|
"support.user.login.Google": "Google 登入",
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
"login.Dingtalk": "釘釘登入",
|
"login.Dingtalk": "釘釘登入",
|
||||||
"manage_team": "管理團隊",
|
"manage_team": "管理團隊",
|
||||||
"name": "名稱",
|
"name": "名稱",
|
||||||
"notification.Bind Notification Pipe Hint": "請綁定通知接收帳號,以確保您能正常接收方案到期提醒等通知,保障您的服務正常運作。",
|
|
||||||
"notification.remind_owner_bind": "請提醒建立者綁定通知帳號",
|
"notification.remind_owner_bind": "請提醒建立者綁定通知帳號",
|
||||||
"operations": "操作",
|
"operations": "操作",
|
||||||
"owner": "擁有者",
|
"owner": "擁有者",
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ const UpdateInviteModal = dynamic(() => import('@/components/support/user/team/U
|
|||||||
const NotSufficientModal = dynamic(() => import('@/components/support/wallet/NotSufficientModal'));
|
const NotSufficientModal = dynamic(() => import('@/components/support/wallet/NotSufficientModal'));
|
||||||
const SystemMsgModal = dynamic(() => import('@/components/support/user/inform/SystemMsgModal'));
|
const SystemMsgModal = dynamic(() => import('@/components/support/user/inform/SystemMsgModal'));
|
||||||
const ImportantInform = dynamic(() => import('@/components/support/user/inform/ImportantInform'));
|
const ImportantInform = dynamic(() => import('@/components/support/user/inform/ImportantInform'));
|
||||||
|
const UpdateNotification = dynamic(
|
||||||
|
() => import('@/components/support/user/inform/UpdateNotificationModal')
|
||||||
|
);
|
||||||
|
|
||||||
const pcUnShowLayoutRoute: Record<string, boolean> = {
|
const pcUnShowLayoutRoute: Record<string, boolean> = {
|
||||||
'/': true,
|
'/': true,
|
||||||
@@ -50,7 +53,7 @@ const Layout = ({ children }: { children: JSX.Element }) => {
|
|||||||
const { Loading } = useLoading();
|
const { Loading } = useLoading();
|
||||||
const { loading, feConfigs, isNotSufficientModal } = useSystemStore();
|
const { loading, feConfigs, isNotSufficientModal } = useSystemStore();
|
||||||
const { isPc } = useSystem();
|
const { isPc } = useSystem();
|
||||||
const { userInfo } = useUserStore();
|
const { userInfo, isUpdateNotification, setIsUpdateNotification } = useUserStore();
|
||||||
const { setUserDefaultLng } = useI18nLng();
|
const { setUserDefaultLng } = useI18nLng();
|
||||||
|
|
||||||
const isChatPage = useMemo(
|
const isChatPage = useMemo(
|
||||||
@@ -68,6 +71,11 @@ const Layout = ({ children }: { children: JSX.Element }) => {
|
|||||||
|
|
||||||
const isHideNavbar = !!pcUnShowLayoutRoute[router.pathname];
|
const isHideNavbar = !!pcUnShowLayoutRoute[router.pathname];
|
||||||
|
|
||||||
|
const showUpdateNotification =
|
||||||
|
isUpdateNotification &&
|
||||||
|
!userInfo?.team.notificationAccount &&
|
||||||
|
!!userInfo?.team.permission.isOwner;
|
||||||
|
|
||||||
useMount(() => {
|
useMount(() => {
|
||||||
setUserDefaultLng();
|
setUserDefaultLng();
|
||||||
});
|
});
|
||||||
@@ -115,6 +123,9 @@ const Layout = ({ children }: { children: JSX.Element }) => {
|
|||||||
{!!userInfo && <UpdateInviteModal />}
|
{!!userInfo && <UpdateInviteModal />}
|
||||||
{isNotSufficientModal && <NotSufficientModal />}
|
{isNotSufficientModal && <NotSufficientModal />}
|
||||||
{!!userInfo && <SystemMsgModal />}
|
{!!userInfo && <SystemMsgModal />}
|
||||||
|
{showUpdateNotification && (
|
||||||
|
<UpdateNotification onClose={() => setIsUpdateNotification(false)} />
|
||||||
|
)}
|
||||||
{!!userInfo && importantInforms.length > 0 && (
|
{!!userInfo && importantInforms.length > 0 && (
|
||||||
<ImportantInform informs={importantInforms} refetch={refetchUnRead} />
|
<ImportantInform informs={importantInforms} refetch={refetchUnRead} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ const UpdateNotificationModal = ({ onClose }: { onClose: () => void }) => {
|
|||||||
initUserInfo();
|
initUserInfo();
|
||||||
onClose();
|
onClose();
|
||||||
},
|
},
|
||||||
successToast: t('account_info:bind_notification_success'),
|
successToast: t('common:support.user.info.bind_notification_success'),
|
||||||
errorToast: t('account_info:bind_notification_error')
|
errorToast: t('common:support.user.info.bind_notification_error')
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -49,9 +49,9 @@ const UpdateNotificationModal = ({ onClose }: { onClose: () => void }) => {
|
|||||||
?.map((item) => {
|
?.map((item) => {
|
||||||
switch (item) {
|
switch (item) {
|
||||||
case 'email':
|
case 'email':
|
||||||
return t('account_info:email_label');
|
return t('common:support.user.login.Email');
|
||||||
case 'phone':
|
case 'phone':
|
||||||
return t('account_info:phone_label');
|
return t('common:support.user.login.Phone number');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.join('/');
|
.join('/');
|
||||||
@@ -62,16 +62,16 @@ const UpdateNotificationModal = ({ onClose }: { onClose: () => void }) => {
|
|||||||
isOpen
|
isOpen
|
||||||
iconSrc="common/settingLight"
|
iconSrc="common/settingLight"
|
||||||
w={'32rem'}
|
w={'32rem'}
|
||||||
title={t('account_info:notification_receiving_hint')}
|
title={t('common:support.user.info.notification_receiving_hint')}
|
||||||
>
|
>
|
||||||
<ModalBody px={10}>
|
<ModalBody px={10}>
|
||||||
<Flex flexDirection="column">
|
<Flex flexDirection="column">
|
||||||
<HStack px="6" py="3" color="primary.600" bgColor="primary.50" borderRadius="md">
|
<HStack px="6" py="3" color="primary.600" bgColor="primary.50" borderRadius="md">
|
||||||
<Icon name="common/info" w="1rem" />
|
<Icon name="common/info" w="1rem" />
|
||||||
<Box fontSize={'sm'}>{t('account_info:bind_notification_hint')}</Box>
|
<Box fontSize={'sm'}>{t('common:support.user.info.bind_notification_hint')}</Box>
|
||||||
</HStack>
|
</HStack>
|
||||||
<Flex mt="4" alignItems="center">
|
<Flex mt="4" alignItems="center">
|
||||||
<Box flex={'0 0 70px'}>{t('account_info:user_account')}</Box>
|
<Box flex={'0 0 70px'}>{t('common:user.Account')}</Box>
|
||||||
<Input
|
<Input
|
||||||
flex={1}
|
flex={1}
|
||||||
bg={'myGray.50'}
|
bg={'myGray.50'}
|
||||||
@@ -80,12 +80,12 @@ const UpdateNotificationModal = ({ onClose }: { onClose: () => void }) => {
|
|||||||
></Input>
|
></Input>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex mt="6" alignItems="center" position={'relative'}>
|
<Flex mt="6" alignItems="center" position={'relative'}>
|
||||||
<Box flex={'0 0 70px'}>{t('account_info:verification_code')}</Box>
|
<Box flex={'0 0 70px'}>{t('common:support.user.info.verification_code')}</Box>
|
||||||
<Input
|
<Input
|
||||||
flex={1}
|
flex={1}
|
||||||
bg={'myGray.50'}
|
bg={'myGray.50'}
|
||||||
{...register('verifyCode', { required: true })}
|
{...register('verifyCode', { required: true })}
|
||||||
placeholder={t('account_info:code_required')}
|
placeholder={t('common:support.user.info.code_required')}
|
||||||
></Input>
|
></Input>
|
||||||
<SendCodeBox username={account} />
|
<SendCodeBox username={account} />
|
||||||
</Flex>
|
</Flex>
|
||||||
@@ -93,14 +93,14 @@ const UpdateNotificationModal = ({ onClose }: { onClose: () => void }) => {
|
|||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button mr={3} variant={'whiteBase'} onClick={onClose}>
|
<Button mr={3} variant={'whiteBase'} onClick={onClose}>
|
||||||
{t('account_info:cancel')}
|
{t('common:common.Cancel')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
isDisabled={!account || !verifyCode}
|
isDisabled={!account || !verifyCode}
|
||||||
onClick={handleSubmit((data) => onSubmit(data))}
|
onClick={handleSubmit((data) => onSubmit(data))}
|
||||||
>
|
>
|
||||||
{t('account_info:confirm')}
|
{t('common:common.Confirm')}
|
||||||
</Button>
|
</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</MyModal>
|
</MyModal>
|
||||||
@@ -47,7 +47,9 @@ import TeamSelector from '../components/TeamSelector';
|
|||||||
const StandDetailModal = dynamic(() => import('./components/standardDetailModal'), { ssr: false });
|
const StandDetailModal = dynamic(() => import('./components/standardDetailModal'), { ssr: false });
|
||||||
const ConversionModal = dynamic(() => import('./components/ConversionModal'));
|
const ConversionModal = dynamic(() => import('./components/ConversionModal'));
|
||||||
const UpdatePswModal = dynamic(() => import('./components/UpdatePswModal'));
|
const UpdatePswModal = dynamic(() => import('./components/UpdatePswModal'));
|
||||||
const UpdateNotification = dynamic(() => import('./components/UpdateNotificationModal'));
|
const UpdateNotification = dynamic(
|
||||||
|
() => import('@/components/support/user/inform/UpdateNotificationModal')
|
||||||
|
);
|
||||||
const CommunityModal = dynamic(() => import('@/components/CommunityModal'));
|
const CommunityModal = dynamic(() => import('@/components/CommunityModal'));
|
||||||
|
|
||||||
const ModelPriceModal = dynamic(() =>
|
const ModelPriceModal = dynamic(() =>
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ type State = {
|
|||||||
systemMsgReadId: string;
|
systemMsgReadId: string;
|
||||||
setSysMsgReadId: (id: string) => void;
|
setSysMsgReadId: (id: string) => void;
|
||||||
|
|
||||||
|
isUpdateNotification: boolean;
|
||||||
|
setIsUpdateNotification: (val: boolean) => void;
|
||||||
|
|
||||||
userInfo: UserType | null;
|
userInfo: UserType | null;
|
||||||
isTeamAdmin: boolean;
|
isTeamAdmin: boolean;
|
||||||
initUserInfo: () => Promise<UserType>;
|
initUserInfo: () => Promise<UserType>;
|
||||||
@@ -50,6 +53,13 @@ export const useUserStore = create<State>()(
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isUpdateNotification: true,
|
||||||
|
setIsUpdateNotification(val: boolean) {
|
||||||
|
set((state) => {
|
||||||
|
state.isUpdateNotification = val;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
userInfo: null,
|
userInfo: null,
|
||||||
isTeamAdmin: false,
|
isTeamAdmin: false,
|
||||||
async initUserInfo() {
|
async initUserInfo() {
|
||||||
@@ -156,7 +166,8 @@ export const useUserStore = create<State>()(
|
|||||||
{
|
{
|
||||||
name: 'userStore',
|
name: 'userStore',
|
||||||
partialize: (state) => ({
|
partialize: (state) => ({
|
||||||
systemMsgReadId: state.systemMsgReadId
|
systemMsgReadId: state.systemMsgReadId,
|
||||||
|
isUpdateNotification: state.isUpdateNotification
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user