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