feat: add debug page with tables and logs viewer (Step 1)
Backend: - Add /debug/tables endpoint to dump SQLite tables - Add /debug/logs endpoint to read scrap.log Frontend: - Add react-router-dom for navigation - Create HomePage and DebugPage components - Add navigation bar with Debug link - Style debug page with Gruvbox theme - Fix package.json dependencies versions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,21 +1,39 @@
|
||||
import React from "react";
|
||||
import { BrowserRouter, Routes, Route, NavLink } from "react-router-dom";
|
||||
import HomePage from "./pages/HomePage";
|
||||
import DebugPage from "./pages/DebugPage";
|
||||
|
||||
const App = () => (
|
||||
<div className="app-shell">
|
||||
<header className="app-header">
|
||||
<div className="brand">suivi_produits</div>
|
||||
<div className="actions">
|
||||
<button className="btn">Add Product</button>
|
||||
<button className="btn">Refresh</button>
|
||||
</div>
|
||||
</header>
|
||||
<main className="app-grid">
|
||||
{/* état vide avant ajout de produit */}
|
||||
<section className="empty-state">
|
||||
<p>Aucun produit pour l'instant, ajoutez un lien Amazon.fr !</p>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
<BrowserRouter>
|
||||
<div className="app-shell">
|
||||
<header className="app-header">
|
||||
<div className="brand">
|
||||
<NavLink to="/">suivi_produits</NavLink>
|
||||
</div>
|
||||
<nav className="nav-links">
|
||||
<NavLink to="/" className={({ isActive }) => isActive ? "active" : ""}>
|
||||
<i className="fa-solid fa-home"></i> Accueil
|
||||
</NavLink>
|
||||
<NavLink to="/debug" className={({ isActive }) => isActive ? "active" : ""}>
|
||||
<i className="fa-solid fa-bug"></i> Debug
|
||||
</NavLink>
|
||||
</nav>
|
||||
<div className="actions">
|
||||
<button className="btn btn-primary">
|
||||
<i className="fa-solid fa-plus"></i> Add Product
|
||||
</button>
|
||||
<button className="btn">
|
||||
<i className="fa-solid fa-refresh"></i> Refresh
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<Routes>
|
||||
<Route path="/" element={<HomePage />} />
|
||||
<Route path="/debug" element={<DebugPage />} />
|
||||
</Routes>
|
||||
</div>
|
||||
</BrowserRouter>
|
||||
);
|
||||
|
||||
export default App;
|
||||
|
||||
Reference in New Issue
Block a user