jrrribeiro commited on
Commit
c018d00
·
verified ·
1 Parent(s): 34a93d4

Sync app from GitHub Actions

Browse files
Files changed (2) hide show
  1. src/ui/app_factory.py +29 -22
  2. src/ui/theme.py +63 -1
src/ui/app_factory.py CHANGED
@@ -4465,29 +4465,36 @@ def create_app() -> gr.Blocks:
4465
  report_recent_prev_btn = gr.Button("Previous recent page", elem_classes=["bn-clean-action"])
4466
  report_recent_next_btn = gr.Button("Next recent page", elem_classes=["bn-clean-action"])
4467
  report_status = gr.Markdown("")
4468
- with gr.Group(elem_classes=["bn-report-panel", "bn-report-download-panel"]):
4469
- gr.HTML(
4470
- section_header_html(
4471
- "Download",
4472
- "Complete validation dataset",
4473
- "Export every detection with the validation fields already filled in for the selected project.",
4474
- class_name="bn-panel-soft",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4475
  )
4476
- )
4477
- with gr.Row(elem_classes=["bn-clean-button-row"]):
4478
- report_export_csv_btn = gr.Button("Download CSV", variant="primary", elem_classes=["bn-clean-action"])
4479
- report_export_xlsx_btn = gr.Button("Download XLSX", elem_classes=["bn-clean-action"])
4480
- report_export_status = gr.Markdown("")
4481
- report_export_csv_file = gr.DownloadButton(
4482
- "Download prepared CSV",
4483
- elem_id="bn-report-export-csv-download",
4484
- elem_classes=["bn-autodownload-target"],
4485
- )
4486
- report_export_xlsx_file = gr.DownloadButton(
4487
- "Download prepared XLSX",
4488
- elem_id="bn-report-export-xlsx-download",
4489
- elem_classes=["bn-autodownload-target"],
4490
- )
4491
 
4492
  def _list_project_detections(project_slug: str) -> list[Detection]:
4493
  if not project_slug:
 
4465
  report_recent_prev_btn = gr.Button("Previous recent page", elem_classes=["bn-clean-action"])
4466
  report_recent_next_btn = gr.Button("Next recent page", elem_classes=["bn-clean-action"])
4467
  report_status = gr.Markdown("")
4468
+ with gr.Column(elem_classes=["bn-report-download-section"]):
4469
+ with gr.Group(elem_classes=["bn-report-panel", "bn-report-download-panel"]):
4470
+ gr.HTML(
4471
+ section_header_html(
4472
+ "Download",
4473
+ "Complete validation dataset",
4474
+ "Export every detection with the validation fields already filled in for the selected project.",
4475
+ class_name="bn-panel-soft",
4476
+ )
4477
+ )
4478
+ report_export_status = gr.Markdown("")
4479
+ report_export_csv_file = gr.DownloadButton(
4480
+ "Download prepared CSV",
4481
+ elem_id="bn-report-export-csv-download",
4482
+ elem_classes=["bn-autodownload-target"],
4483
+ )
4484
+ report_export_xlsx_file = gr.DownloadButton(
4485
+ "Download prepared XLSX",
4486
+ elem_id="bn-report-export-xlsx-download",
4487
+ elem_classes=["bn-autodownload-target"],
4488
+ )
4489
+ with gr.Row(elem_classes=["bn-report-download-action-row"]):
4490
+ report_export_csv_btn = gr.Button(
4491
+ "Download CSV",
4492
+ elem_classes=["bn-report-download-action", "bn-report-download-action-orange"],
4493
+ )
4494
+ report_export_xlsx_btn = gr.Button(
4495
+ "Download XLSX",
4496
+ elem_classes=["bn-report-download-action", "bn-report-download-action-blue"],
4497
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4498
 
4499
  def _list_project_detections(project_slug: str) -> list[Detection]:
4500
  if not project_slug:
src/ui/theme.py CHANGED
@@ -16,7 +16,12 @@ APP_CSS = """
16
  --bn-shadow: 0 8px 24px rgba(20, 32, 51, 0.07);
17
  }
18
 
 
19
  body,
 
 
 
 
20
  .gradio-container {
21
  background: var(--bn-bg) !important;
22
  color: var(--bn-text) !important;
@@ -737,6 +742,12 @@ button.bn-admin-action-red:hover {
737
  min-height: 54px !important;
738
  }
739
 
 
 
 
 
 
 
740
  .bn-report-download-panel,
741
  .bn-report-download-panel .block,
742
  .bn-report-download-panel .form {
@@ -744,7 +755,58 @@ button.bn-admin-action-red:hover {
744
  }
745
 
746
  .bn-report-download-panel {
747
- margin-top: 12px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
748
  }
749
 
750
  .bn-autodownload-target {
 
16
  --bn-shadow: 0 8px 24px rgba(20, 32, 51, 0.07);
17
  }
18
 
19
+ html,
20
  body,
21
+ gradio-app,
22
+ main.app,
23
+ .wrap,
24
+ .contain,
25
  .gradio-container {
26
  background: var(--bn-bg) !important;
27
  color: var(--bn-text) !important;
 
742
  min-height: 54px !important;
743
  }
744
 
745
+ .bn-report-download-section {
746
+ margin-top: 12px;
747
+ background: var(--bn-bg) !important;
748
+ gap: 8px !important;
749
+ }
750
+
751
  .bn-report-download-panel,
752
  .bn-report-download-panel .block,
753
  .bn-report-download-panel .form {
 
755
  }
756
 
757
  .bn-report-download-panel {
758
+ box-shadow: none !important;
759
+ }
760
+
761
+ .bn-report-download-panel > .styler,
762
+ .bn-report-download-panel .styler {
763
+ background: var(--bn-bg) !important;
764
+ }
765
+
766
+ .bn-report-download-section,
767
+ .bn-report-download-action-row,
768
+ .bn-report-download-action-row > *,
769
+ .bn-report-download-action-row .block,
770
+ .bn-report-download-action-row .form {
771
+ background: var(--bn-bg) !important;
772
+ }
773
+
774
+ div.row.bn-report-download-action-row {
775
+ background-color: var(--bn-bg) !important;
776
+ background-image: linear-gradient(var(--bn-bg), var(--bn-bg)) !important;
777
+ }
778
+
779
+ .bn-report-download-action button,
780
+ button.bn-report-download-action {
781
+ min-height: 48px !important;
782
+ border-radius: 8px !important;
783
+ font-weight: 790 !important;
784
+ }
785
+
786
+ .bn-report-download-action-orange button,
787
+ button.bn-report-download-action-orange {
788
+ border-color: #f97316 !important;
789
+ background: #f97316 !important;
790
+ color: #ffffff !important;
791
+ }
792
+
793
+ .bn-report-download-action-orange button:hover,
794
+ button.bn-report-download-action-orange:hover {
795
+ border-color: #ea580c !important;
796
+ background: #ea580c !important;
797
+ }
798
+
799
+ .bn-report-download-action-blue button,
800
+ button.bn-report-download-action-blue {
801
+ border-color: #93c5fd !important;
802
+ background: #dbeafe !important;
803
+ color: #075985 !important;
804
+ }
805
+
806
+ .bn-report-download-action-blue button:hover,
807
+ button.bn-report-download-action-blue:hover {
808
+ border-color: #60a5fa !important;
809
+ background: #bfdbfe !important;
810
  }
811
 
812
  .bn-autodownload-target {