Spaces:
Running
Running
axeronis commited on
Commit ·
ca630f9
1
Parent(s): 55839d5
style: True single-glass mobile UI - removed double blur, fixed footer sync, redesigned send button, and fixed caret position
Browse files
frontend/app/layout.tsx
CHANGED
|
@@ -65,7 +65,7 @@ export default function RootLayout({
|
|
| 65 |
) : (
|
| 66 |
// App layout (with sidebar)
|
| 67 |
<ProtectedLayout>
|
| 68 |
-
<div className="flex h-screen
|
| 69 |
{/* Desktop Sidebar */}
|
| 70 |
<div className="hidden md:flex h-full relative z-20">
|
| 71 |
<Sidebar />
|
|
|
|
| 65 |
) : (
|
| 66 |
// App layout (with sidebar)
|
| 67 |
<ProtectedLayout>
|
| 68 |
+
<div className="flex h-screen relative text-white">
|
| 69 |
{/* Desktop Sidebar */}
|
| 70 |
<div className="hidden md:flex h-full relative z-20">
|
| 71 |
<Sidebar />
|
frontend/components/ChatWindow/ChatHeader.tsx
CHANGED
|
@@ -33,7 +33,7 @@ export function ChatHeader({
|
|
| 33 |
onTrainAI,
|
| 34 |
}: ChatHeaderProps) {
|
| 35 |
return (
|
| 36 |
-
<div className="bg-gradient-to-b from-black/60 to-transparent backdrop-blur-xl px-4 md:px-6 py-3 flex items-center justify-between flex-shrink-0 fixed md:relative top-16 md:top-0 left-0 right-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-black/40 md:bg-gradient-to-b md:from-black/60 md:to-transparent md:backdrop-blur-xl px-4 md:px-6 py-3 flex items-center justify-between flex-shrink-0 fixed md:relative top-16 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="
|
| 136 |
<div className="max-w-4xl mx-auto relative">
|
| 137 |
{/* File Preview */}
|
| 138 |
{selectedFile && (
|
|
@@ -233,9 +233,9 @@ export function MessageInput({
|
|
| 233 |
onChange={(e) => onChange(e.target.value)}
|
| 234 |
onKeyDown={handleKeyDown}
|
| 235 |
placeholder="Сообщение..."
|
| 236 |
-
className="flex-1 bg-transparent border-none focus:ring-0 resize-none max-h-32 py-2 px-3 text-
|
| 237 |
rows={1}
|
| 238 |
-
style={{ minHeight: '
|
| 239 |
disabled={disabled || isRecording}
|
| 240 |
/>
|
| 241 |
|
|
@@ -244,16 +244,26 @@ export function MessageInput({
|
|
| 244 |
type="submit"
|
| 245 |
disabled={(!value.trim() && !selectedFile) || isSending || disabled}
|
| 246 |
className={cn(
|
| 247 |
-
"p-2.5 rounded-xl transition-all duration-300",
|
| 248 |
((value.trim() || selectedFile) && !isSending && !disabled)
|
| 249 |
-
? "
|
| 250 |
: "text-slate-600 opacity-50 grayscale"
|
| 251 |
)}
|
| 252 |
>
|
| 253 |
{isSending ? (
|
| 254 |
<Loader2 className="w-5 h-5 animate-spin" />
|
| 255 |
) : (
|
| 256 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
)}
|
| 258 |
</button>
|
| 259 |
</form>
|
|
|
|
| 132 |
}
|
| 133 |
|
| 134 |
return (
|
| 135 |
+
<div className="px-3 pb-3 pt-2 bg-black/60 backdrop-blur-xl flex-shrink-0 md:relative fixed bottom-14 md:bottom-auto left-0 right-0 z-30">
|
| 136 |
<div className="max-w-4xl mx-auto relative">
|
| 137 |
{/* File Preview */}
|
| 138 |
{selectedFile && (
|
|
|
|
| 233 |
onChange={(e) => onChange(e.target.value)}
|
| 234 |
onKeyDown={handleKeyDown}
|
| 235 |
placeholder="Сообщение..."
|
| 236 |
+
className="flex-1 bg-transparent border-none focus:ring-0 resize-none max-h-32 py-2.5 px-3 text-[16px] leading-tight text-white placeholder:text-slate-500"
|
| 237 |
rows={1}
|
| 238 |
+
style={{ minHeight: '44px' }}
|
| 239 |
disabled={disabled || isRecording}
|
| 240 |
/>
|
| 241 |
|
|
|
|
| 244 |
type="submit"
|
| 245 |
disabled={(!value.trim() && !selectedFile) || isSending || disabled}
|
| 246 |
className={cn(
|
| 247 |
+
"p-2.5 rounded-xl transition-all duration-300 group relative",
|
| 248 |
((value.trim() || selectedFile) && !isSending && !disabled)
|
| 249 |
+
? "text-white"
|
| 250 |
: "text-slate-600 opacity-50 grayscale"
|
| 251 |
)}
|
| 252 |
>
|
| 253 |
{isSending ? (
|
| 254 |
<Loader2 className="w-5 h-5 animate-spin" />
|
| 255 |
) : (
|
| 256 |
+
<>
|
| 257 |
+
<Send className={cn(
|
| 258 |
+
"w-5 h-5 transition-all duration-300",
|
| 259 |
+
((value.trim() || selectedFile) && !isSending && !disabled)
|
| 260 |
+
? "filter drop-shadow-[0_0_8px_rgba(99,102,241,0.8)] scale-110"
|
| 261 |
+
: ""
|
| 262 |
+
)} />
|
| 263 |
+
{((value.trim() || selectedFile) && !isSending && !disabled) && (
|
| 264 |
+
<div className="absolute inset-0 bg-indigo-500/20 blur-xl rounded-full -z-10 animate-pulse" />
|
| 265 |
+
)}
|
| 266 |
+
</>
|
| 267 |
)}
|
| 268 |
</button>
|
| 269 |
</form>
|
frontend/components/LeadsList.tsx
CHANGED
|
@@ -170,7 +170,7 @@ export function LeadsList({
|
|
| 170 |
|
| 171 |
<div className="flex flex-col h-full bg-[#050510] border-r border-white/5">
|
| 172 |
{/* Header & Search - Fixed at top via flex parent */}
|
| 173 |
-
<div className="p-3 space-y-2 flex-shrink-0 bg-gradient-to-b from-black/60 to-transparent backdrop-blur-xl z-20">
|
| 174 |
<h2 className="text-lg font-bold text-white tracking-tight">{t('chats.title')}</h2>
|
| 175 |
|
| 176 |
{/* Search */}
|
|
|
|
| 170 |
|
| 171 |
<div className="flex flex-col h-full bg-[#050510] border-r border-white/5">
|
| 172 |
{/* Header & Search - Fixed at top via flex parent */}
|
| 173 |
+
<div className="p-3 space-y-2 flex-shrink-0 bg-black/40 md:bg-gradient-to-b md:from-black/60 md:to-transparent md:backdrop-blur-xl z-20">
|
| 174 |
<h2 className="text-lg font-bold text-white tracking-tight">{t('chats.title')}</h2>
|
| 175 |
|
| 176 |
{/* Search */}
|
frontend/components/MobileBottomNav.tsx
CHANGED
|
@@ -51,7 +51,7 @@ export function MobileBottomNav() {
|
|
| 51 |
animate={{ y: 0 }}
|
| 52 |
exit={{ y: '100%' }}
|
| 53 |
transition={{ type: 'spring', damping: 20, stiffness: 200 }}
|
| 54 |
-
className="fixed bottom-0 left-0 right-0 z-40 bg-
|
| 55 |
>
|
| 56 |
<div className="flex items-center justify-around h-14 px-4">
|
| 57 |
{/* Главная */}
|
|
|
|
| 51 |
animate={{ y: 0 }}
|
| 52 |
exit={{ y: '100%' }}
|
| 53 |
transition={{ type: 'spring', damping: 20, stiffness: 200 }}
|
| 54 |
+
className="fixed bottom-0 left-0 right-0 z-40 bg-black/60 safe-area-bottom"
|
| 55 |
>
|
| 56 |
<div className="flex items-center justify-around h-14 px-4">
|
| 57 |
{/* Главная */}
|