@@ -239,7 +239,7 @@ export function UserProfileLayout(props: UserProfileLayoutProps) {
239
239
< StyleProfileContent >
240
240
< Row gutter = { [ 24 , 24 ] } style = { { display : 'flex' , alignItems : 'end' } } >
241
241
< Col lg = { 4 } >
242
- < StyleAvatar src = { < img src = { user . avatarUrl } alt = "avatar" /> } shape = "square" size = { 120 } />
242
+ < StyleAvatar src = { < img src = { user . avatarUrl ?? `https://eu.ui-avatars.com/api/?name= ${ user . username } &size=250` } alt = "avatar" /> } shape = "square" size = { 120 } />
243
243
</ Col >
244
244
< Col lg = { 20 } >
245
245
< Space style = { { paddingLeft : "80px" } } >
@@ -265,11 +265,12 @@ export function UserProfileLayout(props: UserProfileLayoutProps) {
265
265
beforeUpload = { beforeImgUpload }
266
266
withCredentials
267
267
>
268
- < Button style = { { marginTop : "8px" } } > Change Avatar</ Button >
268
+ < Button style = { { marginTop : "8px" } } >
269
+ { trans ( "profile.changeAvatar" ) }
270
+ </ Button >
269
271
</ Upload >
270
272
271
273
< BlurFinishInput
272
-
273
274
valueCheck = { {
274
275
rule : ( val ) => val . trim ( ) !== "" ,
275
276
message : trans ( "profile.nameCheck" ) ,
@@ -285,20 +286,20 @@ export function UserProfileLayout(props: UserProfileLayoutProps) {
285
286
</ Card >
286
287
287
288
< Card style = { { marginBottom : "20px" } } >
288
- < Title level = { 4 } > About </ Title >
289
+ < Title level = { 4 } > { trans ( "profile.about" ) } </ Title >
289
290
< Space direction = "horizontal" size = { 10 } wrap = { true } >
290
- < Text > User-ID : { user . id } </ Text > |
291
- < Text > Created At : { dayjs ( user . createdTimeMs ) . format ( "YYYY-MM-DD HH:mm:ss" ) } </ Text > |
292
- < Text > Current Organization : { currentOrg ?. name } </ Text >
291
+ < Text > { trans ( "profile.userId" ) } : { user . id } </ Text > |
292
+ < Text > { trans ( "profile.createdAt" ) } : { dayjs ( user . createdTimeMs ) . format ( "YYYY-MM-DD HH:mm:ss" ) } </ Text > |
293
+ < Text > { trans ( "profile.currentOrg" ) } : { currentOrg ?. name } </ Text >
293
294
</ Space >
294
295
</ Card >
295
296
296
297
< Card style = { { marginBottom : "20px" } } >
297
- < Title level = { 4 } > Settings </ Title >
298
+ < Title level = { 4 } > { trans ( "profile.settings" ) } </ Title >
298
299
< Space direction = "vertical" size = { 10 } >
299
- < Text > UI Language :</ Text >
300
+ < Text > { trans ( "profile.uiLanguage" ) } :</ Text >
300
301
< Select
301
- defaultValue = { currentUser . uiLanguage }
302
+ defaultValue = { currentUser . uiLanguage ?? 'en' }
302
303
style = { { width : 200 } }
303
304
onChange = { handleLanguageChange }
304
305
showSearch
@@ -316,14 +317,16 @@ export function UserProfileLayout(props: UserProfileLayoutProps) {
316
317
</ Card >
317
318
318
319
< Card style = { { marginBottom : "20px" } } >
319
- < Title level = { 4 } > Info </ Title >
320
+ < Title level = { 4 } > { trans ( "profile.info" ) } </ Title >
320
321
< Space direction = "horizontal" size = { 10 } >
321
322
< Row gutter = { [ 24 , 24 ] } >
322
323
< Col xs = { 24 } sm = { 12 } xl = { 6 } style = { { marginBottom : "20px" , minWidth : "300px" } } span = { 8 } >
323
324
< Card hoverable >
324
325
< div style = { { display : "flex" , justifyContent : "space-between" } } >
325
326
< div >
326
- < p style = { { textTransform : "uppercase" , fontSize : "13px" } } > Created Apps</ p >
327
+ < p style = { { textTransform : "uppercase" , fontSize : "13px" } } >
328
+ { trans ( "profile.createdApps" ) }
329
+ </ p >
327
330
< h4 style = { { fontSize : "22px" } } >
328
331
< span data-target = { apps . filter ( app => app . createBy === user . username && app . applicationType == 1 ) . length } >
329
332
< CountUp start = { 0 } end = { apps . filter ( app => app . createBy === user . username && app . applicationType == 1 ) . length } duration = { 2 } />
@@ -343,7 +346,9 @@ export function UserProfileLayout(props: UserProfileLayoutProps) {
343
346
< Card hoverable >
344
347
< div style = { { display : "flex" , justifyContent : "space-between" } } >
345
348
< div >
346
- < p style = { { textTransform : "uppercase" , fontSize : "13px" } } > Created Modules</ p >
349
+ < p style = { { textTransform : "uppercase" , fontSize : "13px" } } >
350
+ { trans ( "profile.createdModules" ) }
351
+ </ p >
347
352
< h4 style = { { fontSize : "22px" } } >
348
353
< span data-target = { apps . filter ( app => app . createBy === user . username && app . applicationType == 2 ) . length } >
349
354
< CountUp start = { 0 } end = { apps . filter ( app => app . createBy === user . username && app . applicationType == 2 ) . length } duration = { 2 } />
@@ -363,14 +368,18 @@ export function UserProfileLayout(props: UserProfileLayoutProps) {
363
368
< Card hoverable >
364
369
< div style = { { display : "flex" , justifyContent : "space-between" } } >
365
370
< div >
366
- < p style = { { textTransform : "uppercase" , fontSize : "13px" } } > on Marketplace</ p >
371
+ < p style = { { textTransform : "uppercase" , fontSize : "13px" } } >
372
+ { trans ( "profile.onMarketplace" ) }
373
+ </ p >
367
374
< h4 style = { { fontSize : "22px" } } >
368
375
< span data-target = { 8 } >
369
376
< CountUp start = { 0 } end = { 8 } duration = { 2 } />
370
377
</ span >
371
378
</ h4 >
372
379
< div style = { { display : "flex" , alignItems : "center" } } >
373
- < h5 style = { { color : "#55c27f" , marginRight : "10px" } } > How to publish on Marketplce</ h5 >
380
+ < h5 style = { { color : "#55c27f" , marginRight : "10px" } } >
381
+ { trans ( "profile.howToPublish" ) }
382
+ </ h5 >
374
383
</ div >
375
384
</ div >
376
385
< BgSuccess style = { { padding : '6px' , width : '48px' , height : '48px' , borderRadius : '4px' , display : 'flex' , alignItems : 'center' , justifyContent : 'center' } } >
0 commit comments