RoyAalekh commited on
Commit
814aa5b
Β·
1 Parent(s): 3318ff2

ui: rename account chooser and open list upwards to avoid viewport cutoff

Browse files

- Change label from 'Demo Accounts' to 'Choose Account'
- Make account dropdown open upwards (bottom: 100%) with proper animation
- Adjust toggle texts accordingly
- Increase z-index to ensure it overlays the container

Files changed (1) hide show
  1. static/login.html +8 -8
static/login.html CHANGED
@@ -184,17 +184,17 @@
184
 
185
  .accounts-dropdown {
186
  position: absolute;
187
- top: 100%;
188
  left: 0;
189
  right: 0;
190
  background: white;
191
  border: 1px solid var(--gray-200);
192
  border-radius: var(--radius-xl);
193
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
194
- z-index: 10;
195
  overflow: hidden;
196
  opacity: 0;
197
- transform: translateY(-10px);
198
  transition: all 0.2s ease;
199
  pointer-events: none;
200
  }
@@ -333,7 +333,7 @@
333
 
334
  <div class="demo-accounts">
335
  <button class="demo-toggle" id="demoToggle" onclick="toggleDemoAccounts()">
336
- Try Demo Accounts ↓
337
  </button>
338
 
339
  <div class="accounts-dropdown" id="accountsDropdown">
@@ -368,10 +368,10 @@
368
 
369
  if (dropdown.classList.contains('show')) {
370
  dropdown.classList.remove('show');
371
- toggle.textContent = 'Try Demo Accounts ↓';
372
  } else {
373
  dropdown.classList.add('show');
374
- toggle.textContent = 'Hide Demo Accounts ↑';
375
  }
376
  }
377
 
@@ -384,7 +384,7 @@
384
  const dropdown = document.getElementById('accountsDropdown');
385
  const toggle = document.getElementById('demoToggle');
386
  dropdown.classList.remove('show');
387
- toggle.textContent = 'Try Demo Accounts ↓';
388
 
389
  // Visual feedback on selection
390
  const button = event.target.closest('.account-item');
@@ -408,7 +408,7 @@
408
 
409
  if (!demoSection.contains(event.target) && dropdown.classList.contains('show')) {
410
  dropdown.classList.remove('show');
411
- document.getElementById('demoToggle').textContent = 'Try Demo Accounts ↓';
412
  }
413
  });
414
 
 
184
 
185
  .accounts-dropdown {
186
  position: absolute;
187
+ bottom: 100%; /* open upwards to avoid being cut off at the bottom */
188
  left: 0;
189
  right: 0;
190
  background: white;
191
  border: 1px solid var(--gray-200);
192
  border-radius: var(--radius-xl);
193
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
194
+ z-index: 20;
195
  overflow: hidden;
196
  opacity: 0;
197
+ transform: translateY(10px); /* animate from below upwards */
198
  transition: all 0.2s ease;
199
  pointer-events: none;
200
  }
 
333
 
334
  <div class="demo-accounts">
335
  <button class="demo-toggle" id="demoToggle" onclick="toggleDemoAccounts()">
336
+ Choose Account ↓
337
  </button>
338
 
339
  <div class="accounts-dropdown" id="accountsDropdown">
 
368
 
369
  if (dropdown.classList.contains('show')) {
370
  dropdown.classList.remove('show');
371
+ toggle.textContent = 'Choose Account ↓';
372
  } else {
373
  dropdown.classList.add('show');
374
+ toggle.textContent = 'Hide Accounts ↑';
375
  }
376
  }
377
 
 
384
  const dropdown = document.getElementById('accountsDropdown');
385
  const toggle = document.getElementById('demoToggle');
386
  dropdown.classList.remove('show');
387
+ toggle.textContent = 'Choose Account ↓';
388
 
389
  // Visual feedback on selection
390
  const button = event.target.closest('.account-item');
 
408
 
409
  if (!demoSection.contains(event.target) && dropdown.classList.contains('show')) {
410
  dropdown.classList.remove('show');
411
+ document.getElementById('demoToggle').textContent = 'Choose Account ↓';
412
  }
413
  });
414