From 0c269389de3fe771410c27264256754c75717397 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 23 Aug 2025 01:02:33 -0400 Subject: [PATCH] fix: update post editor actions based on draft/published status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When editing a draft post, the primary action is now "Save draft" with "Publish" in the dropdown menu. When editing a published post, the primary action is "Save post" with "Save as Draft" in the dropdown. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/routes/admin/posts/[id]/edit/+page.svelte | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/routes/admin/posts/[id]/edit/+page.svelte b/src/routes/admin/posts/[id]/edit/+page.svelte index 22cf298..b152b62 100644 --- a/src/routes/admin/posts/[id]/edit/+page.svelte +++ b/src/routes/admin/posts/[id]/edit/+page.svelte @@ -367,10 +367,12 @@ onStatusChange={handleSave} disabled={saving} isLoading={saving} - primaryAction={status === 'published' - ? { label: 'Save', status: 'published' } - : { label: 'Publish', status: 'published' }} - dropdownActions={[{ label: 'Save as Draft', status: 'draft', show: status !== 'draft' }]} + primaryAction={status === 'draft' + ? { label: 'Save draft', status: 'draft' } + : { label: 'Save post', status: 'published' }} + dropdownActions={status === 'draft' + ? [{ label: 'Publish', status: 'published' }] + : [{ label: 'Save as Draft', status: 'draft' }]} viewUrl={slug ? `/universe/${slug}` : undefined} />