feat: add smart_tv, printer and smartphone device types
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user