fix: unlisted-recipe share link wrongly warned it wouldn't work (v0.28.3)

The public /r/{id} route allows any visibility except "private", so
unlisted links always worked — the copy-link toast just checked for
visibility === "public" instead of !== "private", flagging unlisted
recipes as broken when they weren't.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Arnaud
2026-07-14 13:40:30 +02:00
parent b730dfac41
commit 21c541e115
5 changed files with 18 additions and 6 deletions
+5
View File
@@ -2,6 +2,11 @@
All notable changes to Epicure are documented here. This file is mirrored in-app at `/changelog` (and in the admin dashboard) via `apps/web/lib/changelog.ts` — update both together. All notable changes to Epicure are documented here. This file is mirrored in-app at `/changelog` (and in the admin dashboard) via `apps/web/lib/changelog.ts` — update both together.
## 0.28.3 — 2026-07-14 14:55
### Fixed
- Copying an unlisted recipe's share link wrongly warned "this link won't work until the recipe is Public" — unlisted links work fine (that's the point of unlisted); the warning now only shows for actually-private recipes.
## 0.28.2 — 2026-07-14 14:45 ## 0.28.2 — 2026-07-14 14:45
### Fixed ### Fixed
@@ -17,10 +17,10 @@ export function ShareRecipeButton({ recipeId, visibility }: { recipeId: string;
toast.error(t("shareCopyFailed")); toast.error(t("shareCopyFailed"));
return; return;
} }
if (visibility === "public") { if (visibility === "private") {
toast.success(t("shareLinkCopied"));
} else {
toast.info(t("shareNotPublicNotice")); toast.info(t("shareNotPublicNotice"));
} else {
toast.success(t("shareLinkCopied"));
} }
} }
+8 -1
View File
@@ -1,5 +1,5 @@
// Mirrors CHANGELOG.md at the repo root — update both together. // Mirrors CHANGELOG.md at the repo root — update both together.
export const APP_VERSION = "0.28.2"; export const APP_VERSION = "0.28.3";
export type ChangelogEntry = { export type ChangelogEntry = {
version: string; version: string;
@@ -11,6 +11,13 @@ export type ChangelogEntry = {
}; };
export const CHANGELOG: ChangelogEntry[] = [ export const CHANGELOG: ChangelogEntry[] = [
{
version: "0.28.3",
date: "2026-07-14 14:55",
fixed: [
"Copying an unlisted recipe's share link wrongly warned \"this link won't work until the recipe is Public\" — unlisted links work fine (that's the point of unlisted); the warning now only shows for actually-private recipes.",
],
},
{ {
version: "0.28.2", version: "0.28.2",
date: "2026-07-14 14:45", date: "2026-07-14 14:45",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@epicure/web", "name": "@epicure/web",
"version": "0.28.2", "version": "0.28.3",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "epicure", "name": "epicure",
"version": "0.28.2", "version": "0.28.3",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "pnpm --filter web dev", "dev": "pnpm --filter web dev",