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": "Ingredients",
|
||||
"diffStepsLabel": "Steps",
|
||||
"viewGrid": "Grid view",
|
||||
"viewList": "List view",
|
||||
"viewCompact": "Compact view",
|
||||
"updatedLabel": "Updated {date}",
|
||||
"versionHistoryTitle": "Version History",
|
||||
"versionsLoading": "Loading versions...",
|
||||
"versionsEmpty": "No versions yet. Versions are saved automatically when you edit this recipe.",
|
||||
@@ -145,7 +149,7 @@
|
||||
"clickToSelect": "Click cards to select",
|
||||
"selectedCount": "{count} selected",
|
||||
"select": "Select",
|
||||
"visibility": "Visibility",
|
||||
"visibilityMenuLabel": "Visibility",
|
||||
"makePublic": "Make public",
|
||||
"makeUnlisted": "Make unlisted",
|
||||
"makePrivate": "Make private",
|
||||
|
||||
Reference in New Issue
Block a user