@@ -2,7 +2,6 @@ import React from 'react';
2
2
import {
3
3
Button ,
4
4
ButtonDropdown ,
5
- ButtonGroup ,
6
5
Col ,
7
6
DropdownItem ,
8
7
DropdownMenu ,
@@ -192,22 +191,26 @@ class FileOperations extends React.Component {
192
191
const { changePath, containerID, currentPath} = this . props ;
193
192
const { tempUrl} = this . state ;
194
193
let urlSplits = tempUrl . split ( ":/" )
195
- console . log ( "Url splits" , urlSplits ) ;
196
-
197
194
if ( urlSplits && urlSplits [ 0 ] && ( currentPath . remoteName !== urlSplits [ 0 ] || currentPath . remotePath !== urlSplits [ 1 ] ) )
198
195
changePath ( containerID , urlSplits [ 0 ] , urlSplits [ 1 ] )
199
196
}
200
197
198
+ getLg = ( n ) => {
199
+ const { numCols} = this . props ;
200
+ return Math . abs ( n * numCols ) ;
201
+ }
202
+
201
203
render ( ) {
202
204
const { containerID, getFilesForContainerID, gridMode, navigateFwd, navigateBack, searchQuery, currentPath, doughnutData} = this . props ;
203
205
const { newFolderModalIsVisible, dropdownOpen, isAboutModalOpen, searchOpen, tempUrl, isUrlBarFocused} = this . state ;
204
206
205
- const { remoteName, remotePath } = currentPath ;
207
+ const { remoteName} = currentPath ;
206
208
207
209
return (
208
- < nav aria-label = "breadcrumb" className = "row mt-3 mb-1" >
209
- < Col sm = { 4 } md = { 3 } lg = { 2 } className = "pl-0" >
210
- < Button color = "light" className = { "mr-1 btn-explorer-action" }
210
+ < div className = "pl-0 mt-3 mb-1 d-flex justify-content-between align-items-center"
211
+ style = { { marginLeft : "-15px" , marginRight : "-15px" } } >
212
+ < div className = "d-flex flex-nowrap" >
213
+ < Button color = "light" className = "mr-1 btn-explorer-action"
211
214
onClick = { ( ) => navigateBack ( containerID ) } > < i
212
215
className = { "fa fa-lg fa-arrow-left" } /> </ Button >
213
216
< Button color = "light" className = { "mr-1 btn-explorer-action" }
@@ -219,108 +222,105 @@ class FileOperations extends React.Component {
219
222
< UncontrolledTooltip placement = "right" target = "RefreshButton" >
220
223
Refresh Files
221
224
</ UncontrolledTooltip >
222
- </ Col >
223
- < Col sm = { 8 } md = { 6 } lg = { 7 } >
224
- < Form inline onSubmit = { this . onSubmitUrlChange } >
225
+ </ div >
226
+ < div className = "flex-grow-1 pl-1 pr-1 pr-lg-3 pl-lg-3" >
227
+ < Form inline onSubmit = { this . onSubmitUrlChange } className = "h-100" >
225
228
< Input style = { { width : "100%" } } value = { tempUrl } onChange = { this . onChangeTrial }
226
229
onFocus = { this . onFocusHandle } onBlur = { this . onBlurHandle } />
227
230
< Button className = { isUrlBarFocused ? "" : "d-none" } color = "link" type = { "submit" }
228
231
style = { { marginLeft : "-45px" } } > < i className = "fa fa-arrow-right" /> </ Button >
229
232
</ Form >
233
+ </ div >
234
+ < div className = "d-flex flex-wrap" >
235
+ { /*<Button className="p-0 float-right" color="link"><i className="fa fa-info-circle"/></Button>*/ }
236
+
237
+ < Button className = "mr-1 btn-explorer-action p-1" id = "CreateFolderButton"
238
+ onClick = { this . openNewFolderModal } > < img src = { newFolderImg } alt = "New Folder"
239
+ className = "fa fa-lg" /> </ Button >
240
+ < UncontrolledTooltip placement = "bottom" target = "CreateFolderButton" >
241
+ Create a new Folder
242
+ </ UncontrolledTooltip >
230
243
231
- </ Col >
232
- < Col md = { 3 } lg = { 3 } >
233
- < div className = "float-right form-inline" >
234
- { /*<Button className="p-0 float-right" color="link"><i className="fa fa-info-circle"/></Button>*/ }
235
- < ButtonGroup >
236
- < Form inline >
237
- < FormGroup >
238
- { searchOpen && < Input type = "text" placeholder = "Search" value = { searchQuery }
239
- className = "animate-fade-in"
240
- onChange = { this . changeSearch } />
241
- }
242
- < Button className = "mr-1 btn-explorer-action" onClick = { this . handleSearchOpen } >
243
- < i className = { "fa fa-lg " + ( searchOpen ? "fa-close" : "fa-search" ) } />
244
- </ Button >
245
- </ FormGroup >
246
- </ Form >
247
- < Button className = "mr-1 btn-explorer-action p-1" id = "CreateFolderButton"
248
- onClick = { this . openNewFolderModal } > < img src = { newFolderImg } alt = "New Folder"
249
- className = "fa fa-lg" /> </ Button >
250
- < UncontrolledTooltip placement = "bottom" target = "CreateFolderButton" >
251
- Create a new Folder
252
- </ UncontrolledTooltip >
253
-
254
- < ButtonDropdown isOpen = { dropdownOpen } toggle = { this . toggleDropDown } direction = { 'down' }
255
- id = "FilterButton" >
256
- < DropdownToggle className = "btn-explorer-action" >
257
- < i className = { "fa fa-lg fa-filter" } />
258
- </ DropdownToggle >
259
- < DropdownMenu >
260
- < DropdownItem key = { "None" } value = { "" }
261
- onClick = { this . handleChangeFilter } > None</ DropdownItem >
262
- {
263
- this . filterOptions . map ( ( item , _ ) => {
264
- return ( < DropdownItem key = { item } value = { item }
265
- onClick = { this . handleChangeFilter } > { item } </ DropdownItem > )
266
- } )
267
- }
268
- </ DropdownMenu >
269
- </ ButtonDropdown >
270
-
271
- < Button className = "btn-explorer-action" id = "ListViewButton"
272
- onClick = { this . handleChangeGridMode } >
273
- < i className = { "fa fa-lg " + ( gridMode === "card" ? "fa-list" : "fa-th-large" ) } />
274
- </ Button >
275
- < UncontrolledTooltip placement = "right" target = "ListViewButton" >
276
- { ( gridMode === "card" ? "List View" : "Card View" ) }
277
- </ UncontrolledTooltip >
244
+ < ButtonDropdown isOpen = { dropdownOpen } toggle = { this . toggleDropDown } direction = { 'down' }
245
+ id = "FilterButton" >
246
+ < DropdownToggle className = "btn-explorer-action" >
247
+ < i className = { "fa fa-lg fa-filter" } />
248
+ </ DropdownToggle >
249
+ < DropdownMenu >
250
+ < DropdownItem key = { "None" } value = { "" }
251
+ onClick = { this . handleChangeFilter } > None</ DropdownItem >
252
+ {
253
+ this . filterOptions . map ( ( item , _ ) => {
254
+ return ( < DropdownItem key = { item } value = { item }
255
+ onClick = { this . handleChangeFilter } > { item } </ DropdownItem > )
256
+ } )
257
+ }
258
+ </ DropdownMenu >
259
+ </ ButtonDropdown >
260
+
261
+ < Button className = "btn-explorer-action" id = "ListViewButton"
262
+ onClick = { this . handleChangeGridMode } >
263
+ < i className = { "fa fa-lg " + ( gridMode === "card" ? "fa-list" : "fa-th-large" ) } />
264
+ </ Button >
265
+ < UncontrolledTooltip placement = "right" target = "ListViewButton" >
266
+ { ( gridMode === "card" ? "List View" : "Card View" ) }
267
+ </ UncontrolledTooltip >
268
+
269
+ < Button className = "btn-explorer-action" id = "InfoButton"
270
+ onClick = { this . toggleAboutModal } >
271
+ < i className = "fa fa-lg fa-info" />
272
+ </ Button >
273
+ < UncontrolledTooltip placement = "right" target = "InfoButton" >
274
+ Show Remote Info
275
+ </ UncontrolledTooltip >
278
276
279
- < Button className = "btn-explorer-action" id = "InfoButton"
280
- onClick = { this . toggleAboutModal } >
281
- < i className = "fa fa-lg fa-info" />
277
+ < Form inline >
278
+ < FormGroup >
279
+ { searchOpen && < Input type = "text" placeholder = "Search" value = { searchQuery }
280
+ className = "animate-fade-in"
281
+ onChange = { this . changeSearch } />
282
+ }
283
+ < Button color = "" className = "mr-1 btn-explorer-action"
284
+ onClick = { this . handleSearchOpen } >
285
+ < i className = { "fa fa-lg " + ( searchOpen ? "fa-close" : "fa-search" ) } />
282
286
</ Button >
283
- < UncontrolledTooltip placement = "right" target = "InfoButton" >
284
- Show Remote Info
285
- </ UncontrolledTooltip >
286
-
287
- </ ButtonGroup >
288
-
289
-
290
- < NewFolder containerID = { containerID } isVisible = { newFolderModalIsVisible }
291
- closeModal = { this . closeNewFolderModal } />
292
-
293
- < Modal isOpen = { isAboutModalOpen } toggle = { this . toggleAboutModal } >
294
- < ModalHeader >
295
- Status for { remoteName }
296
- </ ModalHeader >
297
- < ModalBody >
298
- < Row >
299
- < Col sm = { 12 } >
300
- < div className = "chart-wrapper" >
301
- < p > Space Usage (in GB)</ p >
302
- { doughnutData && ! isEmpty ( doughnutData ) ? < Doughnut data = { doughnutData } /> :
303
- < React . Fragment > < Spinner color = "primary" /> Loading</ React . Fragment > }
304
- </ div >
305
- </ Col >
306
- </ Row >
307
- < Row >
308
- < Col sm = { 12 } >
309
- < Button color = "danger" onClick = { this . handleCleanTrash } > Clean Trash < i
310
- className = "fa fa-lg fa-trash" /> </ Button >
311
- </ Col >
312
- </ Row >
313
-
314
- </ ModalBody >
315
- < ModalFooter >
316
-
317
- </ ModalFooter >
318
-
319
- </ Modal >
320
-
321
- </ div >
322
- </ Col >
323
- </ nav >
287
+ </ FormGroup >
288
+ </ Form >
289
+
290
+
291
+ < NewFolder containerID = { containerID } isVisible = { newFolderModalIsVisible }
292
+ closeModal = { this . closeNewFolderModal } />
293
+
294
+ < Modal isOpen = { isAboutModalOpen } toggle = { this . toggleAboutModal } >
295
+ < ModalHeader >
296
+ Status for { remoteName }
297
+ </ ModalHeader >
298
+ < ModalBody >
299
+ < Row >
300
+ < Col sm = { 12 } >
301
+ < div className = "chart-wrapper" >
302
+ < p > Space Usage (in GB)</ p >
303
+ { doughnutData && ! isEmpty ( doughnutData ) ? < Doughnut data = { doughnutData } /> :
304
+ < React . Fragment > < Spinner color = "primary" /> Loading</ React . Fragment > }
305
+ </ div >
306
+ </ Col >
307
+ </ Row >
308
+ < Row >
309
+ < Col sm = { 12 } >
310
+ < Button color = "danger" onClick = { this . handleCleanTrash } > Clean Trash < i
311
+ className = "fa fa-lg fa-trash" /> </ Button >
312
+ </ Col >
313
+ </ Row >
314
+
315
+ </ ModalBody >
316
+ < ModalFooter >
317
+
318
+ </ ModalFooter >
319
+
320
+ </ Modal >
321
+
322
+ </ div >
323
+ </ div >
324
324
325
325
) ;
326
326
}
0 commit comments