Subh775 commited on
Commit
4a8ac7e
Β·
1 Parent(s): 0761715

broken js..

Browse files
Files changed (2) hide show
  1. static/app.js +7 -2
  2. static/style.css +36 -2
static/app.js CHANGED
@@ -64,7 +64,7 @@ const railAvatar = document.getElementById('railAvatar');
64
  // Settings
65
  const settingsOverlay = document.getElementById('settingsOverlay');
66
  const openSettingsBtn = document.getElementById('openSettingsBtn');
67
- const closeSettingsBtn= document.getElementById('closeSettingsBtn');
68
  const saveSettingsBtn = document.getElementById('saveSettingsBtn');
69
  const settingsModal = document.getElementById('settingsModal');
70
 
@@ -356,6 +356,11 @@ function showApp() {
356
  })
357
  .catch(() => {});
358
 
 
 
 
 
 
359
  // Show hero mode
360
  enterHeroMode();
361
  }
@@ -768,7 +773,7 @@ openSettingsBtn.addEventListener('click', () => {
768
  settingsOverlay.classList.add('show');
769
  });
770
 
771
- settingsCloseBtn.addEventListener('click', () => settingsOverlay.classList.remove('show'));
772
  settingsOverlay.addEventListener('click', (e) => {
773
  if (e.target === settingsOverlay) settingsOverlay.classList.remove('show');
774
  });
 
64
  // Settings
65
  const settingsOverlay = document.getElementById('settingsOverlay');
66
  const openSettingsBtn = document.getElementById('openSettingsBtn');
67
+ const settingsCloseBtn= document.getElementById('settingsCloseBtn');
68
  const saveSettingsBtn = document.getElementById('saveSettingsBtn');
69
  const settingsModal = document.getElementById('settingsModal');
70
 
 
356
  })
357
  .catch(() => {});
358
 
359
+ // On mobile, ensure sidebar starts collapsed so content is visible
360
+ if (window.innerWidth <= 768) {
361
+ collapseSidebar();
362
+ }
363
+
364
  // Show hero mode
365
  enterHeroMode();
366
  }
 
773
  settingsOverlay.classList.add('show');
774
  });
775
 
776
+ if (settingsCloseBtn) settingsCloseBtn.addEventListener('click', () => settingsOverlay.classList.remove('show'));
777
  settingsOverlay.addEventListener('click', (e) => {
778
  if (e.target === settingsOverlay) settingsOverlay.classList.remove('show');
779
  });
static/style.css CHANGED
@@ -1196,10 +1196,19 @@ body {
1196
  .mobile-fab-toggle { display: none !important; }
1197
 
1198
  @media (max-width: 768px) {
 
 
 
 
 
 
1199
  /* Sidebar slides in from left as fixed overlay */
1200
  .sidebar {
1201
  position: fixed; left: 0; top: 0;
1202
- height: 100vh; z-index: 40;
 
 
 
1203
  transition: transform var(--transition), opacity var(--transition);
1204
  }
1205
  /* Use transform instead of margin so the overlay sits behind */
@@ -1209,6 +1218,12 @@ body {
1209
  opacity: 0;
1210
  pointer-events: none;
1211
  }
 
 
 
 
 
 
1212
 
1213
  /* Overlay β€” must be above main content (z:30) but below sidebar (z:40) */
1214
  .sidebar-overlay {
@@ -1223,6 +1238,13 @@ body {
1223
 
1224
  .sidebar-rail { display: none !important; }
1225
 
 
 
 
 
 
 
 
1226
  /* Settings modal β€” fixed size, never jumps between tabs */
1227
  .settings-modal {
1228
  width: 96vw;
@@ -1272,15 +1294,27 @@ body {
1272
 
1273
  .hero-title { font-size: 22px; }
1274
  .hero-bot-icon { width: 80px; height: 80px; }
 
 
 
 
 
 
 
 
 
1275
  .hero-pills { grid-template-columns: 1fr; }
1276
  .hero-pill { font-size: 12px; padding: 12px 14px; }
1277
 
 
 
1278
  .login-title { font-size: 20px; white-space: normal; }
1279
 
1280
- /* Chat container β€” tighter side padding so text fills screen */
1281
  .chat-container {
1282
  padding: 60px 10px 16px;
1283
  gap: 16px;
 
1284
  }
1285
 
1286
  /* Message rows β€” use full width on mobile */
 
1196
  .mobile-fab-toggle { display: none !important; }
1197
 
1198
  @media (max-width: 768px) {
1199
+ /* App container: must not let fixed sidebar ghost-width push content */
1200
+ .app-container {
1201
+ overflow: hidden;
1202
+ position: relative;
1203
+ }
1204
+
1205
  /* Sidebar slides in from left as fixed overlay */
1206
  .sidebar {
1207
  position: fixed; left: 0; top: 0;
1208
+ width: var(--sidebar-width);
1209
+ height: 100vh;
1210
+ height: 100dvh;
1211
+ z-index: 40;
1212
  transition: transform var(--transition), opacity var(--transition);
1213
  }
1214
  /* Use transform instead of margin so the overlay sits behind */
 
1218
  opacity: 0;
1219
  pointer-events: none;
1220
  }
1221
+ /* When open, reset any desktop negative margin */
1222
+ .sidebar:not(.collapsed) {
1223
+ margin-left: 0;
1224
+ transform: translateX(0);
1225
+ opacity: 1;
1226
+ }
1227
 
1228
  /* Overlay β€” must be above main content (z:30) but below sidebar (z:40) */
1229
  .sidebar-overlay {
 
1238
 
1239
  .sidebar-rail { display: none !important; }
1240
 
1241
+ /* Main chat must fill entire screen width */
1242
+ .main-chat {
1243
+ width: 100vw;
1244
+ min-width: 100vw;
1245
+ flex: none;
1246
+ }
1247
+
1248
  /* Settings modal β€” fixed size, never jumps between tabs */
1249
  .settings-modal {
1250
  width: 96vw;
 
1294
 
1295
  .hero-title { font-size: 22px; }
1296
  .hero-bot-icon { width: 80px; height: 80px; }
1297
+
1298
+ /* Hero welcome β€” ensure it scrolls and pills stay on-screen */
1299
+ .hero-welcome {
1300
+ justify-content: flex-start;
1301
+ padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
1302
+ overflow-y: auto;
1303
+ min-height: 0;
1304
+ }
1305
+
1306
  .hero-pills { grid-template-columns: 1fr; }
1307
  .hero-pill { font-size: 12px; padding: 12px 14px; }
1308
 
1309
+ .hero-input-wrap { max-width: 100%; }
1310
+
1311
  .login-title { font-size: 20px; white-space: normal; }
1312
 
1313
+ /* Chat container β€” tighter side padding, use dvh for mobile browsers */
1314
  .chat-container {
1315
  padding: 60px 10px 16px;
1316
  gap: 16px;
1317
+ height: 100%;
1318
  }
1319
 
1320
  /* Message rows β€” use full width on mobile */