From 6354600050a46eff9f34c24bfca7f13cea4f31ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Adel=C3=A9?= Date: Thu, 29 Oct 2026 16:42:45 +0100 Subject: [PATCH] feat: update button --- app/view/[id]/route.ts | 5 ++++- app/view/route.ts | 5 ++++- components/Playground.tsx | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/view/[id]/route.ts b/app/view/[id]/route.ts index 472efec..70d0040 100644 --- a/app/view/[id]/route.ts +++ b/app/view/[id]/route.ts @@ -68,7 +68,10 @@ export async function GET(
Slide Generator - Éditer +
+ Éditer + ↓ PNG +
${esc(title)} diff --git a/app/view/route.ts b/app/view/route.ts index 905d91a..6a27683 100644 --- a/app/view/route.ts +++ b/app/view/route.ts @@ -52,7 +52,10 @@ export async function GET(request: NextRequest) {
Slide Generator - Éditer +
+ Éditer + ↓ PNG +
${esc(title)} diff --git a/components/Playground.tsx b/components/Playground.tsx index 1ffbb4c..c0ccc0b 100644 --- a/components/Playground.tsx +++ b/components/Playground.tsx @@ -635,7 +635,11 @@ export function Playground({ templates, initialParams }: Props) { onClick={handleCopyUrl} disabled={hasNoOgFields || copySuccess === 'loading'} title={hasNoOgFields ? 'Renseigner au moins un champ Open Graph' : undefined} - className="px-3 py-1.5 text-xs bg-gray-800 hover:bg-gray-700 disabled:opacity-40 disabled:cursor-not-allowed text-gray-300 rounded-md transition-colors" + className={`px-3 py-1.5 text-xs rounded-md transition-colors disabled:opacity-40 disabled:cursor-not-allowed ${ + hasNoOgFields + ? 'bg-gray-800 text-gray-300' + : 'bg-emerald-600 hover:bg-emerald-500 text-white' + }`} > {copySuccess === 'loading' ? '...' : copySuccess === 'done' ? '✓ Copied!' : copySuccess === 'error' ? '✗ Error' : 'Copy URL'}