Spaces:
Running
Running
No filter CSS
Browse files
app.py
CHANGED
@@ -626,12 +626,13 @@ with gr.Blocks(title="Audit Q&A", css= "style.css", theme=theme,elem_id = "main-
|
|
626 |
pending_query = gr.State(None)
|
627 |
|
628 |
# Warning UI is implemented as a hidden row (to keep it simple)
|
629 |
-
with gr.Row(visible=False) as warning_row:
|
630 |
-
gr.
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
|
|
635 |
def show_warning():
|
636 |
"""Show warning popup when no filters selected"""
|
637 |
return gr.update(visible=True)
|
|
|
626 |
pending_query = gr.State(None)
|
627 |
|
628 |
# Warning UI is implemented as a hidden row (to keep it simple)
|
629 |
+
with gr.Row(visible=False, elem_id="warning-row") as warning_row:
|
630 |
+
with gr.Column():
|
631 |
+
gr.Markdown("<span class='warning-icon'>⚠️</span> **No report filter selected. Are you sure you want to proceed?**")
|
632 |
+
with gr.Row(elem_classes="warning-buttons"):
|
633 |
+
proceed_btn = gr.Button("Proceed", elem_classes="proceed")
|
634 |
+
cancel_btn = gr.Button("Cancel", elem_classes="cancel")
|
635 |
+
|
636 |
def show_warning():
|
637 |
"""Show warning popup when no filters selected"""
|
638 |
return gr.update(visible=True)
|
style.css
CHANGED
@@ -442,3 +442,93 @@ span.chatbot > p > img{
|
|
442 |
min-width: 100px;
|
443 |
margin: 0 5px;
|
444 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
442 |
min-width: 100px;
|
443 |
margin: 0 5px;
|
444 |
}
|
445 |
+
|
446 |
+
/* Warning popup styling */
|
447 |
+
#warning-row {
|
448 |
+
background-color: #fff3cd;
|
449 |
+
border: 1px solid #ffeeba;
|
450 |
+
border-radius: 4px;
|
451 |
+
padding: 15px 20px;
|
452 |
+
margin: 10px 0;
|
453 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
454 |
+
position: relative;
|
455 |
+
z-index: 1000;
|
456 |
+
font-size: 14px;
|
457 |
+
color: #856404;
|
458 |
+
width: 100%;
|
459 |
+
}
|
460 |
+
|
461 |
+
/* Only apply the animation when the element is visible */
|
462 |
+
#warning-row.visible {
|
463 |
+
animation: fadeIn 0.3s ease-in-out;
|
464 |
+
}
|
465 |
+
|
466 |
+
#warning-row p, #warning-row .warning-content {
|
467 |
+
font-weight: bold;
|
468 |
+
color: #856404;
|
469 |
+
margin: 0 0 10px 0;
|
470 |
+
text-align: center;
|
471 |
+
}
|
472 |
+
|
473 |
+
#warning-row .warning-icon {
|
474 |
+
color: #856404;
|
475 |
+
margin-right: 8px;
|
476 |
+
font-size: 1.2em;
|
477 |
+
}
|
478 |
+
|
479 |
+
#warning-row .warning-buttons {
|
480 |
+
display: flex;
|
481 |
+
justify-content: center;
|
482 |
+
gap: 15px;
|
483 |
+
margin-top: 10px;
|
484 |
+
width: 100%;
|
485 |
+
}
|
486 |
+
|
487 |
+
#warning-row button {
|
488 |
+
min-width: 100px;
|
489 |
+
border-radius: 4px;
|
490 |
+
transition: background-color 0.3s;
|
491 |
+
}
|
492 |
+
|
493 |
+
#warning-row button.proceed {
|
494 |
+
background-color: #4b8ec3;
|
495 |
+
color: white;
|
496 |
+
border: none;
|
497 |
+
}
|
498 |
+
|
499 |
+
#warning-row button.proceed:hover {
|
500 |
+
background-color: #3a7cb0;
|
501 |
+
}
|
502 |
+
|
503 |
+
#warning-row button.cancel {
|
504 |
+
background-color: #e0e0e0;
|
505 |
+
color: #333;
|
506 |
+
border: 1px solid #ccc;
|
507 |
+
}
|
508 |
+
|
509 |
+
#warning-row button.cancel:hover {
|
510 |
+
background-color: #d0d0d0;
|
511 |
+
}
|
512 |
+
|
513 |
+
/* Dark mode support */
|
514 |
+
body.dark #warning-row {
|
515 |
+
background-color: #382f22;
|
516 |
+
border-color: #6b5b30;
|
517 |
+
}
|
518 |
+
|
519 |
+
body.dark #warning-row p,
|
520 |
+
body.dark #warning-row .warning-content,
|
521 |
+
body.dark #warning-row .warning-icon {
|
522 |
+
color: #ffd866;
|
523 |
+
}
|
524 |
+
|
525 |
+
body.dark #warning-row button.cancel {
|
526 |
+
background-color: #4a4a4a;
|
527 |
+
color: #e0e0e0;
|
528 |
+
border-color: #555;
|
529 |
+
}
|
530 |
+
|
531 |
+
@keyframes fadeIn {
|
532 |
+
from { opacity: 0; transform: translateY(-10px); }
|
533 |
+
to { opacity: 1; transform: translateY(0); }
|
534 |
+
}
|