@@ -116,6 +116,7 @@ const FolderNameWrapper = styled.div<{ $selected: boolean }>`
116
116
display: inline-block;
117
117
}
118
118
}
119
+
119
120
` ;
120
121
121
122
const FolderName = ( props : { id : string ; name : string } ) => {
@@ -136,7 +137,10 @@ const FolderName = (props: { id: string; name: string }) => {
136
137
setFolderNameEditing ( false ) ;
137
138
} }
138
139
/>
139
- < EditPopover items = { [ { text : trans ( "rename" ) , onClick : ( ) => setFolderNameEditing ( true ) } ] } >
140
+ < EditPopover items = { [
141
+ { text : trans ( "rename" ) , onClick : ( ) => setFolderNameEditing ( true ) } ,
142
+ // Falk: TODO: Implement delete for Folders
143
+ ] } >
140
144
< PopoverIcon tabIndex = { - 1 } />
141
145
</ EditPopover >
142
146
</ >
@@ -316,12 +320,12 @@ export default function ApplicationHome() {
316
320
} ;
317
321
} ) ;
318
322
319
- if ( allFolders . length > 5 ) {
323
+ if ( allFolders . length > 1 ) {
320
324
folderItems = [
321
325
...folderItems ,
322
326
{
323
327
text : ( props : { selected ?: boolean } ) => (
324
- < MoreFoldersWrapper $selected = { Boolean ( props . selected ) } > { trans ( "more " ) } </ MoreFoldersWrapper >
328
+ < MoreFoldersWrapper $selected = { Boolean ( props . selected ) } > { trans ( "home.allFolders " ) } </ MoreFoldersWrapper >
325
329
) ,
326
330
routePath : FOLDERS_URL ,
327
331
routeComp : RootFolderListView ,
@@ -356,6 +360,11 @@ export default function ApplicationHome() {
356
360
routeComp : NewsView ,
357
361
icon : ( { selected, ...otherProps } ) => selected ? < NewsIcon { ...otherProps } width = { "24px" } /> : < NewsIcon { ...otherProps } width = { "24px" } /> ,
358
362
} ,
363
+ ]
364
+ } ,
365
+
366
+ {
367
+ items : [
359
368
{
360
369
text : < TabLabel > { trans ( "home.allApplications" ) } </ TabLabel > ,
361
370
routePath : ALL_APPLICATIONS_URL ,
@@ -369,28 +378,15 @@ export default function ApplicationHome() {
369
378
icon : ( { selected, ...otherProps } ) => selected ? < HomeModuleIcon { ...otherProps } width = { "24px" } /> : < HomeModuleIcon { ...otherProps } width = { "24px" } /> ,
370
379
visible : ( { user } ) => user . orgDev ,
371
380
} ,
372
- {
373
- text : < TabLabel > { trans ( "home.marketplace" ) } </ TabLabel > ,
374
- routePath : MARKETPLACE_URL ,
375
- routePathExact : false ,
376
- routeComp : MarketplaceView ,
377
- icon : ( { selected, ...otherProps } ) => selected ? < MarketplaceIcon { ...otherProps } width = { "24px" } /> : < MarketplaceIcon { ...otherProps } width = { "24px" } /> ,
378
- visible : ( { user } ) => user . orgDev ,
379
- } ,
380
- {
381
- text : < TabLabel > { trans ( "home.trash" ) } </ TabLabel > ,
382
- routePath : TRASH_URL ,
383
- routeComp : TrashView ,
384
- icon : ( { selected, ...otherProps } ) => selected ? < RecyclerIcon { ...otherProps } width = { "24px" } /> : < RecyclerIcon { ...otherProps } width = { "24px" } /> ,
385
- visible : ( { user } ) => user . orgDev ,
386
- } ,
381
+
387
382
] ,
388
383
} ,
384
+
389
385
allFolders . length > 0
390
386
? {
391
387
title : (
392
388
< FolderSectionLabel >
393
- { trans ( "home.folders " ) }
389
+ { trans ( "home.yourFolders " ) }
394
390
< FolderCountLabel > { `(${ allFolders . length } )` } </ FolderCountLabel >
395
391
{ user . orgDev && (
396
392
< CreateFolderIcon onClick = { handleFolderCreate } >
@@ -403,8 +399,17 @@ export default function ApplicationHome() {
403
399
style : { marginTop : "8px" } ,
404
400
}
405
401
: { items : [ ] } ,
402
+
406
403
{
407
404
items : [
405
+ {
406
+ text : < TabLabel > { trans ( "home.marketplace" ) } </ TabLabel > ,
407
+ routePath : MARKETPLACE_URL ,
408
+ routePathExact : false ,
409
+ routeComp : MarketplaceView ,
410
+ icon : ( { selected, ...otherProps } ) => selected ? < MarketplaceIcon { ...otherProps } width = { "24px" } /> : < MarketplaceIcon { ...otherProps } width = { "24px" } /> ,
411
+ visible : ( { user } ) => user . orgDev ,
412
+ } ,
408
413
{
409
414
text : < TabLabel > { trans ( "home.queryLibrary" ) } </ TabLabel > ,
410
415
routePath : QUERY_LIBRARY_URL ,
@@ -421,6 +426,23 @@ export default function ApplicationHome() {
421
426
visible : ( { user } ) => user . orgDev ,
422
427
onSelected : ( _ , currentPath ) => currentPath . split ( "/" ) [ 1 ] === "datasource" ,
423
428
} ,
429
+ ] ,
430
+ } ,
431
+ isEE ( ) ? {
432
+ items : [
433
+ {
434
+ text : < TabLabel > { trans ( "settings.AppUsage" ) } </ TabLabel > ,
435
+ routePath : "/ee/6600ae8724a23f365ba2ed4c/admin" ,
436
+ routePathExact : false ,
437
+ routeComp : AppEditor ,
438
+ icon : ( { selected, ...otherProps } ) => selected ? ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) : ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) ,
439
+ visible : ( { user } ) => user . orgDev ,
440
+ } ,
441
+ ] ,
442
+ } : { items : [ ] } ,
443
+
444
+ {
445
+ items : [
424
446
{
425
447
text : < TabLabel > { trans ( "settings.title" ) } </ TabLabel > ,
426
448
routePath : SETTING ,
@@ -430,20 +452,21 @@ export default function ApplicationHome() {
430
452
visible : ( { user } ) => user . orgDev ,
431
453
onSelected : ( _ , currentPath ) => currentPath . split ( "/" ) [ 1 ] === "setting" ,
432
454
} ,
433
- ] ,
455
+ ]
434
456
} ,
435
- isEE ( ) ? {
457
+
458
+ {
436
459
items : [
437
460
{
438
- text : < TabLabel > { trans ( "settings.AppUsage" ) } </ TabLabel > ,
439
- routePath : "/ee/6600ae8724a23f365ba2ed4c/admin" ,
440
- routePathExact : false ,
441
- routeComp : AppEditor ,
442
- icon : ( { selected, ...otherProps } ) => selected ? ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) : ( < EnterpriseIcon { ...otherProps } width = { "24px" } /> ) ,
461
+ text : < TabLabel > { trans ( "home.trash" ) } </ TabLabel > ,
462
+ routePath : TRASH_URL ,
463
+ routeComp : TrashView ,
464
+ icon : ( { selected, ...otherProps } ) => selected ? < RecyclerIcon { ...otherProps } width = { "24px" } /> : < RecyclerIcon { ...otherProps } width = { "24px" } /> ,
443
465
visible : ( { user } ) => user . orgDev ,
444
466
} ,
445
467
] ,
446
- } : { items : [ ] } ,
468
+ } ,
469
+
447
470
] }
448
471
/>
449
472
{ user . orgDev && (
0 commit comments