From faa654c95ad50e4ce681b1029a97b242be11fc02 Mon Sep 17 00:00:00 2001 From: Gilles Soulier Date: Sat, 6 Jun 2026 07:53:57 +0200 Subject: [PATCH] =?UTF-8?q?feat(ui):=20config=20machine=20(sonde+proxy),?= =?UTF-8?q?=20mode=20Listing,=20d=C3=A9faut=20apt-cacher-ng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - popup Profil sur la tuile : sonde machine → propositions os_family/ machine_kind/virtualization avec Appliquer ; proxy APT (mode + url) + appliquer persistant - mode d'affichage Tuiles/Liste : toggle + bouton Ajouter déplacés dans le header de page ; vue Liste = liste compacte + panneau détail « Machine view » (sections Docker/Post-install dépliées ; pliées en mode tuile) - Popup rendu via portail document.body (position fixed, z-index 1000) : passe au premier plan, échappe au backdrop-filter des tuiles - Paramètres : onglet Proxy APT (défaut apt-cacher-ng + appliquer à toutes les machines) ; AddMachineModal pré-remplit le proxy par défaut - api client : settings, updateMachine, probe ; icônes network/grid/list Co-Authored-By: Claude Opus 4.8 --- client/src/App.tsx | 29 +- client/src/components/ui-kit.tsx | 9 +- .../src/features/machines/AddMachineModal.tsx | 30 +- client/src/features/machines/MachineTile.tsx | 293 +++++++++++++++++- client/src/lib/api.ts | 47 ++- client/src/panels/Dashboard.tsx | 60 +++- client/src/panels/SettingsModal.tsx | 84 +++++ client/src/styles/app.css | 61 ++++ 8 files changed, 588 insertions(+), 25 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index 7d01889..4ddb15a 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -2,11 +2,12 @@ import { useEffect, useState } from "react"; import type { SystemMetrics } from "@shared/types.js"; import { api } from "./lib/api.js"; -import type { DashboardSummary } from "./panels/Dashboard.js"; +import type { DashboardSummary, ViewMode } from "./panels/Dashboard.js"; import { HermesPanel } from "./panels/HermesPanel.js"; import { Dashboard } from "./panels/Dashboard.js"; import { TerminalPanel } from "./panels/TerminalPanel.js"; import { SettingsModal } from "./panels/SettingsModal.js"; +import { Icon } from "./components/ui-kit.js"; import { applyTheme, getInitialTheme, nextTheme, type Theme } from "./lib/theme.js"; const EMPTY_SUMMARY: DashboardSummary = { machines: 0, updates: 0, errors: 0, running: 0 }; @@ -17,6 +18,14 @@ export function App() { const [metrics, setMetrics] = useState(null); const [theme, setTheme] = useState(() => getInitialTheme()); const [settingsOpen, setSettingsOpen] = useState(false); + const [adding, setAdding] = useState(false); + const [view, setView] = useState( + () => (localStorage.getItem("su-view") as ViewMode) ?? "grid", + ); + function changeView(mode: ViewMode) { + setView(mode); + localStorage.setItem("su-view", mode); + } useEffect(() => { applyTheme(theme); @@ -57,6 +66,15 @@ export function App() { {summary.errors} erreurs
+
+ + +
+ @@ -66,7 +84,14 @@ export function App() {
- +