Quellcode durchsuchen

fix(settings): show rtlplayground details inside the external agents dialog (#1782) (#1799)

Nacho vor 1 Monat
Ursprung
Commit
805cb79587

+ 2 - 2
app/public/locales/en/translation.json

@@ -1870,10 +1870,10 @@
       "mqttCaption": "Fleet state published to the MQTT broker",
       "mcpCaption": "Read-only queries for AI assistants",
       "configure": "Configure {{name}}",
-      "rtlInfoTip": "rtlplayground turns these switches into NetPulse agents. Flashing guide and images:",
       "rtlInstructions": "Flashing instructions",
       "rtlTechGuide": "Technical guide",
-      "rtlImages": "Images"
+      "rtlImages": "Images",
+      "rtlDescription": "rtlplayground is the firmware for Realtek switches that turns them into NetPulse agents. Flashing instructions, technical guide and images:"
     },
     "session": {
       "active": "Active session on this device",

+ 2 - 2
app/public/locales/es/translation.json

@@ -1870,10 +1870,10 @@
       "mqttCaption": "Publicación del estado en el broker MQTT",
       "mcpCaption": "Consultas de solo lectura para asistentes de IA",
       "configure": "Configurar {{name}}",
-      "rtlInfoTip": "rtlplayground convierte estos switches en agentes de NetPulse. Guía de flasheo e imágenes:",
       "rtlInstructions": "Instrucciones de flasheo",
       "rtlTechGuide": "Guía técnica",
-      "rtlImages": "Imágenes"
+      "rtlImages": "Imágenes",
+      "rtlDescription": "rtlplayground es el firmware para switches Realtek que los convierte en agentes de NetPulse. Instrucciones de flasheo, guía técnica e imágenes:"
     },
     "session": {
       "active": "Sesión activa en este dispositivo",

+ 2 - 3
app/src/components/InfoTip.tsx

@@ -1,4 +1,3 @@
-import type { ReactNode } from 'react'
 import { Info } from 'lucide-react'
 import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
 
@@ -6,7 +5,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip
 // ratón, para que la sección quede con lo justo. Reusa el Tooltip radix de
 // la app (mismo patrón que PortPanel). Compartido por Settings y las cards
 // de integración (#1002).
-export function InfoTip({ text, children }: { text: string; children?: ReactNode }) {
+export function InfoTip({ text }: { text: string }) {
   return (
     <Tooltip>
       <TooltipTrigger asChild>
@@ -23,7 +22,7 @@ export function InfoTip({ text, children }: { text: string; children?: ReactNode
         </button>
       </TooltipTrigger>
       <TooltipContent side="top" className="max-w-xs text-left leading-relaxed">
-        {children ?? text}
+        {text}
       </TooltipContent>
     </Tooltip>
   )

+ 10 - 8
app/src/pages/Settings.tsx

@@ -4070,14 +4070,7 @@ function ServicesCard({
           <div className="flex items-center justify-between gap-4 py-2.5">
             <div className="flex min-w-0 items-center gap-3">
               <div className="min-w-0">
-                <div className="flex items-center gap-1.5">
-                  <p className="text-sm font-medium text-text-primary">{t('settings.services.externalAgents')}</p>
-                  <InfoTip text={t('settings.services.rtlInfoTip')}>
-                    <a className="block mt-1 text-accent hover:underline underline-offset-2" href="https://github.com/gnacho/netpulse/blob/main/docs/AGENTE-RTL-SWITCH.md" target="_blank" rel="noreferrer">{t('settings.services.rtlInstructions')}</a>
-                    <a className="block mt-1 text-accent hover:underline underline-offset-2" href="https://github.com/gnacho/RTLPlayground/blob/netpulse/beacon-octets/doc/beacon.md" target="_blank" rel="noreferrer">{t('settings.services.rtlTechGuide')}</a>
-                    <a className="block mt-1 text-accent hover:underline underline-offset-2" href="https://github.com/gnacho/RTLPlayground/releases" target="_blank" rel="noreferrer">{t('settings.services.rtlImages')}</a>
-                  </InfoTip>
-                </div>
+                <p className="text-sm font-medium text-text-primary">{t('settings.services.externalAgents')}</p>
                 <p className="truncate text-caption text-text-muted">{t('settings.services.externalAgentsCaption')}</p>
               </div>
             </div>
@@ -4168,6 +4161,15 @@ function ServicesCard({
           <DialogHeader>
             <DialogTitle className="sr-only">{t('settings.services.externalAgents')}</DialogTitle>
           </DialogHeader>
+          <div className="mb-4 rounded-xl border border-border bg-surface px-4 py-3">
+            <p className="text-sm font-medium text-text-primary">rtlplayground</p>
+            <p className="mt-1 text-caption leading-relaxed text-text-muted">{t('settings.services.rtlDescription')}</p>
+            <div className="mt-2 flex flex-wrap gap-x-4 gap-y-1 text-caption">
+              <a className="text-accent hover:underline underline-offset-2" href="https://github.com/gnacho/netpulse/blob/main/docs/AGENTE-RTL-SWITCH.md" target="_blank" rel="noreferrer">{t('settings.services.rtlInstructions')}</a>
+              <a className="text-accent hover:underline underline-offset-2" href="https://github.com/gnacho/RTLPlayground/blob/netpulse/beacon-octets/doc/beacon.md" target="_blank" rel="noreferrer">{t('settings.services.rtlTechGuide')}</a>
+              <a className="text-accent hover:underline underline-offset-2" href="https://github.com/gnacho/RTLPlayground/releases" target="_blank" rel="noreferrer">{t('settings.services.rtlImages')}</a>
+            </div>
+          </div>
           <Integrations bare />
         </DialogContent>
       </Dialog>