@@ -26,8 +26,8 @@ import {
2626 buildFileSystemSelection ,
2727 buildFileSystemSelectionPath ,
2828 splitFileSystemSelection ,
29- buildFileSystemNavigationPath ,
3029 buildBreadcrumbNavigation ,
30+ buildFileSystemNavigationPath ,
3131} from '~/modules/filesystem/helpers/filesystem-helper'
3232import { formatDateTime } from '~/helpers/date-helper'
3333import { FileTableSortableColumn } from '~/helpers/ui-table-helper'
@@ -62,7 +62,6 @@ import LoadingButton from '~/components/buttons/LoadingButton'
6262import SimplePanel from '~/components/panels/SimplePanel'
6363// views
6464import SimpleView , { SimpleViewSize } from '~/components/views/SimpleView'
65- import { showInputValidation } from '~/components/forms/validations/ValidationForm'
6665
6766const copyToClipboard = ( file : File , fileSystem : FileSystem ) => {
6867 const path = `${ fileSystem . path } /${ file . name } `
@@ -74,9 +73,16 @@ interface FileItemProps {
7473 currentPath : string
7574 fileSystem : FileSystem
7675 system : System
76+ accountName : string
7777}
7878
79- const FileItem : React . FC < FileItemProps > = ( { file, currentPath, fileSystem, system } ) => {
79+ const FileItem : React . FC < FileItemProps > = ( {
80+ file,
81+ currentPath,
82+ fileSystem,
83+ system,
84+ accountName,
85+ } ) => {
8086 const [ changeOwnershipDialogOpen , setChangeOwnershipDialogOpen ] = useState ( false )
8187 const [ changePermissionDialogDialogOpen , setChangePermissionDialogDialogOpen ] = useState ( false )
8288 const [ checksumDialogOpen , setChecksumDialogOpen ] = useState ( false )
@@ -303,9 +309,16 @@ interface DirectoryItemProps {
303309 currentPath : string
304310 fileSystem : FileSystem
305311 system : System
312+ accountName : string
306313}
307314
308- const DirectoryItem : React . FC < DirectoryItemProps > = ( { file, currentPath, fileSystem, system } ) => {
315+ const DirectoryItem : React . FC < DirectoryItemProps > = ( {
316+ file,
317+ currentPath,
318+ fileSystem,
319+ system,
320+ accountName,
321+ } ) => {
309322 const [ changeOwnershipDialogOpen , setChangeOwnershipDialogOpen ] = useState ( false )
310323 const [ changePermissionDialogDialogOpen , setChangePermissionDialogDialogOpen ] = useState ( false )
311324 const [ copyDialogOpen , setCopyDialogOpen ] = useState ( false )
@@ -316,7 +329,7 @@ const DirectoryItem: React.FC<DirectoryItemProps> = ({ file, currentPath, fileSy
316329 const [ removeDialogOpen , setRemoveDialogOpen ] = useState ( false )
317330 const { name } = file
318331
319- const navigationPath = buildFileSystemNavigationPath ( system . name , currentPath , name )
332+ const navigationPath = buildFileSystemNavigationPath ( system . name , currentPath , accountName , name )
320333 return (
321334 < tr className = 'even:bg-blue-50' >
322335 < td className = 'px-4 py-3 font-medium' >
@@ -493,14 +506,21 @@ interface BreadcrumbNavigationProps {
493506 currentPath : string
494507 system : System
495508 fileSystem : FileSystem
509+ accountName : string
496510}
497511
498512const BreadcrumbNavigation : React . FC < BreadcrumbNavigationProps > = ( {
499513 currentPath,
500514 system,
501515 fileSystem,
516+ accountName,
502517} ) => {
503- const navigationData = buildBreadcrumbNavigation ( currentPath , fileSystem . path , system . name )
518+ const navigationData = buildBreadcrumbNavigation (
519+ currentPath ,
520+ fileSystem . path ,
521+ system . name ,
522+ accountName ,
523+ )
504524 return (
505525 < >
506526 < nav className = 'flex rounded-md p-2 mb-4 border border-gray-200' aria-label = 'Breadcrumb' >
@@ -540,6 +560,7 @@ interface FileSystemSelectionData {
540560 system : System
541561 systems : System [ ]
542562 username : string
563+ accountName : string
543564}
544565
545566const FileSystemSelection : React . FC < FileSystemSelectionData > = ( {
@@ -548,11 +569,12 @@ const FileSystemSelection: React.FC<FileSystemSelectionData> = ({
548569 system,
549570 systems,
550571 username,
572+ accountName,
551573} ) => {
552574 const onChangeHandler = ( event : any ) => {
553575 const selectedValue = event . target . value
554576 const { systemName, fileSystemPath } = splitFileSystemSelection ( selectedValue )
555- const newNavigationPath = buildFileSystemNavigationPath ( systemName , fileSystemPath )
577+ const newNavigationPath = buildFileSystemNavigationPath ( systemName , fileSystemPath , accountName )
556578 window . location . href = newNavigationPath
557579 }
558580
@@ -618,13 +640,15 @@ interface FileListTableProps {
618640 currentPath : string
619641 fileSystem : FileSystem
620642 system : System
643+ accountName : string
621644}
622645
623646const FileListTable : React . FC < FileListTableProps > = ( {
624647 files,
625648 currentPath,
626649 fileSystem,
627650 system,
651+ accountName,
628652} ) => {
629653 const [ sortableColumns , setSortableColumns ] = useState < FileTableSortableColumn [ ] > ( [ ] )
630654 const [ fileSystemList , setFileSystemList ] = useState < any [ ] > ( [ ] )
@@ -655,6 +679,7 @@ const FileListTable: React.FC<FileListTableProps> = ({
655679 currentPath = { currentPath }
656680 fileSystem = { fileSystem }
657681 system = { system }
682+ accountName = { accountName }
658683 />
659684 ) : (
660685 < FileItem
@@ -663,6 +688,7 @@ const FileListTable: React.FC<FileListTableProps> = ({
663688 currentPath = { currentPath }
664689 fileSystem = { fileSystem }
665690 system = { system }
691+ accountName = { accountName }
666692 />
667693 ) ,
668694 ) }
@@ -895,6 +921,8 @@ const FileListView: React.FC<FileListViewProps> = ({
895921 </ div >
896922 )
897923
924+ console . log ( 'Account Name:' , accountName )
925+
898926 return (
899927 < SimpleView title = 'File Manager' size = { SimpleViewSize . FULL } >
900928 < SimplePanel title = { 'Filesystem' } className = 'mb-[330px]' actionsButtons = { actionsButtons } >
@@ -912,12 +940,14 @@ const FileListView: React.FC<FileListViewProps> = ({
912940 system = { system }
913941 systems = { systems }
914942 username = { username }
943+ accountName = { accountName }
915944 />
916945 </ div >
917946 < BreadcrumbNavigation
918947 currentPath = { currentPath }
919948 system = { system }
920949 fileSystem = { fileSystem }
950+ accountName = { accountName }
921951 />
922952 { remoteFsError == null && (
923953 < FileUpload
@@ -937,6 +967,7 @@ const FileListView: React.FC<FileListViewProps> = ({
937967 currentPath = { currentPath }
938968 fileSystem = { fileSystem }
939969 system = { system }
970+ accountName = { accountName }
940971 />
941972 ) }
942973 { ! fileList ||
0 commit comments