Change email support logic in help dropdown.

This commit is contained in:
Conor Webb 2023-07-21 14:00:02 +01:00
parent 85233797df
commit 5d04717be0
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>