@@ -283,18 +283,24 @@ def ui(self):
283283 with v3 .VCard (rounded = "lg" ):
284284 with v3 .VCardTitle ("File loading" , classes = "d-flex align-center px-3" ):
285285 v3 .VSpacer ()
286- v3 .VBtn (
287- icon = "mdi-home" ,
288- variant = "flat" ,
289- size = "small" ,
290- click = self .goto_home ,
291- )
292- v3 .VBtn (
293- icon = "mdi-folder-upload-outline" ,
294- variant = "flat" ,
295- size = "small" ,
296- click = self .goto_parent ,
297- )
286+ with v3 .VTooltip (text = "Go to launched directory" ):
287+ with v3 .Template (v_slot_activator = "{ props }" ):
288+ v3 .VBtn (
289+ v_bind = "props" ,
290+ icon = "mdi-home" ,
291+ variant = "flat" ,
292+ size = "small" ,
293+ click = self .goto_home ,
294+ )
295+ with v3 .VTooltip (text = "Go up a directory" ):
296+ with v3 .Template (v_slot_activator = "{ props }" ):
297+ v3 .VBtn (
298+ v_bind = "props" ,
299+ icon = "mdi-folder-upload-outline" ,
300+ variant = "flat" ,
301+ size = "small" ,
302+ click = self .goto_parent ,
303+ )
298304 v3 .VTextField (
299305 v_model = self .name ("filter" ),
300306 hide_details = True ,
@@ -386,59 +392,77 @@ def ui(self):
386392
387393 v3 .VDivider ()
388394 with v3 .VCardActions (classes = "pa-3" ):
389- v3 .VBtn (
390- classes = "text-none" ,
391- variant = "tonal" ,
392- text = "Simulation" ,
393- prepend_icon = "mdi-database-plus" ,
394- disabled = (
395- f"{ self .name ('listing' )} [{ self .name ('active' )} ]?.type !== 'file'" ,
396- ),
397- click = self .set_data_simulation ,
398- )
399- v3 .VBtn (
400- classes = "text-none" ,
401- text = "Connectivity" ,
402- variant = "tonal" ,
403- prepend_icon = "mdi-vector-polyline-plus" ,
404- disabled = (
405- f"{ self .name ('listing' )} [{ self .name ('active' )} ]?.type !== 'file'" ,
406- ),
407- click = self .set_data_connectivity ,
408- )
409- v3 .VBtn (
410- classes = "text-none" ,
411- text = "Reset" ,
412- variant = "tonal" ,
413- prepend_icon = "mdi-close-octagon-outline" ,
414- click = f"{ self .name ('data_connectivity' )} ='';{ self .name ('data_simulation' )} ='';{ self .name ('error' )} =false" ,
415- )
395+ with v3 .VTooltip (text = "Set selected file as simulation file" ):
396+ with v3 .Template (v_slot_activator = "{ props }" ):
397+ v3 .VBtn (
398+ v_bind = "props" ,
399+ classes = "text-none" ,
400+ variant = "tonal" ,
401+ text = "Simulation" ,
402+ prepend_icon = "mdi-database-plus" ,
403+ disabled = (
404+ f"{ self .name ('listing' )} [{ self .name ('active' )} ]?.type !== 'file'" ,
405+ ),
406+ click = self .set_data_simulation ,
407+ )
408+ with v3 .VTooltip (text = "Set selected file as connectivity file" ):
409+ with v3 .Template (v_slot_activator = "{ props }" ):
410+ v3 .VBtn (
411+ v_bind = "props" ,
412+ classes = "text-none" ,
413+ text = "Connectivity" ,
414+ variant = "tonal" ,
415+ prepend_icon = "mdi-vector-polyline-plus" ,
416+ disabled = (
417+ f"{ self .name ('listing' )} [{ self .name ('active' )} ]?.type !== 'file'" ,
418+ ),
419+ click = self .set_data_connectivity ,
420+ )
421+ with v3 .VTooltip (text = "Clear selected files" ):
422+ with v3 .Template (v_slot_activator = "{ props }" ):
423+ v3 .VBtn (
424+ v_bind = "props" ,
425+ classes = "text-none" ,
426+ text = "Reset" ,
427+ variant = "tonal" ,
428+ prepend_icon = "mdi-close-octagon-outline" ,
429+ click = f"{ self .name ('data_connectivity' )} ='';{ self .name ('data_simulation' )} ='';{ self .name ('error' )} =false" ,
430+ )
416431 v3 .VSpacer ()
417- v3 .VBtn (
418- border = True ,
419- classes = "text-none" ,
420- color = "surface" ,
421- text = "Cancel" ,
422- variant = "flat" ,
423- click = self .cancel ,
424- )
425- v3 .VBtn (
426- disabled = (f"!{ self .name ('is_state_file' )} " ,),
427- loading = (self .name ("state_loading" ), False ),
428- classes = "text-none" ,
429- color = "primary" ,
430- text = "Import state file" ,
431- variant = "flat" ,
432- click = self .import_state_file ,
433- )
434- v3 .VBtn (
435- classes = "text-none" ,
436- color = (f"{ self .name ('error' )} ? 'error' : 'primary'" ,),
437- text = "Load files" ,
438- variant = "flat" ,
439- disabled = (
440- f"!{ self .name ('data_simulation' )} || !{ self .name ('data_connectivity' )} || { self .name ('error' )} " ,
441- ),
442- loading = (self .name ("loading" ), False ),
443- click = self .load_data_files ,
444- )
432+ with v3 .VTooltip (text = "Cancel file loading" ):
433+ with v3 .Template (v_slot_activator = "{ props }" ):
434+ v3 .VBtn (
435+ v_bind = "props" ,
436+ border = True ,
437+ classes = "text-none" ,
438+ color = "surface" ,
439+ text = "Cancel" ,
440+ variant = "flat" ,
441+ click = self .cancel ,
442+ )
443+ with v3 .VTooltip (text = "Import previous state file" ):
444+ with v3 .Template (v_slot_activator = "{ props }" ):
445+ v3 .VBtn (
446+ v_bind = "props" ,
447+ disabled = (f"!{ self .name ('is_state_file' )} " ,),
448+ loading = (self .name ("state_loading" ), False ),
449+ classes = "text-none" ,
450+ color = "primary" ,
451+ text = "Import state file" ,
452+ variant = "flat" ,
453+ click = self .import_state_file ,
454+ )
455+ with v3 .VTooltip (text = "Load simulation and connectivity files" ):
456+ with v3 .Template (v_slot_activator = "{ props }" ):
457+ v3 .VBtn (
458+ v_bind = "props" ,
459+ classes = "text-none" ,
460+ color = (f"{ self .name ('error' )} ? 'error' : 'primary'" ,),
461+ text = "Load files" ,
462+ variant = "flat" ,
463+ disabled = (
464+ f"!{ self .name ('data_simulation' )} || !{ self .name ('data_connectivity' )} || { self .name ('error' )} " ,
465+ ),
466+ loading = (self .name ("loading" ), False ),
467+ click = self .load_data_files ,
468+ )
0 commit comments