Selaa lähdekoodia

fix(ui): show status name in pie chart tooltip

Replace the raw channel label "value" with the status title and a
localized total count in the status-distribution tooltip.

AI-Co-Authored-By: Grok
chendeben 1 kuukausi sitten
vanhempi
sitoutus
bfdb6651f8
3 muutettua tiedostoa jossa 10 lisäystä ja 2 poistoa
  1. 0 0
      public/assets/index-RYmNqsdv.js
  2. 1 1
      public/index.html
  3. 9 1
      src/pages/Dashboard.tsx

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
public/assets/index-RYmNqsdv.js


+ 1 - 1
public/index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>MailHub</title>
-    <script type="module" crossorigin src="/assets/index-DJK7kS6V.js"></script>
+    <script type="module" crossorigin src="/assets/index-RYmNqsdv.js"></script>
     <link rel="modulepreload" crossorigin href="/assets/styles-QhtMJdIX.js">
     <link rel="stylesheet" crossorigin href="/assets/styles-DnGt72Bi.css">
     <link rel="stylesheet" crossorigin href="/assets/index-Tu04tXLf.css">

+ 9 - 1
src/pages/Dashboard.tsx

@@ -145,7 +145,15 @@ export default function Dashboard({ analytics, domains, events, config, smtpCred
                   position: 'outside'
                 }}
                 legend={{ color: { position: 'bottom' } }}
-                tooltip={{ title: 'label' }}
+                tooltip={{
+                  title: (datum: { label?: string }) => datum.label || '',
+                  items: [
+                    (datum: { value?: number }) => ({
+                      name: t('metrics.total'),
+                      value: datum.value ?? 0
+                    })
+                  ]
+                }}
               />
             ) : (
               <EmptyState description={t('dashboard.noTrend')} />

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä