From 7b32e9b4fdca1268cedf861e1b3cf8401f2c0c58 Mon Sep 17 00:00:00 2001 From: Olivier Date: Sun, 17 May 2026 11:48:23 +0200 Subject: [PATCH] feat: add smart_tv, printer and smartphone device types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add three new device types (21 total) with Lucide icons (Tv2, Printer, Smartphone), colour-coded badges, and translations in fr/en/es. No backend migration needed — type is a free string field. Co-Authored-By: Claude Sonnet 4.6 --- README.es.md | 2 +- README.fr.md | 2 +- README.md | 2 +- frontend/src/components/DeviceIcon.vue | 5 ++++- frontend/src/components/DeviceManager.vue | 9 +++++++++ frontend/src/i18n.js | 9 +++++++++ 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/README.es.md b/README.es.md index 670881f..710b816 100644 --- a/README.es.md +++ b/README.es.md @@ -26,7 +26,7 @@ ## ✨ Características -- 🗂️ **Inventario manual** — añade y gestiona dispositivos (18 tipos) con IPs, VLANs, descripciones y enlaces web opcionales +- 🗂️ **Inventario manual** — añade y gestiona dispositivos (21 tipos) con IPs, VLANs, descripciones y enlaces web opcionales - 🗺️ **Vista de topología** — disposición en tarjetas por red (LAN / VLAN 802.1Q), con secciones WAN y puerta de enlace - 📡 **Ping ICMP** — comprueba la accesibilidad de todos los hosts conocidos con un clic - 🔍 **Descubrimiento automático** — ping sweep + consulta PTR DNS en una subred para importar nuevos hosts diff --git a/README.fr.md b/README.fr.md index ab1a58e..7c9e95b 100644 --- a/README.fr.md +++ b/README.fr.md @@ -26,7 +26,7 @@ ## ✨ Fonctionnalités -- 🗂️ **Inventaire manuel** — ajout et gestion d'équipements (18 types) avec IPs, VLANs, descriptions et liens web optionnels +- 🗂️ **Inventaire manuel** — ajout et gestion d'équipements (21 types) avec IPs, VLANs, descriptions et liens web optionnels - 🗺️ **Vue topologie** — disposition en cards par réseau (LAN / VLAN 802.1Q), avec sections WAN et passerelle - 📡 **Ping ICMP** — vérification de l'accessibilité de tous les hôtes connus en un clic - 🔍 **Découverte automatique** — ping sweep + lookup PTR DNS sur un sous-réseau pour importer de nouveaux hôtes diff --git a/README.md b/README.md index 0153012..3a252b7 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ ## ✨ Features -- 🗂️ **Manual inventory** — add and manage devices (18 types) with IPs, VLANs, descriptions and optional web links +- 🗂️ **Manual inventory** — add and manage devices (21 types) with IPs, VLANs, descriptions and optional web links - 🗺️ **Topology view** — card-based layout per network (LAN / VLAN 802.1Q), with WAN and gateway sections - 📡 **ICMP ping sweep** — check reachability of all known hosts in one click - 🔍 **Auto-discovery** — ping sweep + PTR DNS lookup on a subnet to import new hosts diff --git a/frontend/src/components/DeviceIcon.vue b/frontend/src/components/DeviceIcon.vue index 562f391..e138564 100644 --- a/frontend/src/components/DeviceIcon.vue +++ b/frontend/src/components/DeviceIcon.vue @@ -30,7 +30,7 @@ import { computed } from 'vue' import { Server, Network, Wifi, Database, Globe, GitFork, Camera, Thermometer, Gauge, House, PlugZap, ShieldAlert, - Lightbulb, BellRing, Antenna, Monitor, Laptop, Box, + Lightbulb, BellRing, Antenna, Monitor, Laptop, Tv2, Printer, Smartphone, Box, } from 'lucide-vue-next' import { detectBrands } from '../brandIcons.js' @@ -64,6 +64,9 @@ const LUCIDE_MAP = { access_point: Antenna, desktop: Monitor, laptop: Laptop, + smart_tv: Tv2, + printer: Printer, + smartphone: Smartphone, other: Box, } diff --git a/frontend/src/components/DeviceManager.vue b/frontend/src/components/DeviceManager.vue index aa099f8..85e8e57 100644 --- a/frontend/src/components/DeviceManager.vue +++ b/frontend/src/components/DeviceManager.vue @@ -299,6 +299,9 @@ const deviceTypes = computed(() => [ { value: 'access_point', label: t('typeAccessPoint') }, { value: 'desktop', label: t('typeDesktop') }, { value: 'laptop', label: t('typeLaptop') }, + { value: 'smart_tv', label: t('typeSmartTv') }, + { value: 'printer', label: t('typePrinter') }, + { value: 'smartphone', label: t('typeSmartphone') }, { value: 'other', label: t('typeOther') }, ]) @@ -566,6 +569,9 @@ h1 { font-size: 22px; font-weight: 700; color: var(--text-primary); } .icon-access_point { background: #CCFBF1; color: #0F766E; } .icon-desktop { background: #E0E7FF; color: #4338CA; } .icon-laptop { background: #DCFCE7; color: #15803D; } +.icon-smart_tv { background: #FCE7F3; color: #9D174D; } +.icon-printer { background: #ECFEFF; color: #0E7490; } +.icon-smartphone { background: #FFFBEB; color: #B45309; } .icon-other { background: #F1F5F9; color: #475569; } .device-info { flex: 1; min-width: 0; } @@ -593,6 +599,9 @@ h1 { font-size: 22px; font-weight: 700; color: var(--text-primary); } .badge-access_point { background: #14B8A6; } .badge-desktop { background: #4F46E5; } .badge-laptop { background: #16A34A; } +.badge-smart_tv { background: #DB2777; } +.badge-printer { background: #0891B2; } +.badge-smartphone { background: #D97706; } .badge-other { background: #94A3B8; } .badge-virt { background: #1E293B; } .badge-virt-baremetal { background: #475569; } diff --git a/frontend/src/i18n.js b/frontend/src/i18n.js index cc9bf18..b4ca8a1 100644 --- a/frontend/src/i18n.js +++ b/frontend/src/i18n.js @@ -91,6 +91,9 @@ const LANGS = { typeAccessPoint: 'Borne WiFi / Access Point', typeDesktop: 'Ordinateur fixe', typeLaptop: 'Ordinateur portable', + typeSmartTv: 'TV connectée', + typePrinter: 'Imprimante', + typeSmartphone: 'Smartphone', typeOther: 'Autre', virtBaremetal: 'Bare-metal', virtLxc: 'LXC', @@ -246,6 +249,9 @@ const LANGS = { typeAccessPoint: 'WiFi Access Point', typeDesktop: 'Desktop computer', typeLaptop: 'Laptop', + typeSmartTv: 'Smart TV', + typePrinter: 'Printer', + typeSmartphone: 'Smartphone', typeOther: 'Other', virtBaremetal: 'Bare-metal', virtLxc: 'LXC', @@ -398,6 +404,9 @@ const LANGS = { typeAccessPoint: 'Punto de acceso WiFi', typeDesktop: 'Ordenador de sobremesa', typeLaptop: 'Portátil', + typeSmartTv: 'Smart TV', + typePrinter: 'Impresora', + typeSmartphone: 'Smartphone', typeOther: 'Otro', virtBaremetal: 'Bare-metal', virtLxc: 'LXC',