Merge pull request #11320 from Budibase/budi-7320-amend-email-support-disabled-logic-in-help-dropdown

Change email support logic in help dropdown.
This commit is contained in:
Martin McKeaveney 2023-07-21 14:56:52 +01:00 committed by GitHub
commit b451efe923
1 changed files with 6 additions and 5 deletions

View File

@ -4,7 +4,8 @@
import { licensing } from "stores/portal"
import { isEnabled, TENANT_FEATURE_FLAGS } from "helpers/featureFlags"
$: isPremiumUser = $licensing.license && !$licensing.isFreePlan
$: isBusinessAndAbove =
$licensing.isBusinessPlan || $licensing.isEnterprisePlan
let show
let hide
@ -55,22 +56,22 @@
<div class="divider" />
{#if isEnabled(TENANT_FEATURE_FLAGS.LICENSING)}
<a
href={isPremiumUser
href={isBusinessAndAbove
? "mailto:support@budibase.com"
: "/builder/portal/account/usage"}
>
<div class="premiumLinkContent" class:disabled={!isPremiumUser}>
<div class="premiumLinkContent" class:disabled={!isBusinessAndAbove}>
<div class="icon">
<FontAwesomeIcon name="fa-solid fa-envelope" />
</div>
<Body size="S">Email support</Body>
</div>
{#if !isPremiumUser}
{#if !isBusinessAndAbove}
<div class="premiumBadge">
<div class="icon">
<FontAwesomeIcon name="fa-solid fa-lock" />
</div>
<Body size="XS">Premium</Body>
<Body size="XS">Business</Body>
</div>
{/if}
</a>