Spaces:
Running on Zero
Running on Zero
CI deploy af874966
Browse files- app.py +11 -8
- src/ui/theme.py +6 -18
app.py
CHANGED
|
@@ -475,14 +475,17 @@ def build_app() -> gr.Blocks:
|
|
| 475 |
action_trigger = gr.Button("", elem_id=TRIGGER_ELEMENT_ID,
|
| 476 |
visible=True, variant="secondary")
|
| 477 |
|
| 478 |
-
|
| 479 |
-
|
| 480 |
-
#
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
|
|
|
|
|
|
|
|
|
| 486 |
|
| 487 |
with gr.Row(elem_classes="bit-zones", equal_height=False):
|
| 488 |
# Strategy Builder belongs to the Backtest tab only.
|
|
|
|
| 475 |
action_trigger = gr.Button("", elem_id=TRIGGER_ELEMENT_ID,
|
| 476 |
visible=True, variant="secondary")
|
| 477 |
|
| 478 |
+
top_html = gr.HTML(render_top(boot, None))
|
| 479 |
+
|
| 480 |
+
# `gr.LoginButton`, plain and unwrapped. It is what makes Gradio mount
|
| 481 |
+
# the OAuth routes at all -- without it /login/huggingface is a 404 --
|
| 482 |
+
# and it is deliberately NOT nested in a custom sticky flex row or
|
| 483 |
+
# given layout overrides. Dressing it up is what coincided with the
|
| 484 |
+
# redirect loop, and a sign-in that works is worth more than one that
|
| 485 |
+
# sits perfectly in the header bar.
|
| 486 |
+
if ON_SPACE:
|
| 487 |
+
with gr.Row(elem_classes="bit-loginrow"):
|
| 488 |
+
gr.LoginButton(value="Sign in with Hugging Face", size="sm")
|
| 489 |
|
| 490 |
with gr.Row(elem_classes="bit-zones", equal_height=False):
|
| 491 |
# Strategy Builder belongs to the Backtest tab only.
|
src/ui/theme.py
CHANGED
|
@@ -464,24 +464,12 @@ html, body{ height:auto !important; min-height:0 !important; }
|
|
| 464 |
max-height:560px !important;
|
| 465 |
}
|
| 466 |
|
| 467 |
-
/* The
|
| 468 |
-
|
| 469 |
-
.bit-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
}
|
| 474 |
-
.bit-headerbar > *:first-child{ flex:1 1 auto; min-width:0; }
|
| 475 |
-
.bit-headerbar header{ position:static !important; border-bottom:0 !important; }
|
| 476 |
-
.bit-login-btn{
|
| 477 |
-
align-self:center; margin-right:12px !important; flex:0 0 auto !important;
|
| 478 |
-
background:var(--accent-amber) !important; color:var(--stone-950) !important;
|
| 479 |
-
border:1px solid var(--accent-amber) !important;
|
| 480 |
-
font-family:var(--font-mono) !important; font-size:var(--text-2xs) !important;
|
| 481 |
-
padding:3px 8px !important; white-space:nowrap;
|
| 482 |
-
}
|
| 483 |
-
.bit-login-btn:hover{
|
| 484 |
-
background:var(--stone-950) !important; color:var(--accent-amber) !important;
|
| 485 |
}
|
| 486 |
|
| 487 |
/* ================= header help tooltip =================
|
|
|
|
| 464 |
max-height:560px !important;
|
| 465 |
}
|
| 466 |
|
| 467 |
+
/* The sign-in row sits directly under the header. Colour only -- no layout,
|
| 468 |
+
positioning or pointer overrides on the OAuth control itself. */
|
| 469 |
+
.bit-loginrow{
|
| 470 |
+
padding:6px 12px !important; gap:0 !important;
|
| 471 |
+
background:var(--bg-panel);
|
| 472 |
+
border-bottom:1px solid var(--border-default);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 473 |
}
|
| 474 |
|
| 475 |
/* ================= header help tooltip =================
|