diff --git a/src/lib/util/util.ts b/src/lib/util/util.ts index 49dfa900..bb0dcda8 100644 --- a/src/lib/util/util.ts +++ b/src/lib/util/util.ts @@ -64,6 +64,16 @@ export const getMermaidAiLiveUrl = (utm: { utmCampaign: string; utmMedium: strin return `${MCBaseURL}/live?${buildUtmParams(utm).toString()}`; }; +export const getContactSalesUrl = (): string => { + const params = new URLSearchParams({ + contactSubject: 'contactSales', + utm_campaign: 'contact_sales', + utm_medium: 'button', + utm_source: getUTMSource() + }); + return `${MCBaseURL}/contact-us?${params.toString()}`; +}; + let count = 0; export const errorDebug = (limit = 1000) => { count += 1; diff --git a/src/routes/(app)/edit/+page.svelte b/src/routes/(app)/edit/+page.svelte index 5c2518d5..6dcde296 100644 --- a/src/routes/(app)/edit/+page.svelte +++ b/src/routes/(app)/edit/+page.svelte @@ -15,6 +15,7 @@ import Share from '$/components/Share.svelte'; import SyncRoughToolbar from '$/components/SyncRoughToolbar.svelte'; import { Button } from '$/components/ui/button'; + import { Separator } from '$/components/ui/separator'; import * as Resizable from '$/components/ui/resizable'; import { Switch } from '$/components/ui/switch'; import { Toggle } from '$/components/ui/toggle'; @@ -23,9 +24,10 @@ import type { EditorMode, Tab } from '$/types'; import { shouldShowEditorChooser } from '$/util/migration/domainMigration'; import { PanZoomState } from '$/util/panZoom'; + import { env } from '$/util/env'; import { validatedState, updateCodeStore, urls } from '$/util/state.svelte'; import { logEvent, logMermaidChartClick } from '$/util/stats'; - import { initHandler } from '$/util/util'; + import { getContactSalesUrl, initHandler } from '$/util/util'; import { onMount } from 'svelte'; import CodeIcon from '~icons/custom/code'; import HistoryIcon from '~icons/material-symbols/history'; @@ -95,17 +97,30 @@ - - - + {#if env.isEnabledMermaidChartLinks} + + + + + + + + {/if}