Spaces:
Running
Running
axeronis commited on
Commit ·
a5f1f5e
1
Parent(s): 8bf69ca
fix: mobile fixed headers/inputs - MobileHeader fixed, ChatHeader fixed top-14, MessageInput fixed bottom-12
Browse files
frontend/app/layout.tsx
CHANGED
|
@@ -80,11 +80,11 @@ export default function RootLayout({
|
|
| 80 |
{/* Desktop Header */}
|
| 81 |
<Header />
|
| 82 |
|
| 83 |
-
{/* Mobile Header -
|
| 84 |
<MobileHeader />
|
| 85 |
|
| 86 |
-
{/* Scrollable Content - with padding for bottom nav on mobile */}
|
| 87 |
-
<main className="flex-1 overflow-y-auto w-full relative pb-14 md:pb-0">
|
| 88 |
{children}
|
| 89 |
</main>
|
| 90 |
|
|
|
|
| 80 |
{/* Desktop Header */}
|
| 81 |
<Header />
|
| 82 |
|
| 83 |
+
{/* Mobile Header - fixed at top */}
|
| 84 |
<MobileHeader />
|
| 85 |
|
| 86 |
+
{/* Scrollable Content - with padding for headers and bottom nav on mobile */}
|
| 87 |
+
<main className="flex-1 overflow-y-auto w-full relative pt-14 pb-14 md:pt-0 md:pb-0">
|
| 88 |
{children}
|
| 89 |
</main>
|
| 90 |
|
frontend/components/ChatWindow.tsx
CHANGED
|
@@ -252,8 +252,8 @@ export function ChatWindow({
|
|
| 252 |
onOpenBookingModal={() => setIsBookingModalOpen(true)}
|
| 253 |
/>
|
| 254 |
|
| 255 |
-
{/* Messages Area */}
|
| 256 |
-
<div className="flex-1 overflow-y-auto p-6 space-y-6 bg-[#0D0E18] scrollbar-thin scrollbar-thumb-white/10">
|
| 257 |
{isLoading ? (
|
| 258 |
<div className="flex items-center justify-center h-full">
|
| 259 |
<Loader2 className="w-8 h-8 animate-spin text-indigo-500" />
|
|
|
|
| 252 |
onOpenBookingModal={() => setIsBookingModalOpen(true)}
|
| 253 |
/>
|
| 254 |
|
| 255 |
+
{/* Messages Area - with extra padding for fixed header/input on mobile */}
|
| 256 |
+
<div className="flex-1 overflow-y-auto p-4 md:p-6 pt-16 md:pt-6 pb-24 md:pb-6 space-y-6 bg-[#0D0E18] scrollbar-thin scrollbar-thumb-white/10">
|
| 257 |
{isLoading ? (
|
| 258 |
<div className="flex items-center justify-center h-full">
|
| 259 |
<Loader2 className="w-8 h-8 animate-spin text-indigo-500" />
|
frontend/components/ChatWindow/ChatHeader.tsx
CHANGED
|
@@ -30,7 +30,7 @@ export function ChatHeader({
|
|
| 30 |
onOpenBookingModal,
|
| 31 |
}: ChatHeaderProps) {
|
| 32 |
return (
|
| 33 |
-
<div className="bg-surface-elevated border-b border-white/10 px-4 md:px-6 py-3 flex items-center justify-between
|
| 34 |
<div className="flex items-center gap-4">
|
| 35 |
{/* Desktop Toggle */}
|
| 36 |
<button
|
|
|
|
| 30 |
onOpenBookingModal,
|
| 31 |
}: ChatHeaderProps) {
|
| 32 |
return (
|
| 33 |
+
<div className="bg-surface-elevated border-b border-white/10 px-4 md:px-6 py-3 flex items-center justify-between flex-shrink-0 fixed md:relative top-14 md:top-0 left-0 right-0 z-20">
|
| 34 |
<div className="flex items-center gap-4">
|
| 35 |
{/* Desktop Toggle */}
|
| 36 |
<button
|
frontend/components/ChatWindow/MessageInput.tsx
CHANGED
|
@@ -83,7 +83,7 @@ export function MessageInput({
|
|
| 83 |
}
|
| 84 |
|
| 85 |
return (
|
| 86 |
-
<div className="p-3 md:p-6 bg-[#0D0E18] flex-shrink-0">
|
| 87 |
<div className="max-w-4xl mx-auto relative">
|
| 88 |
{/* File Preview */}
|
| 89 |
{selectedFile && (
|
|
|
|
| 83 |
}
|
| 84 |
|
| 85 |
return (
|
| 86 |
+
<div className="p-3 md:p-6 bg-[#0D0E18] flex-shrink-0 md:relative fixed bottom-12 md:bottom-auto left-0 right-0 z-30">
|
| 87 |
<div className="max-w-4xl mx-auto relative">
|
| 88 |
{/* File Preview */}
|
| 89 |
{selectedFile && (
|
frontend/components/MobileNav.tsx
CHANGED
|
@@ -50,7 +50,7 @@ export function MobileHeader({ onOpen }: { onOpen?: () => void }) {
|
|
| 50 |
const isUnlimited = limitDialogs === null || limitDialogs === undefined
|
| 51 |
|
| 52 |
return (
|
| 53 |
-
<div className="md:hidden flex items-center justify-between p-3 bg-[#0F172A] text-white border-b border-slate-800
|
| 54 |
{/* Left: Logo + Usage Badge */}
|
| 55 |
<div className="flex items-center gap-2">
|
| 56 |
<Link href="/dashboard" className="flex items-center gap-2">
|
|
|
|
| 50 |
const isUnlimited = limitDialogs === null || limitDialogs === undefined
|
| 51 |
|
| 52 |
return (
|
| 53 |
+
<div className="md:hidden fixed top-0 left-0 right-0 flex items-center justify-between p-3 bg-[#0F172A] text-white border-b border-slate-800 z-40">
|
| 54 |
{/* Left: Logo + Usage Badge */}
|
| 55 |
<div className="flex items-center gap-2">
|
| 56 |
<Link href="/dashboard" className="flex items-center gap-2">
|