feat: bulk tag editing, bulk export, and move recipes between collections
Extends the existing bulk-select infra: recipes list gets tag add/remove and multi-recipe Markdown export; collection pages get a select mode to move recipes to another collection or remove them from the current one. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { Printer, UtensilsCrossed } from "lucide-react";
|
||||
import { auth } from "@/lib/auth/server";
|
||||
import { db, collections, eq, and, or } from "@epicure/db";
|
||||
import { RecipeCard } from "@/components/recipe/recipe-card";
|
||||
import { CollectionRecipesGrid } from "@/components/collections/collection-recipes-grid";
|
||||
import { ForkCollectionButton } from "@/components/collections/fork-collection-button";
|
||||
import { ShareCollectionButton } from "@/components/collections/share-collection-button";
|
||||
import { buttonVariants } from "@/components/ui/button";
|
||||
@@ -73,6 +74,11 @@ export default async function CollectionPage({ params }: Params) {
|
||||
|
||||
{col.recipes.length === 0 ? (
|
||||
<EmptyState icon={UtensilsCrossed} title={m.collections.emptyCollection} compact />
|
||||
) : isOwner ? (
|
||||
<CollectionRecipesGrid
|
||||
collectionId={id}
|
||||
recipes={col.recipes.flatMap((r) => (r.recipe ? [r.recipe] : []))}
|
||||
/>
|
||||
) : (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
|
||||
{col.recipes.map(({ recipe }) => (
|
||||
|
||||
Reference in New Issue
Block a user