Sdm0 commited on
Commit
ce491e5
Β·
verified Β·
1 Parent(s): f6e2ebc

Sync from GitHub via hub-sync

Browse files
Files changed (1) hide show
  1. app.py +12 -16
app.py CHANGED
@@ -334,12 +334,9 @@ details { margin-top: 8px; }
334
  details summary { cursor: pointer; color: #4b5563; font-weight: 500; }
335
 
336
  /* ── Theme toggle ─────────────────────────────────────────────────── */
337
- .theme-toggle-row {
338
- justify-content: flex-end !important;
339
- margin-top: -40px !important;
340
- margin-bottom: 8px !important;
341
- }
342
  #theme-toggle-btn {
 
 
343
  background: transparent !important;
344
  border: 1px solid #d1d5db !important;
345
  border-radius: 8px !important;
@@ -399,17 +396,16 @@ JS_TOGGLE_THEME = """
399
  with gr.Blocks(css=CSS, title="OpenCodeReview", theme=gr.themes.Soft()) as demo:
400
  demo.load(js=JS_RESTORE_THEME)
401
 
402
- gr.HTML(
403
- '<div style="display:flex;align-items:center">'
404
- '<div><h1>πŸ” OpenCodeReview</h1>'
405
- '<p style="color:var(--text-muted);margin-top:-8px">'
406
- 'AI-powered PR review with human-in-the-loop approval</p></div>'
407
- '</div>'
408
- )
409
-
410
- with gr.Row(elem_classes="theme-toggle-row"):
411
- theme_toggle = gr.Button("πŸŒ™", elem_id="theme-toggle-btn", size="sm", min_width=50)
412
- theme_toggle.click(js=JS_TOGGLE_THEME)
413
 
414
  # ── State ────────────────────────────────────────────────────────────
415
  pr_state = gr.State()
 
334
  details summary { cursor: pointer; color: #4b5563; font-weight: 500; }
335
 
336
  /* ── Theme toggle ─────────────────────────────────────────────────── */
 
 
 
 
 
337
  #theme-toggle-btn {
338
+ float: right;
339
+ margin-top: 24px !important;
340
  background: transparent !important;
341
  border: 1px solid #d1d5db !important;
342
  border-radius: 8px !important;
 
396
  with gr.Blocks(css=CSS, title="OpenCodeReview", theme=gr.themes.Soft()) as demo:
397
  demo.load(js=JS_RESTORE_THEME)
398
 
399
+ with gr.Row():
400
+ with gr.Column(scale=4):
401
+ gr.HTML(
402
+ '<h1>πŸ” OpenCodeReview</h1>'
403
+ '<p style="color:var(--text-muted);margin-top:-8px">'
404
+ 'AI-powered PR review with human-in-the-loop approval</p>'
405
+ )
406
+ with gr.Column(scale=1, min_width=60):
407
+ theme_toggle = gr.Button("πŸŒ™", elem_id="theme-toggle-btn", size="sm", min_width=50, visible=True)
408
+ theme_toggle.click(js=JS_TOGGLE_THEME)
 
409
 
410
  # ── State ────────────────────────────────────────────────────────────
411
  pr_state = gr.State()