diff --git a/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue b/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue index c33e049ee8d95..5bea9fa37d62f 100644 --- a/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue +++ b/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue @@ -181,17 +181,7 @@ export default mixins(showMessage).extend({ this.modalBus.emit('close'); }, goToUpgrade() { - const linkUrlTranslationKey = this.uiStore.contextBasedTranslationKeys - .upgradeLinkUrl as BaseTextKey; - let linkUrl = this.$locale.baseText(linkUrlTranslationKey); - - if (linkUrlTranslationKey.endsWith('.upgradeLinkUrl')) { - linkUrl = `${this.usageStore.viewPlansUrl}&source=credential_sharing`; - } else if (linkUrlTranslationKey.endsWith('.desktop')) { - linkUrl = `${linkUrl}&utm_campaign=upgrade-credentials-sharing`; - } - - window.open(linkUrl, '_blank'); + this.uiStore.goToUpgrade('credential_sharing', 'upgrade-credentials-sharing'); }, }, mounted() { diff --git a/packages/editor-ui/src/components/ExecutionFilter.vue b/packages/editor-ui/src/components/ExecutionFilter.vue index 371a5e43f5c66..1f76ddf99f8e0 100644 --- a/packages/editor-ui/src/components/ExecutionFilter.vue +++ b/packages/editor-ui/src/components/ExecutionFilter.vue @@ -13,6 +13,7 @@ import { getObjectKeys, isEmpty } from '@/utils'; import { EnterpriseEditionFeature } from '@/constants'; import { useSettingsStore } from '@/stores/settings'; import { useUsageStore } from '@/stores/usage'; +import { useUIStore } from '@/stores/ui'; export type ExecutionFilterProps = { workflows?: IWorkflowShortResponse[]; @@ -20,10 +21,10 @@ export type ExecutionFilterProps = { }; const DATE_TIME_MASK = 'yyyy-MM-dd HH:mm'; -const CLOUD_UPGRADE_LINK = 'https://app.n8n.cloud/manage?edition=cloud'; const settingsStore = useSettingsStore(); const usageStore = useUsageStore(); +const uiStore = useUIStore(); const props = withDefaults(defineProps(), { popoverPlacement: 'bottom', }); @@ -32,11 +33,6 @@ const emit = defineEmits<{ }>(); const debouncedEmit = debounce(emit, 500); -const viewPlansLink = computed(() => - settingsStore.isCloudDeployment - ? CLOUD_UPGRADE_LINK - : `${usageStore.viewPlansUrl}&source=custom-data-filter`, -); const isAdvancedExecutionFilterEnabled = computed(() => settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.AdvancedExecutionFilters), ); @@ -128,6 +124,10 @@ const onFilterReset = () => { emit('filterChanged', filter); }; +const goToUpgrade = () => { + uiStore.goToUpgrade('custom-data-filter', 'upgrade-custom-data-filter'); +}; + onBeforeMount(() => { emit('filterChanged', filter); }); @@ -261,8 +261,8 @@ onBeforeMount(() => {