From 9780311cd01c94afccd80eb2f6b71ca3dedbc4ed Mon Sep 17 00:00:00 2001 From: Blomios Date: Tue, 21 Apr 2026 18:54:29 +0200 Subject: [PATCH] fix: fix popup size and position for mobile --- frontend/src/components/layout/MobileNav.tsx | 3 +- frontend/src/pages/Dashboard.tsx | 43 +++++++++++--------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/layout/MobileNav.tsx b/frontend/src/components/layout/MobileNav.tsx index d11450d..e615538 100644 --- a/frontend/src/components/layout/MobileNav.tsx +++ b/frontend/src/components/layout/MobileNav.tsx @@ -1,11 +1,12 @@ import { NavLink } from 'react-router-dom' -import { LayoutDashboard, Newspaper, Star, Settings } from 'lucide-react' +import { LayoutDashboard, Newspaper, Star, Settings, FileText } from 'lucide-react' import { cn } from '@/lib/cn' const items = [ { to: '/', icon: LayoutDashboard, label: 'Dashboard' }, { to: '/feed', icon: Newspaper, label: 'Actus' }, { to: '/watchlist', icon: Star, label: 'Watchlist' }, + { to: '/reports', icon: FileText, label: 'Rapports' }, { to: '/admin', icon: Settings, label: 'Admin' }, ] diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx index 0281078..1f9bd51 100644 --- a/frontend/src/pages/Dashboard.tsx +++ b/frontend/src/pages/Dashboard.tsx @@ -1,5 +1,5 @@ import { useState, useEffect, useRef, useCallback } from 'react' -import { TrendingUp, Clock, Sparkles, MessageSquarePlus, Loader2, Plus, X, Send } from 'lucide-react' +import { TrendingUp, Clock, Sparkles, MessageSquarePlus, Loader2, Plus, X, Send, ChevronDown, ChevronUp } from 'lucide-react' import { summariesApi, type Summary } from '@/api/summaries' import { reportsApi } from '@/api/reports' import { assetsApi, type Asset } from '@/api/assets' @@ -68,6 +68,7 @@ function ContextPanel({ const [question, setQuestion] = useState('') const [submitting, setSubmitting] = useState(false) const [submitted, setSubmitted] = useState(false) + const [showExcerpts, setShowExcerpts] = useState(false) async function submit() { if (!question.trim() || submitting) return @@ -83,34 +84,38 @@ function ContextPanel({ } return ( -
+
{/* Header */}
- +
- {/* Extraits */} -
- {excerpts.map((e, i) => ( -
-
- « {e} » + {/* Extraits — toujours visible sur desktop, togglable sur mobile */} +
+ {excerpts.map((e, i) => ( +
+
+ « {e} » +
+
- -
- ))} -
+ ))} +
{/* Question */}