@@ -19,6 +19,7 @@ import {
1919 isLocalPathValid ,
2020 isLoopholeHostnameValid ,
2121} from "../features/validator/validators" ;
22+ import DirectorySettings from "../components/form/DirectorySettings" ;
2223
2324const DirectoryPage = ( ) => {
2425 const dispatch = useDispatch ( ) ;
@@ -30,6 +31,7 @@ const DirectoryPage = () => {
3031 const [ usingBasicAuth , setUsingBasicAuth ] = useState ( false ) ;
3132 const [ basicAuthUsername , setBasicAuthUsername ] = useState ( "" ) ;
3233 const [ basicAuthPassword , setBasicAuthPassword ] = useState ( "" ) ;
34+ const [ disableDirectoryListing , setDisableDirectoryListing ] = useState ( false ) ;
3335
3436 const areInputsValid = ( ) : boolean => {
3537 if ( ! isLocalPathValid ( path ) ) return false ;
@@ -53,6 +55,7 @@ const DirectoryPage = () => {
5355 disableProxyErrorPage : false ,
5456 tunnelId : uuidv4 ( ) ,
5557 } ,
58+ deactivatedirectorylisting : disableDirectoryListing
5659 } ;
5760 if ( usingCustomHostname ) {
5861 options . remote . siteId = customHostname ;
@@ -105,6 +108,13 @@ const DirectoryPage = () => {
105108 passwordChangeCallback = { setBasicAuthPassword }
106109 />
107110 </ div >
111+ < div className = "column is-12" >
112+ < h5 className = "title is-5" > Directory Listing</ h5 >
113+ < DirectorySettings
114+ usingValue = { disableDirectoryListing }
115+ usingChangeCallback = { setDisableDirectoryListing }
116+ />
117+ </ div >
108118 < div className = "column is-12" >
109119 < div className = "field is-grouped is-pulled-right" >
110120 < div className = "control" >
0 commit comments