@@ -15,6 +15,9 @@ import { bytesToHuman } from '@/helpers';
1515import { CSSTransition } from 'react-transition-group' ;
1616import { Link } from 'react-router-dom' ;
1717import Spinner from '@/components/elements/Spinner' ;
18+ import { faEllipsisH } from '@fortawesome/free-solid-svg-icons/faEllipsisH' ;
19+ import { faFile } from '@fortawesome/free-solid-svg-icons/faFile' ;
20+ import { faFileImport } from '@fortawesome/free-solid-svg-icons/faFileImport' ;
1821
1922export default ( ) => {
2023 const [ loading , setLoading ] = useState ( true ) ;
@@ -97,16 +100,20 @@ export default () => {
97100 files . map ( file => (
98101 < a
99102 key = { file . name }
100- href = { `#${ currentDirectory } /${ file . name } ` }
103+ href = { file . isFile ? undefined : `#${ currentDirectory } /${ file . name } ` }
101104 className = { `
102- flex px-4 py-3 bg-neutral-700 text-neutral-300 rounded-sm mb-px text-sm
103- border border-transparent hover:text-neutral-100 hover:border-neutral-600
104- cursor-pointer items-center no-underline
105- ` }
105+ flex px-4 py-3 bg-neutral-700 text-neutral-300 rounded-sm mb-px text-sm
106+ hover:text-neutral-100 cursor-pointer items-center no-underline hover:bg-neutral-600
107+ ` }
108+ onClick = { ( e ) => {
109+ if ( file . isFile ) {
110+ return e . preventDefault ( ) ;
111+ }
112+ } }
106113 >
107- < div className = { 'flex-none text-neutral-500 mr-4 text-lg' } >
114+ < div className = { 'flex-none text-neutral-400 mr-4 text-lg' } >
108115 { file . isFile ?
109- < FontAwesomeIcon icon = { faFileAlt } />
116+ < FontAwesomeIcon icon = { file . isSymlink ? faFileImport : faFileAlt } />
110117 :
111118 < FontAwesomeIcon icon = { faFolder } />
112119 }
@@ -120,7 +127,7 @@ export default () => {
120127 </ div >
121128 }
122129 < div
123- className = { 'w-1/5 text-right' }
130+ className = { 'w-1/5 text-right mr-4 ' }
124131 title = { file . modifiedAt . toString ( ) }
125132 >
126133 { Math . abs ( differenceInHours ( file . modifiedAt , new Date ( ) ) ) > 48 ?
@@ -129,6 +136,9 @@ export default () => {
129136 distanceInWordsToNow ( file . modifiedAt , { includeSeconds : true } )
130137 }
131138 </ div >
139+ < div >
140+ < FontAwesomeIcon icon = { faEllipsisH } />
141+ </ div >
132142 </ a >
133143 ) )
134144 }
0 commit comments