From e0d791d72bf25f73b1f3d056169c743d46beaa7b Mon Sep 17 00:00:00 2001 From: ithiame Date: Thu, 5 Dec 2024 12:48:15 +0000 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=A6=8B=20allow=20employee-only=20alter?= =?UTF-8?q?native=20desktop=20content=20on=20CMS=20page=20#1628?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/components/CmsForm.svelte | 36 +++++++++++++++++++ src/lib/types/CmsPage.ts | 2 ++ .../cms/[slug]/+page.server.ts | 8 +++-- .../cms/[slug]/cms-schema.ts | 3 +- .../cms/[slug]/translations/+page.svelte | 11 ++++++ .../cms/new/+page.server.ts | 6 ++++ 6 files changed, 63 insertions(+), 3 deletions(-) diff --git a/src/lib/components/CmsForm.svelte b/src/lib/components/CmsForm.svelte index 47304d7e1..733f67a00 100644 --- a/src/lib/components/CmsForm.svelte +++ b/src/lib/components/CmsForm.svelte @@ -14,9 +14,11 @@ fullScreen: boolean; hideFromSEO?: boolean; hasMobileContent?: boolean; + hasEmployeeContent?: boolean; maintenanceDisplay: boolean; content: string; mobileContent?: string; + employeeContent?: string; metas?: { name: string; content: string; @@ -32,7 +34,10 @@ let hideFromSEO = cmsPage?.hideFromSEO || false; let hasCustomMeta = !!cmsPage?.metas?.length; let hasMobileContent = cmsPage?.hasMobileContent || false; + let hasEmployeeContent = cmsPage?.hasEmployeeContent || false; let mobileContent = cmsPage?.mobileContent || ''; + let employeeContent = cmsPage?.employeeContent || ''; + function confirmDelete(event: Event) { if (!confirm('Would you like to delete this CMS page?')) { event.preventDefault(); @@ -276,6 +281,37 @@ /> {/if} + + {#if hasEmployeeContent} +