feat: add list and compact view modes to recipes page
Grid was the only layout. Add a view-mode toggle (grid/list/compact)
persisted to localStorage:
- List: thumbnail + description + inline metadata, one per row
- Compact: dense single-line rows (thumb, title, servings/time/
difficulty/date/visibility) for scanning large libraries
Selection mode and bulk actions work identically across all three.
Also fixes a real bug hit while wiring this up: "recipe.visibility"
was defined twice in the messages files — once as a flat string
("Visibility", used as the bulk-actions dropdown label) and once as
the {private,unlisted,public} label object. The object silently won
in JSON, so t("visibility") resolved to an object and next-intl threw
INSUFFICIENT_PATH the moment you opened that dropdown. Renamed the
flat one to visibilityMenuLabel.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -117,6 +117,10 @@
|
||||
"diffDescriptionLabel": "Description",
|
||||
"diffIngredientsLabel": "Ingrédients",
|
||||
"diffStepsLabel": "Étapes",
|
||||
"viewGrid": "Vue grille",
|
||||
"viewList": "Vue liste",
|
||||
"viewCompact": "Vue compacte",
|
||||
"updatedLabel": "Mis à jour le {date}",
|
||||
"versionHistoryTitle": "Historique des versions",
|
||||
"versionsLoading": "Chargement des versions...",
|
||||
"versionsEmpty": "Aucune version pour l'instant. Les versions sont enregistrées automatiquement lorsque vous modifiez cette recette.",
|
||||
@@ -145,7 +149,7 @@
|
||||
"clickToSelect": "Cliquez sur les cartes pour sélectionner",
|
||||
"selectedCount": "{count} sélectionnée(s)",
|
||||
"select": "Sélectionner",
|
||||
"visibility": "Visibilité",
|
||||
"visibilityMenuLabel": "Visibilité",
|
||||
"makePublic": "Rendre publique",
|
||||
"makeUnlisted": "Rendre non répertoriée",
|
||||
"makePrivate": "Rendre privée",
|
||||
|
||||
Reference in New Issue
Block a user