jrrribeiro commited on
Commit
81fa8a1
·
verified ·
1 Parent(s): e66ceeb

Sync app from GitHub Actions (feature/project-state-security-privacy-review)

Browse files
Files changed (3) hide show
  1. src/ui/components.py +1 -1
  2. src/ui/login_page.py +1 -6
  3. src/ui/theme.py +20 -2
src/ui/components.py CHANGED
@@ -3,7 +3,7 @@ from html import escape
3
 
4
  def section_header_html(kicker: str, title: str, subtitle: str, *, class_name: str = "bn-panel") -> str:
5
  return (
6
- f"<div class='{class_name}' style='margin-bottom:12px;'>"
7
  f"<div class='bn-brand-kicker'>{escape(kicker)}</div>"
8
  f"<div class='bn-section-title'>{escape(title)}</div>"
9
  f"<div class='bn-compact-note'>{escape(subtitle)}</div>"
 
3
 
4
  def section_header_html(kicker: str, title: str, subtitle: str, *, class_name: str = "bn-panel") -> str:
5
  return (
6
+ f"<div class='{class_name}' style='box-sizing:border-box;width:100%;max-width:1490px;margin:0 auto 12px auto;'>"
7
  f"<div class='bn-brand-kicker'>{escape(kicker)}</div>"
8
  f"<div class='bn-section-title'>{escape(title)}</div>"
9
  f"<div class='bn-compact-note'>{escape(subtitle)}</div>"
src/ui/login_page.py CHANGED
@@ -88,9 +88,7 @@ def create_login_page(
88
  Tuple of (session_output, error_message, login_button)
89
  """
90
  with gr.Row(elem_classes=["bn-login-row"]):
91
- with gr.Column(scale=1, elem_classes=["bn-login-spacer"]):
92
- gr.Markdown("")
93
- with gr.Column(scale=6, elem_classes=["bn-login-panel"]):
94
  gr.Markdown("# BirdNET Validation Platform")
95
 
96
  session_output = gr.Textbox(
@@ -127,9 +125,6 @@ def create_login_page(
127
  )
128
  login_button = gr.Button("Login", variant="primary", scale=1)
129
  error_message = gr.Markdown()
130
- with gr.Column(scale=1, elem_classes=["bn-login-spacer"]):
131
- gr.Markdown("")
132
-
133
  if enable_oauth_login and login_button is not None:
134
  login_button.click(
135
  fn=lambda _button_value: None,
 
88
  Tuple of (session_output, error_message, login_button)
89
  """
90
  with gr.Row(elem_classes=["bn-login-row"]):
91
+ with gr.Column(scale=0, min_width=680, elem_classes=["bn-login-panel"]):
 
 
92
  gr.Markdown("# BirdNET Validation Platform")
93
 
94
  session_output = gr.Textbox(
 
125
  )
126
  login_button = gr.Button("Login", variant="primary", scale=1)
127
  error_message = gr.Markdown()
 
 
 
128
  if enable_oauth_login and login_button is not None:
129
  login_button.click(
130
  fn=lambda _button_value: None,
src/ui/theme.py CHANGED
@@ -46,6 +46,9 @@ main.app,
46
  .bn-login-row {
47
  justify-content: center !important;
48
  width: 100% !important;
 
 
 
49
  }
50
 
51
  .bn-login-spacer {
@@ -67,12 +70,15 @@ main.app,
67
  }
68
 
69
  .bn-app-header {
 
70
  display: flex;
71
  justify-content: space-between;
72
  gap: 20px;
73
  align-items: center;
 
 
74
  padding: 18px 22px;
75
- margin: 0 0 16px 0;
76
  background: linear-gradient(135deg, #ffffff 0%, #eef6f8 100%);
77
  border: 1px solid var(--bn-border);
78
  border-radius: 8px;
@@ -154,6 +160,18 @@ main.app,
154
  border-bottom: 1px solid var(--bn-border) !important;
155
  }
156
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  .bn-tabs button,
158
  .tabs button {
159
  border-radius: 6px 6px 0 0 !important;
@@ -1561,7 +1579,7 @@ def app_header_html(state_backend_message: str = "") -> str:
1561
  backend_text = "Filesystem state"
1562
  backend_class = "bn-pill-warn"
1563
  return f"""
1564
- <div class="bn-app-header">
1565
  <div>
1566
  <div class="bn-brand-kicker">BirdNET validation workspace</div>
1567
  <div class="bn-brand-title">BirdNET Validator</div>
 
46
  .bn-login-row {
47
  justify-content: center !important;
48
  width: 100% !important;
49
+ max-width: 1490px !important;
50
+ margin-left: auto !important;
51
+ margin-right: auto !important;
52
  }
53
 
54
  .bn-login-spacer {
 
70
  }
71
 
72
  .bn-app-header {
73
+ box-sizing: border-box;
74
  display: flex;
75
  justify-content: space-between;
76
  gap: 20px;
77
  align-items: center;
78
+ width: 100% !important;
79
+ max-width: 1490px !important;
80
  padding: 18px 22px;
81
+ margin: 0 auto 16px auto !important;
82
  background: linear-gradient(135deg, #ffffff 0%, #eef6f8 100%);
83
  border: 1px solid var(--bn-border);
84
  border-radius: 8px;
 
160
  border-bottom: 1px solid var(--bn-border) !important;
161
  }
162
 
163
+ .bn-tabs {
164
+ box-sizing: border-box;
165
+ width: 100% !important;
166
+ max-width: 1490px !important;
167
+ margin-left: auto !important;
168
+ margin-right: auto !important;
169
+ }
170
+
171
+ .bn-tabs .tabitem {
172
+ width: 100% !important;
173
+ }
174
+
175
  .bn-tabs button,
176
  .tabs button {
177
  border-radius: 6px 6px 0 0 !important;
 
1579
  backend_text = "Filesystem state"
1580
  backend_class = "bn-pill-warn"
1581
  return f"""
1582
+ <div class="bn-app-header" style="box-sizing:border-box;width:100%;max-width:1490px;margin:0 auto 16px auto;">
1583
  <div>
1584
  <div class="bn-brand-kicker">BirdNET validation workspace</div>
1585
  <div class="bn-brand-title">BirdNET Validator</div>