fix: preserve landing page section content when toggled off (#838)
* preserve section content when toggled off * Update types.ts * Remove comment on LandingPageLinks enabled property Removed comment about the default visibility of the section. --------- Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
co-authored by
Rotimi Best
parent
0dc32b5210
commit
6537613000
@@ -107,7 +107,7 @@
|
||||
`;
|
||||
</script>
|
||||
|
||||
{#if callout}
|
||||
{#if callout && callout.enabled !== false}
|
||||
<EditableLandingSection sectionKey="callout">
|
||||
<section
|
||||
class={sectionClasses[variant]}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
{#if embed}
|
||||
{#if embed && embed.enabled !== false}
|
||||
<EditableLandingSection sectionKey="embed">
|
||||
{#if variant === 'terminal'}
|
||||
<section class="ui:py-24 ui:px-6" style="border-top: 1px solid #1c1f28; background: #06070a;">
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if links && links.cards.length > 0}
|
||||
{#if links && links.enabled !== false && links.cards.length > 0}
|
||||
<EditableLandingSection sectionKey="links">
|
||||
{#if variant === 'minimal'}
|
||||
<section class="ui:py-20 ui:px-4">
|
||||
|
||||
@@ -81,17 +81,17 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{#if links && links.cards.length > 0}
|
||||
{#if links && links.enabled !== false && links.cards.length > 0}
|
||||
<div class="plus-row"></div>
|
||||
<OrgLandingPageLinks {links} {labels} variant="saas" />
|
||||
{/if}
|
||||
|
||||
{#if embed}
|
||||
{#if embed && embed.enabled !== false}
|
||||
<div class="plus-row"></div>
|
||||
<OrgLandingPageEmbed {embed} {labels} variant="saas" />
|
||||
{/if}
|
||||
|
||||
{#if callout}
|
||||
{#if callout && callout.enabled !== false}
|
||||
<div class="plus-row"></div>
|
||||
<OrgLandingPageCallout {callout} {labels} variant="saas" />
|
||||
{/if}
|
||||
|
||||
@@ -91,6 +91,7 @@ export type OrgLandingPageFooterConfig = {
|
||||
};
|
||||
};
|
||||
export type LandingPageEmbed = {
|
||||
enabled?: boolean;
|
||||
title: string;
|
||||
description?: string;
|
||||
code: string;
|
||||
@@ -101,6 +102,7 @@ export type LandingPageEmbed = {
|
||||
};
|
||||
|
||||
export type LandingPageCallout = {
|
||||
enabled?: boolean;
|
||||
heading: string;
|
||||
description: string;
|
||||
action: {
|
||||
@@ -129,6 +131,7 @@ export type LandingPageLinkCard = {
|
||||
};
|
||||
|
||||
export type LandingPageLinks = {
|
||||
enabled?: boolean;
|
||||
heading: string;
|
||||
description?: string;
|
||||
/** Bold template card footer chip (e.g. Visit). */
|
||||
|
||||
Reference in New Issue
Block a user