File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
packages/global/support/user Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1- import type { LangEnum } from 'common/i18n/type' ;
1+ import type { LangEnum } from '../ common/i18n/type' ;
22import type { TeamPermission } from '../permission/user/controller' ;
33import type { UserStatusEnum } from './constant' ;
44import type { TeamMemberStatusEnum } from './team/constant' ;
@@ -28,7 +28,7 @@ export type UserType = {
2828 username : string ;
2929 avatar : string ; // it should be team member's avatar after 4.8.18
3030 timezone : string ;
31- language : string ;
31+ language ?: `${ LangEnum } ` ;
3232 promotionRate : UserModelSchema [ 'promotionRate' ] ;
3333 team : TeamTmbItemType ;
3434 notificationAccount ?: string ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const Individuation = () => {
1919 const { toast } = useToast ( ) ;
2020
2121 const { reset } = useForm < UserUpdateParams > ( {
22- defaultValues : userInfo as UserType
22+ defaultValues : userInfo !
2323 } ) ;
2424
2525 const onclickSave = useCallback (
Original file line number Diff line number Diff line change 11import { UsageSourceEnum } from '@fastgpt/global/support/wallet/usage/constants' ;
22import type { UserModelSchema } from '@fastgpt/global/support/user/type' ;
3- import type { LangEnum } from '@fastgpt/global/common/i18n /type' ;
3+ import type { UserType } from '@fastgpt/global/support/user /type' ;
44
55export interface UserUpdateParams {
66 avatar ?: string ;
77 timezone ?: string ;
8- language ?: `${ LangEnum } ` ;
8+ language ?: UserType [ 'language' ] ;
99 /** @deprecated */
1010 balance ?: number ;
1111}
You can’t perform that action at this time.
0 commit comments