From 65b00e3a7302be5dab2b142ee8369c0033165699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 5 Jun 2026 00:25:27 +0200 Subject: [PATCH] feat(dashboard): add a wrench shortcut to the dashboard settings beside the add button Place a monochrome ghost wrench icon-button immediately to the left of the dashboard add button, linking to the layout/tile editor at /settings/dashboard. The button carries an aria-label and matches the add button's 44 px mobile touch-target floor, shrinking to the icon footprint on sm+. New customizeDashboard string lands in all six locales. --- messages/de.json | 1 + messages/en.json | 1 + messages/es.json | 1 + messages/fr.json | 1 + messages/it.json | 1 + messages/pl.json | 1 + src/app/page.tsx | 23 +++++++++++++++++++++++ 7 files changed, 29 insertions(+) diff --git a/messages/de.json b/messages/de.json index 9e91c6ef3..ad0c3b1b5 100644 --- a/messages/de.json +++ b/messages/de.json @@ -275,6 +275,7 @@ "quickAddMeasurement": "Messung erfassen", "quickAddMood": "Stimmung erfassen", "quickAddMedicationIntake": "Einnahme erfassen", + "customizeDashboard": "Dashboard anpassen", "medicationIntakeQuickAdd": { "sheetTitle": "Medikamenteneinnahme erfassen", "sheetDescription": "Dosis, Zeitpunkt und Medikament in wenigen Tipps protokollieren.", diff --git a/messages/en.json b/messages/en.json index 65806192e..34d45d3bc 100644 --- a/messages/en.json +++ b/messages/en.json @@ -275,6 +275,7 @@ "quickAddMeasurement": "Log measurement", "quickAddMood": "Log mood", "quickAddMedicationIntake": "Log medication intake", + "customizeDashboard": "Customize dashboard", "medicationIntakeQuickAdd": { "sheetTitle": "Log medication intake", "sheetDescription": "Record dose, time, and medication in a few taps.", diff --git a/messages/es.json b/messages/es.json index 01ddba072..c4b0034d4 100644 --- a/messages/es.json +++ b/messages/es.json @@ -275,6 +275,7 @@ "quickAddMeasurement": "Registrar medición", "quickAddMood": "Registrar estado de ánimo", "quickAddMedicationIntake": "Registrar toma", + "customizeDashboard": "Personalizar panel", "medicationIntakeQuickAdd": { "sheetTitle": "Registrar toma de medicación", "sheetDescription": "Registra dosis, hora y medicamento en unos pocos toques.", diff --git a/messages/fr.json b/messages/fr.json index b51cbe148..80e56762d 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -275,6 +275,7 @@ "quickAddMeasurement": "Saisir une mesure", "quickAddMood": "Saisir une humeur", "quickAddMedicationIntake": "Saisir une prise", + "customizeDashboard": "Personnaliser le tableau de bord", "medicationIntakeQuickAdd": { "sheetTitle": "Saisir une prise de médicament", "sheetDescription": "Enregistre la dose, l’heure et le médicament en quelques touches.", diff --git a/messages/it.json b/messages/it.json index 5f845c3b4..5d43ed82d 100644 --- a/messages/it.json +++ b/messages/it.json @@ -275,6 +275,7 @@ "quickAddMeasurement": "Registra misurazione", "quickAddMood": "Registra umore", "quickAddMedicationIntake": "Registra assunzione", + "customizeDashboard": "Personalizza dashboard", "medicationIntakeQuickAdd": { "sheetTitle": "Registra assunzione del farmaco", "sheetDescription": "Registra dose, orario e farmaco con pochi tap.", diff --git a/messages/pl.json b/messages/pl.json index f8090a09c..22322c137 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -275,6 +275,7 @@ "quickAddMeasurement": "Zarejestruj pomiar", "quickAddMood": "Zarejestruj nastrój", "quickAddMedicationIntake": "Zarejestruj przyjęcie", + "customizeDashboard": "Dostosuj pulpit", "medicationIntakeQuickAdd": { "sheetTitle": "Zarejestruj przyjęcie leku", "sheetDescription": "Zapisz dawkę, godzinę i lek w kilku stuknięciach.", diff --git a/src/app/page.tsx b/src/app/page.tsx index 6aec28a80..c0635e6b2 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -17,6 +17,7 @@ import { Target, TrendingUp, Waves, + Wrench, } from "lucide-react"; import { convertGlucose, resolveGlucoseUnit } from "@/lib/glucose"; import { cn } from "@/lib/utils"; @@ -27,6 +28,7 @@ import { } from "@/lib/dashboard-layout"; import type { DashboardAnalyticsData as AnalyticsData } from "@/types/analytics"; import dynamic from "next/dynamic"; +import Link from "next/link"; import { Button } from "@/components/ui/button"; import { EmptyState } from "@/components/ui/empty-state"; import { ChartSkeleton } from "@/components/charts/chart-skeleton"; @@ -809,6 +811,27 @@ export default function DashboardPage() {

{welcomeText}

+ {/* Wrench shortcut to the dashboard-customization settings + (the tile/layout editor at /settings/dashboard). Sits to + the left of the add button as a monochrome ghost icon, with + a `min-h-11 min-w-11` mobile floor so it meets the 44 px + touch-target contract the add button also honours, shrinking + back to the 40 px icon footprint on sm+. */} + {/* v1.4.33 maintainer-item-7 — restore proportional sizing