@@ -142,10 +142,8 @@ def callback(run_paths: List[str]):
142142 # Add text to go to parent directory
143143 new_element = html .Div (
144144 [
145- html .I (
146- className = "fas fa-folder-open fa-lg" ,
147- id = {"type" : "general-dynamic-add-run" , "index" : - 1 },
148- style = {"pointer-events" : "none" },
145+ dbc .Button (
146+ "+" , id = {"type" : "general-dynamic-add-run" , "index" : - 1 }, disabled = True
149147 ),
150148 dbc .Button (
151149 ".." ,
@@ -163,45 +161,23 @@ def callback(run_paths: List[str]):
163161
164162 for i , run_path in enumerate (run_paths ):
165163 run_name = run_handler .get_run_name (run_path )
166-
167- is_run = run_handler .is_run (run_path )
168- # Differenciate between run and directory for visibility and usability reasons
169- if is_run :
170- new_element = html .Div (
171- [
172- dbc .Button (
173- "+" , id = {"type" : "general-dynamic-add-run" , "index" : i }, size = "sm"
174- ),
175- dbc .Button (
176- run_name ,
177- id = {"type" : "general-dynamic-change-directory" , "index" : i },
178- color = "light" ,
179- disabled = True ,
180- ),
181- dcc .Store (
182- id = {"type" : "general-dynamic-available-run-path" , "index" : i },
183- data = run_path ,
184- ),
185- ],
186- className = "mb-1" ,
187- )
188- else :
189- new_element = html .Div (
190- [
191- html .I (className = "fas fa-folder fa-lg" ),
192- dbc .Button (
193- run_name ,
194- id = {"type" : "general-dynamic-change-directory" , "index" : i },
195- color = "link" ,
196- ),
197- dcc .Store (
198- id = {"type" : "general-dynamic-available-run-path" , "index" : i },
199- data = run_path ,
200- ),
201- ],
202- className = "mb-1" ,
203- )
164+ new_element = html .Div (
165+ [
166+ dbc .Button ("+" , id = {"type" : "general-dynamic-add-run" , "index" : i }),
167+ dbc .Button (
168+ run_name ,
169+ id = {"type" : "general-dynamic-change-directory" , "index" : i },
170+ color = "link" ,
171+ ),
172+ dcc .Store (
173+ id = {"type" : "general-dynamic-available-run-path" , "index" : i },
174+ data = run_path ,
175+ ),
176+ ],
177+ className = "mb-1" ,
178+ )
204179 children .append (new_element )
180+
205181 if len (children ) == 0 :
206182 return html .Div ("No runs found." )
207183
0 commit comments