feat(editor): Change upgrade CTA on community editions (no-changelog) (#6317)

* Change upgrade CTA on community editions

* upgrade CTA event

* Send source as ref in when redirecting

* fix tests

* import correcty telemetryfunction

* aja

* remove useUpgradeLink composable

* remove composable from index.ts

* Add goToUpgrade to usage view
This commit is contained in:
Ricardo Espinoza
2023-06-05 13:39:04 -04:00
committed by GitHub
parent 3b1a2f88b8
commit dc58340eee
7 changed files with 8 additions and 44 deletions

View File

@@ -6,11 +6,13 @@ import type { UsageTelemetry } from '@/stores/usage.store';
import { useUsageStore } from '@/stores/usage.store';
import { telemetry } from '@/plugins/telemetry';
import { i18n as locale } from '@/plugins/i18n';
import { useUIStore } from '@/stores';
import { N8N_PRICING_PAGE_URL } from '@/constants';
const usageStore = useUsageStore();
const route = useRoute();
const router = useRouter();
const uiStore = useUIStore();
const queryParamCallback = ref<string>(
`callback=${encodeURIComponent(`${window.location.origin}${window.location.pathname}`)}`,
@@ -104,6 +106,7 @@ const onAddActivationKey = () => {
};
const onViewPlans = () => {
uiStore.goToUpgrade('usage_page', 'open');
sendUsageTelemetry('view_plans');
};