art87able commited on
Commit
e1ee33b
·
verified ·
1 Parent(s): 9ff6699

fix(ui): hide empty Download box until export clicked

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1171,7 +1171,7 @@ def build_ui(
1171
  )
1172
  with handle:
1173
  handle.write(export_payload(records))
1174
- return handle.name, data
1175
 
1176
  def import_data(
1177
  file: Any, task: str, rows: list[dict[str, Any]], data: dict
@@ -1520,7 +1520,7 @@ def build_ui(
1520
  copy_button = gr.Button("Copy as checklist")
1521
  share_button = gr.Button("Copy share update")
1522
  ics_button = gr.Button("Add remaining steps to calendar (.ics)")
1523
- export_file = gr.File(label="Download", interactive=False)
1524
  ics_file = gr.File(label="Calendar (.ics)", interactive=False, visible=False)
1525
  checklist_output = gr.Textbox(
1526
  label="Checklist", lines=8, visible=False, buttons=["copy"]
 
1171
  )
1172
  with handle:
1173
  handle.write(export_payload(records))
1174
+ return gr.update(value=handle.name, visible=True), data
1175
 
1176
  def import_data(
1177
  file: Any, task: str, rows: list[dict[str, Any]], data: dict
 
1520
  copy_button = gr.Button("Copy as checklist")
1521
  share_button = gr.Button("Copy share update")
1522
  ics_button = gr.Button("Add remaining steps to calendar (.ics)")
1523
+ export_file = gr.File(label="Download", interactive=False, visible=False)
1524
  ics_file = gr.File(label="Calendar (.ics)", interactive=False, visible=False)
1525
  checklist_output = gr.Textbox(
1526
  label="Checklist", lines=8, visible=False, buttons=["copy"]