refactor(ui): retire article feed and legacy jobs surfaces
Remove obsolete article and scrape-job screens and APIs, preserve reports, and clear legacy API caches from the service worker. Refs #8 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
import { Outlet, Navigate } from 'react-router-dom'
|
||||
import { Outlet, Navigate, useLocation } from 'react-router-dom'
|
||||
import { useAuth } from '@/lib/auth'
|
||||
import { Sidebar } from './Sidebar'
|
||||
import { MobileNav } from './MobileNav'
|
||||
|
||||
export function AppLayout() {
|
||||
const { token } = useAuth()
|
||||
const location = useLocation()
|
||||
const notice = typeof location.state?.notice === 'string' ? location.state.notice : null
|
||||
if (!token) return <Navigate to="/login" replace />
|
||||
|
||||
return (
|
||||
@ -15,7 +17,8 @@ export function AppLayout() {
|
||||
</div>
|
||||
|
||||
{/* Main content */}
|
||||
<main className="flex-1 overflow-y-auto pb-16 md:pb-0">
|
||||
<main className="min-w-0 flex-1 overflow-y-auto pb-16 md:pb-0">
|
||||
{notice && <p role="status" className="m-4 rounded-md border bg-muted p-3 text-sm">{notice}</p>}
|
||||
<Outlet />
|
||||
</main>
|
||||
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
import { NavLink } from 'react-router-dom'
|
||||
import { LayoutDashboard, Newspaper, Star, Settings, FileText } from 'lucide-react'
|
||||
import { LayoutDashboard, Star, Settings, FileText } from 'lucide-react'
|
||||
import { useAuth } from '@/lib/auth'
|
||||
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: '/', icon: LayoutDashboard, label: 'Synthèses' },
|
||||
{ to: '/assets', icon: Star, label: 'Indices suivis' },
|
||||
{ to: '/reports', icon: FileText, label: 'Rapports' },
|
||||
{ to: '/preferences', icon: Settings, label: 'Mes préférences' },
|
||||
]
|
||||
|
||||
@ -1,21 +1,19 @@
|
||||
import { NavLink } from 'react-router-dom'
|
||||
import { LayoutDashboard, Newspaper, Star, Settings, Key, Cpu, Database, ClipboardList, Users, LogOut, CalendarDays, FileText } from 'lucide-react'
|
||||
import { LayoutDashboard, Star, Settings, Key, Cpu, Database, Users, LogOut, CalendarDays, FileText } from 'lucide-react'
|
||||
import { useAuth } from '@/lib/auth'
|
||||
import { cn } from '@/lib/cn'
|
||||
|
||||
const navItems = [
|
||||
{ to: '/', icon: LayoutDashboard, label: 'Dashboard' },
|
||||
{ to: '/feed', icon: Newspaper, label: 'Actualités' },
|
||||
{ to: '/watchlist', icon: Star, label: 'Watchlist' },
|
||||
{ to: '/', icon: LayoutDashboard, label: 'Synthèses' },
|
||||
{ to: '/assets', icon: Star, label: 'Indices suivis' },
|
||||
{ to: '/preferences', icon: Settings, label: 'Mes préférences' },
|
||||
{ to: '/reports', icon: FileText, label: 'Rapports' },
|
||||
]
|
||||
|
||||
const adminItems = [
|
||||
{ to: '/admin/ai', icon: Cpu, label: 'Fournisseurs IA' },
|
||||
{ to: '/admin/credentials', icon: Key, label: 'Identifiants' },
|
||||
{ to: '/admin/credentials', icon: Key, label: 'Accès aux sources' },
|
||||
{ to: '/admin/sources', icon: Database, label: 'Sources et plafonds' },
|
||||
{ to: '/admin/jobs', icon: ClipboardList, label: 'Jobs' },
|
||||
{ to: '/admin/users', icon: Users, label: 'Utilisateurs' },
|
||||
{ to: '/admin/schedule', icon: CalendarDays, label: 'Planning' },
|
||||
{ to: '/admin/settings', icon: Settings, label: 'Paramètres' },
|
||||
|
||||
Reference in New Issue
Block a user