Spaces:
Running

axeronis commited on
Commit
8d40e42
·
1 Parent(s): dd54eac

fix: Lock background scroll when summary open, fixed drawer bottom gap, increased summary padding

Browse files
frontend/app/chats/page.tsx CHANGED
@@ -167,6 +167,18 @@ function ChatsContent() {
167
  }
168
  }
169
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  // Only show loading if no user data at all (cache miss)
171
  if (!user) {
172
  return (
@@ -277,7 +289,7 @@ function ChatsContent() {
277
  animate={{ opacity: 1 }}
278
  exit={{ opacity: 0 }}
279
  onClick={() => setIsMobileSummaryOpen(false)}
280
- className="lg:hidden fixed inset-0 top-16 bottom-14 bg-black/50 z-30"
281
  />
282
 
283
  {/* Drawer */}
@@ -285,7 +297,7 @@ function ChatsContent() {
285
  animate={{ x: 0 }}
286
  exit={{ x: '100%' }}
287
  transition={{ type: 'spring', damping: 30, stiffness: 300 }}
288
- className="lg:hidden fixed right-0 top-16 bottom-14 w-full sm:w-96 bg-surface border-l border-white/10 z-30 flex flex-col shadow-2xl"
289
  >
290
  <div className="sticky top-0 bg-surface-elevated border-b border-white/10 px-4 py-3 flex items-center justify-between z-10">
291
  <h3 className="font-semibold text-white">AI Summary</h3>
 
167
  }
168
  }
169
 
170
+ // Lock background scroll when mobile summary is open
171
+ useEffect(() => {
172
+ if (isMobileSummaryOpen) {
173
+ document.body.style.overflow = 'hidden'
174
+ } else {
175
+ document.body.style.overflow = ''
176
+ }
177
+ return () => {
178
+ document.body.style.overflow = ''
179
+ }
180
+ }, [isMobileSummaryOpen])
181
+
182
  // Only show loading if no user data at all (cache miss)
183
  if (!user) {
184
  return (
 
289
  animate={{ opacity: 1 }}
290
  exit={{ opacity: 0 }}
291
  onClick={() => setIsMobileSummaryOpen(false)}
292
+ className="lg:hidden fixed inset-0 top-16 bottom-[72px] bg-black/50 z-30"
293
  />
294
 
295
  {/* Drawer */}
 
297
  animate={{ x: 0 }}
298
  exit={{ x: '100%' }}
299
  transition={{ type: 'spring', damping: 30, stiffness: 300 }}
300
+ className="lg:hidden fixed right-0 top-16 bottom-[72px] w-full sm:w-96 bg-surface border-l border-white/10 z-30 flex flex-col shadow-2xl"
301
  >
302
  <div className="sticky top-0 bg-surface-elevated border-b border-white/10 px-4 py-3 flex items-center justify-between z-10">
303
  <h3 className="font-semibold text-white">AI Summary</h3>
frontend/components/ClientCard.tsx CHANGED
@@ -181,7 +181,7 @@ export function ClientCard({ lead, onTakeover, isAnalyzing, onRefresh, conversat
181
  </div>
182
 
183
  {/* Bottom Heat Widget */}
184
- <div className="p-6 mt-auto">
185
  <div className="bg-[#1A1B26] rounded-2xl p-5 border border-white/5 relative overflow-hidden group">
186
  {/* Glow Effect */}
187
  <div className="absolute top-0 right-0 w-32 h-32 bg-orange-500/10 blur-[40px] rounded-full pointer-events-none group-hover:bg-orange-500/20 transition-all duration-500" />
 
181
  </div>
182
 
183
  {/* Bottom Heat Widget */}
184
+ <div className="p-6 pb-12 mt-auto">
185
  <div className="bg-[#1A1B26] rounded-2xl p-5 border border-white/5 relative overflow-hidden group">
186
  {/* Glow Effect */}
187
  <div className="absolute top-0 right-0 w-32 h-32 bg-orange-500/10 blur-[40px] rounded-full pointer-events-none group-hover:bg-orange-500/20 transition-all duration-500" />