Просмотр исходного кода

fix(settings): name the vendor integrations section Complementos (#1785)

* fix(settings): name the vendor integrations section Complementos (#1782)

* fix(settings): name the vendor integrations section Complementos (#1782)
Nacho 1 месяц назад
Родитель
Сommit
304115c3b1

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

@@ -1863,8 +1863,8 @@
       "networkGroup": "Network services",
       "rackCaption": "Draw your rack and detect cables. Off by default.",
       "firmwareUpgradesCaption": "Show or hide the firmware upgrades page",
-      "integrationsGroup": "Add-ons",
-      "externalAgents": "External agents",
+      "integrationsGroup": "Integrations",
+      "externalAgents": "Add-ons",
       "rtlDesc": "Realtek switches can run rtlplayground, an alternative firmware that turns them into NetPulse agents: flashing guide in",
       "rtlGuideEs": "Guide in Spanish",
       "rtlGuideEn": "Guide in English",

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

@@ -1863,8 +1863,8 @@
       "networkGroup": "Servicios de red",
       "rackCaption": "Dibuja tu rack y detecta los cables. Desactivado por defecto.",
       "firmwareUpgradesCaption": "Muestra u oculta la página de actualizaciones de firmware",
-      "integrationsGroup": "Complementos",
-      "externalAgents": "Agentes externos",
+      "integrationsGroup": "Integraciones",
+      "externalAgents": "Complementos",
       "rtlDesc": "Los switches Realtek pueden llevar rtlplayground, un firmware alternativo que los convierte en agentes de NetPulse: guía de flasheo en",
       "rtlGuideEs": "Guía en español",
       "rtlGuideEn": "Guía en inglés",

+ 5 - 3
app/src/pages/Integrations.tsx

@@ -86,7 +86,7 @@ function stateTone(state: string): PillTone {
   return 'muted'
 }
 
-export default function Integrations() {
+export default function Integrations({ bare = false }: { bare?: boolean }) {
   const { t, i18n } = useTranslation()
   const auth = useAuth()
   const { isDemo } = useNetPulse()
@@ -515,7 +515,9 @@ export default function Integrations() {
         </form>
       )}
 
-      <SectionHeader title={t('integrations.listTitle')} className="mt-6" />
+      {!bare && (
+        <SectionHeader title={t('integrations.listTitle')} className="mt-6" />
+      )}
 
       {loading ? (
         <p className="text-caption text-text-muted">{t('integrations.loading')}</p>
@@ -740,7 +742,7 @@ export default function Integrations() {
         </div>
       )}
 
-      {unmanaged.length > 0 && (
+      {!bare && unmanaged.length > 0 && (
         <>
           <SectionHeader title={t('integrations.unmanagedTitle')} className="mt-8" />
           <p className="mt-1 text-caption text-text-muted">{t('integrations.unmanagedDesc')}</p>

+ 11 - 14
app/src/pages/Settings.tsx

@@ -4106,6 +4106,17 @@ function ServicesCard({
               />
             ))}
           </div>
+          {/* #1782: complementos (integraciones de vendor) plegados dentro de Ajustes. */}
+          <div className="pb-1 pt-4 text-label uppercase text-text-muted">
+            {t('settings.services.externalAgents')}
+          </div>
+          <p className="pb-3 text-sm text-text-muted">
+            {t('settings.services.rtlDesc')}{' '}
+            <a className="text-accent hover:underline" href="https://github.com/gnacho/netpulse/blob/main/docs/AGENTE-RTL-SWITCH.md" target="_blank" rel="noreferrer">{t('settings.services.rtlGuideEs')}</a>
+            {' · '}
+            <a className="text-accent hover:underline" href="https://github.com/gnacho/netpulse/blob/main/docs/RTL-SWITCH-BEACON.md" target="_blank" rel="noreferrer">{t('settings.services.rtlGuideEn')}</a>
+          </p>
+          <Integrations bare />
         </div>
       )}
 
@@ -4211,20 +4222,6 @@ function NotifChannels({ onSaved, disabled = false }: { onSaved: () => void; dis
             }}
           />
         ))}
-
-        {/* #1782: agentes externos plegados dentro de Ajustes (grupo Complementos). */}
-        <div className="mt-10">
-          <div className="mb-3 text-[11px] font-medium uppercase tracking-wide text-text-muted">
-            {t('settings.services.externalAgents')}
-          </div>
-          <p className="mb-3 text-[13px] text-text-muted">
-            {t('settings.services.rtlDesc')}{' '}
-            <a className="text-accent hover:underline" href="https://github.com/gnacho/netpulse/blob/main/docs/AGENTE-RTL-SWITCH.md" target="_blank" rel="noreferrer">{t('settings.services.rtlGuideEs')}</a>
-            {' · '}
-            <a className="text-accent hover:underline" href="https://github.com/gnacho/netpulse/blob/main/docs/RTL-SWITCH-BEACON.md" target="_blank" rel="noreferrer">{t('settings.services.rtlGuideEn')}</a>
-          </p>
-          <Integrations />
-        </div>
       <Dialog open={dialog === 'ntfy'} onOpenChange={(o) => { if (!o) setDialog(null) }}>
         <DialogContent className={integrationDialogCls} aria-describedby={undefined}>
           <DialogHeader>