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

fix(ui): stop repeating the section name on the firmware page (#1824)

Nacho 1 месяц назад
Родитель
Сommit
68f405b0a3

+ 1 - 0
CHANGELOG.md

@@ -19,6 +19,7 @@ y este proyecto se adhiere a [Versionado Semántico](https://semver.org/lang/es/
 
 ### Changed
 
+- Firmware upgrades no longer repeats its own name (#1823). The page was the only one still printing the section title under the top bar, and the line below it opened with the same words. The title is gone and the line now says what the page does: track each unit, start the flash and keep a copy of the configuration first.
 - Page headers follow the topology one (#1822): the breadcrumb keeps its small caption size with the same chevron separator, and the line under it grows to the body size in the secondary colour, so the explanation reads before the controls. Every refresh control is icon-only now, square and with the accessible name kept, which also matches the height of the rest of the header actions.
 - The page title is no longer printed twice (#1815). The top bar already shows it, so the copy under the breadcrumb is gone and what stays is the breadcrumb plus a one-line explanation of what the page is for. Refresh actions in the page header are icon-only now, with the accessible name kept, and every header button shares the same height.
 - The per-unit actions live together now (#1803). **Regenerate token** moved from Settings > Fleet to the Actions column of the agents card, and **Forget host key** moved from the unit detail to the same card, so a unit's configuration is not split across three screens. Both keep their confirmation dialog and only appear where they apply: the token for netpulse agents, the host key for units NetPulse polls over SSH.

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

@@ -2440,7 +2440,7 @@
   },
   "firmwareUpgrades": {
     "title": "Firmware upgrades",
-    "subtitle": "Schedule OpenWrt firmware upgrades and track progress per router.",
+    "subtitle": "Track each unit, start the flash and keep a copy of the configuration before anything changes.",
     "disabledTitle": "Firmware upgrades is hidden",
     "disabledText": "Turn it on in Settings > Services to manage firmware upgrades from here.",
     "currentVersion": "Current version",

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

@@ -2440,7 +2440,7 @@
   },
   "firmwareUpgrades": {
     "title": "Actualizaciones de firmware",
-    "subtitle": "Programa actualizaciones de firmware OpenWrt y sigue el progreso por equipo.",
+    "subtitle": "Sigue el estado de cada equipo, lanza el flasheo y guarda una copia de la configuración antes de tocar nada.",
     "disabledTitle": "Actualizaciones de firmware está oculto",
     "disabledText": "Actívalo en Ajustes > Servicios para gestionar las actualizaciones desde aquí.",
     "currentVersion": "Versión actual",

+ 8 - 3
app/src/pages/FirmwareUpgrades.tsx

@@ -1,9 +1,10 @@
 import { useEffect, useMemo, useState } from 'react'
 import { useTranslation } from 'react-i18next'
+import { Link } from 'react-router'
 import { useNetPulse } from '@/data/DataProvider'
 import { useAuth } from '@/data/AuthContext'
 import { useServicesVisibility } from '@/hooks/useServicesVisibility'
-import { AlertCircle, CalendarClock, Cpu, PartyPopper, Radar, RefreshCw, Rocket, ShieldCheck, Terminal, TriangleAlert, Download } from 'lucide-react'
+import { AlertCircle, CalendarClock, ChevronRight, Cpu, Download, PartyPopper, Radar, RefreshCw, Rocket, ShieldCheck, Terminal, TriangleAlert } from 'lucide-react'
 import { cn } from '@/lib/utils'
 import { relTimeFromTs } from '@/i18n'
 import { findAgentFor } from '@/lib/agentMatch'
@@ -729,9 +730,13 @@ export default function FirmwareUpgrades() {
 
   return (
     <div className="space-y-4 md:space-y-5">
-      <header className="flex items-start justify-between gap-4">
+      <header className="flex flex-wrap items-end justify-between gap-x-4 gap-y-3">
         <div>
-          <h1 className="font-display text-h1 text-text-primary">{t('firmwareUpgrades.title')}</h1>
+          <nav aria-label={t('common.breadcrumb')} className="mb-1 flex items-center gap-1 text-caption text-text-muted">
+            <Link to="/" className="transition-colors hover:text-accent">{t('common.home')}</Link>
+            <ChevronRight className="h-3 w-3" strokeWidth={1.75} aria-hidden />
+            <span className="text-text-secondary" aria-current="page">{t('nav.firmwareUpgrades')}</span>
+          </nav>
           <p className="mt-0.5 text-sm text-text-secondary">{t('firmwareUpgrades.subtitle')}</p>
         </div>
         <button