Spaces:
Running

axeronis commited on
Commit
c5153bf
·
1 Parent(s): 8400df2

feat: MicroFunnel branding in header, scroll lock when sidebar open

Browse files
frontend/app/globals.css CHANGED
@@ -175,7 +175,6 @@ body {
175
  min-height: 100vh;
176
  -webkit-font-smoothing: antialiased;
177
  -moz-osx-font-smoothing: grayscale;
178
- overscroll-behavior-y: none;
179
  }
180
 
181
  /* === TYPOGRAPHY === */
@@ -660,11 +659,6 @@ input:-webkit-autofill:focus {
660
  padding-bottom: env(safe-area-inset-bottom, 0);
661
  }
662
 
663
- /* Safe area for top navigation */
664
- .safe-area-top {
665
- padding-top: env(safe-area-inset-top, 0);
666
- }
667
-
668
  /* Prevent zoom on iOS when focusing inputs */
669
  @media screen and (max-width: 767px) {
670
 
 
175
  min-height: 100vh;
176
  -webkit-font-smoothing: antialiased;
177
  -moz-osx-font-smoothing: grayscale;
 
178
  }
179
 
180
  /* === TYPOGRAPHY === */
 
659
  padding-bottom: env(safe-area-inset-bottom, 0);
660
  }
661
 
 
 
 
 
 
662
  /* Prevent zoom on iOS when focusing inputs */
663
  @media screen and (max-width: 767px) {
664
 
frontend/app/layout.tsx CHANGED
@@ -76,25 +76,22 @@ export default function RootLayout({
76
  </MobileSidebarWrapper>
77
 
78
  {/* Main Content Area Container */}
79
- {/* Main Content Area Container - removed transition-all to ensure fixed works relative to viewport */}
80
- <div className="flex-1 flex flex-col h-full min-w-0 relative">
81
  {/* Desktop Header */}
82
  <Header />
83
 
84
- {/* Mobile Header - fixed at top */}
85
- <div className="md:hidden fixed top-0 left-0 right-0 z-50 bg-[#0F172A] border-b border-white/10 safe-area-top shadow-lg shadow-black/20">
86
  <MobileHeader />
87
  </div>
88
 
89
- {/* Scrollable Content - INCREASED padding to ensure no overlap */}
90
- <main className="flex-1 overflow-y-auto w-full relative pt-[calc(4.5rem+env(safe-area-inset-top))] pb-[calc(5.5rem+env(safe-area-inset-bottom))] md:pt-0 md:pb-0 scroll-smooth">
91
- <div className="min-h-full">
92
- {children}
93
- </div>
94
  </main>
95
 
96
- {/* Mobile Bottom Navigation - fixed at bottom */}
97
- <div className="md:hidden fixed bottom-0 left-0 right-0 z-50 shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]">
98
  <MobileBottomNav />
99
  </div>
100
  </div>
 
76
  </MobileSidebarWrapper>
77
 
78
  {/* Main Content Area Container */}
79
+ <div className="flex-1 flex flex-col h-full min-w-0 overflow-hidden">
 
80
  {/* Desktop Header */}
81
  <Header />
82
 
83
+ {/* Mobile Header - in flex flow (not fixed) */}
84
+ <div className="md:hidden flex-shrink-0 bg-[#0F172A] border-b border-slate-800 z-40">
85
  <MobileHeader />
86
  </div>
87
 
88
+ {/* Scrollable Content - takes remaining space */}
89
+ <main className="flex-1 overflow-y-auto overflow-x-hidden w-full">
90
+ {children}
 
 
91
  </main>
92
 
93
+ {/* Mobile Bottom Navigation - in flex flow (not fixed) */}
94
+ <div className="md:hidden flex-shrink-0">
95
  <MobileBottomNav />
96
  </div>
97
  </div>
frontend/components/ChatWindow.tsx CHANGED
@@ -330,8 +330,8 @@ export function ChatWindow({
330
  onTrainAI={handleTrainAI}
331
  />
332
 
333
- {/* Messages Area - flex-1 handles height */}
334
- <div className="flex-1 overflow-y-auto p-4 md:p-6 space-y-6 bg-[#0D0E18] scrollbar-thin scrollbar-thumb-white/10">
335
  {isLoading ? (
336
  <div className="flex items-center justify-center h-full">
337
  <Loader2 className="w-8 h-8 animate-spin text-indigo-500" />
 
330
  onTrainAI={handleTrainAI}
331
  />
332
 
333
+ {/* Messages Area - with extra padding for fixed header/input on mobile */}
334
+ <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">
335
  {isLoading ? (
336
  <div className="flex items-center justify-center h-full">
337
  <Loader2 className="w-8 h-8 animate-spin text-indigo-500" />
frontend/components/ChatWindow/ChatHeader.tsx CHANGED
@@ -33,7 +33,7 @@ export function ChatHeader({
33
  onTrainAI,
34
  }: ChatHeaderProps) {
35
  return (
36
- <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 z-20">
37
  <div className="flex items-center gap-4">
38
  {/* Desktop Toggle */}
39
  <button
 
33
  onTrainAI,
34
  }: ChatHeaderProps) {
35
  return (
36
+ <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">
37
  <div className="flex items-center gap-4">
38
  {/* Desktop Toggle */}
39
  <button
frontend/components/ChatWindow/MessageInput.tsx CHANGED
@@ -132,7 +132,7 @@ export function MessageInput({
132
  }
133
 
134
  return (
135
- <div className="p-3 md:p-6 bg-[#0D0E18] flex-shrink-0 z-30">
136
  <div className="max-w-4xl mx-auto relative">
137
  {/* File Preview */}
138
  {selectedFile && (
 
132
  }
133
 
134
  return (
135
+ <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">
136
  <div className="max-w-4xl mx-auto relative">
137
  {/* File Preview */}
138
  {selectedFile && (
frontend/components/MobileNav.tsx CHANGED
@@ -51,13 +51,11 @@ export function MobileHeader({ onOpen }: { onOpen?: () => void }) {
51
 
52
  return (
53
  <div className="flex items-center justify-between p-3 text-white">
54
- {/* Left: Logo + Usage Badge */}
55
- <div className="flex items-center gap-2">
56
  <Link href="/dashboard" className="flex items-center gap-2">
57
  <img src="/logo-v2.png" alt="Logo" className="w-7 h-7 object-contain" />
58
- <span className="font-bold text-lg bg-clip-text text-transparent bg-gradient-to-r from-white to-indigo-200">
59
- MicroFunnel
60
- </span>
61
  </Link>
62
  {/* Compact usage badge */}
63
  {usageStats && (
@@ -158,11 +156,6 @@ export function MobileSidebarWrapper({ children }: { children: React.ReactNode }
158
  return () => document.removeEventListener('toggle-mobile-sidebar', handleToggle)
159
  }, [])
160
 
161
- // Close on route change
162
- useEffect(() => {
163
- setIsOpen(false)
164
- }, [pathname])
165
-
166
  // Lock body scroll when sidebar is open
167
  useEffect(() => {
168
  if (isOpen) {
@@ -175,6 +168,11 @@ export function MobileSidebarWrapper({ children }: { children: React.ReactNode }
175
  }
176
  }, [isOpen])
177
 
 
 
 
 
 
178
  return (
179
  <>
180
  {/* Backdrop */}
 
51
 
52
  return (
53
  <div className="flex items-center justify-between p-3 text-white">
54
+ {/* Left: Logo + Brand Name */}
55
+ <div className="flex items-center gap-3">
56
  <Link href="/dashboard" className="flex items-center gap-2">
57
  <img src="/logo-v2.png" alt="Logo" className="w-7 h-7 object-contain" />
58
+ <span className="font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 via-purple-400 to-pink-400">MicroFunnel</span>
 
 
59
  </Link>
60
  {/* Compact usage badge */}
61
  {usageStats && (
 
156
  return () => document.removeEventListener('toggle-mobile-sidebar', handleToggle)
157
  }, [])
158
 
 
 
 
 
 
159
  // Lock body scroll when sidebar is open
160
  useEffect(() => {
161
  if (isOpen) {
 
168
  }
169
  }, [isOpen])
170
 
171
+ // Close on route change
172
+ useEffect(() => {
173
+ setIsOpen(false)
174
+ }, [pathname])
175
+
176
  return (
177
  <>
178
  {/* Backdrop */}
frontend/components/bookings/BookingModal.tsx CHANGED
@@ -96,7 +96,7 @@ export function BookingModal({ isOpen, onClose, leadId, leadName }: BookingModal
96
  if (!isOpen) return null
97
 
98
  return (
99
- <div className="fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm">
100
  <motion.div
101
  initial={{ opacity: 0, scale: 0.95 }}
102
  animate={{ opacity: 1, scale: 1 }}
@@ -134,7 +134,7 @@ export function BookingModal({ isOpen, onClose, leadId, leadName }: BookingModal
134
  {/* Date Selection */}
135
  <div className="mb-6">
136
  <label className="block text-xs font-bold text-slate-400 uppercase tracking-wider mb-2">Выберите дату</label>
137
- <div className="flex gap-2 overflow-x-auto pb-2 scrollbar-none">
138
  {dates.map((date) => (
139
  <button
140
  key={date.toString()}
 
96
  if (!isOpen) return null
97
 
98
  return (
99
+ <div className="fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm">
100
  <motion.div
101
  initial={{ opacity: 0, scale: 0.95 }}
102
  animate={{ opacity: 1, scale: 1 }}
 
134
  {/* Date Selection */}
135
  <div className="mb-6">
136
  <label className="block text-xs font-bold text-slate-400 uppercase tracking-wider mb-2">Выберите дату</label>
137
+ <div className="flex gap-2 overflow-x-auto pb-2 scrollbar-hide">
138
  {dates.map((date) => (
139
  <button
140
  key={date.toString()}