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:
@@ -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');
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
useUsersStore,
|
||||
useVersionControlStore,
|
||||
} from '@/stores';
|
||||
import { useI18n, useTelemetry, useToast, useUpgradeLink, useMessage } from '@/composables';
|
||||
import { useI18n, useTelemetry, useToast, useMessage } from '@/composables';
|
||||
|
||||
import ResourcesListLayout from '@/components/layouts/ResourcesListLayout.vue';
|
||||
import VariablesRow from '@/components/VariablesRow.vue';
|
||||
@@ -78,10 +78,6 @@ const datatableColumns = computed<DatatableColumn[]>(() => [
|
||||
]);
|
||||
|
||||
const contextBasedTranslationKeys = computed(() => uiStore.contextBasedTranslationKeys);
|
||||
const { upgradeLinkUrl } = useUpgradeLink({
|
||||
default: '&source=variables',
|
||||
desktop: '&utm_campaign=upgrade-variables',
|
||||
});
|
||||
|
||||
const newlyAddedVariableIds = ref<number[]>([]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user