From a79c253345a4192bf750895774c47b8b8fd101c6 Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Mon, 9 Jan 2023 14:57:51 +0200 Subject: [PATCH] feat: Add source to all View Plans links (no-changelog) (#5097) feat: Add source to all View Plans links --- .../src/components/CredentialEdit/CredentialSharing.ee.vue | 2 +- .../editor-ui/src/components/MainHeader/WorkflowDetails.vue | 2 +- packages/editor-ui/src/components/WorkflowShareModal.ee.vue | 2 +- packages/editor-ui/src/views/SettingsUsageAndPlan.vue | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue b/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue index 071333ac75..181ecec202 100644 --- a/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue +++ b/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue @@ -181,7 +181,7 @@ export default mixins(showMessage).extend({ goToUpgrade() { let linkUrl = this.$locale.baseText(this.uiStore.contextBasedTranslationKeys.upgradeLinkUrl); if (linkUrl.includes('subscription')) { - linkUrl = this.usageStore.viewPlansUrl; + linkUrl = `${this.usageStore.viewPlansUrl}&source=credential_sharing`; } window.open(linkUrl, '_blank'); diff --git a/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue b/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue index 80a3a59fbe..1d8ff7e90a 100644 --- a/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue +++ b/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue @@ -524,7 +524,7 @@ export default mixins(workflowHelpers, titleChange).extend({ goToUpgrade() { let linkUrl = this.$locale.baseText(this.contextBasedTranslationKeys.upgradeLinkUrl); if (linkUrl.includes('subscription')) { - linkUrl = this.usageStore.viewPlansUrl; + linkUrl = `${this.usageStore.viewPlansUrl}&source=workflow_sharing`; } window.open(linkUrl, '_blank'); diff --git a/packages/editor-ui/src/components/WorkflowShareModal.ee.vue b/packages/editor-ui/src/components/WorkflowShareModal.ee.vue index d874a3c2a0..b5ecf5b8ce 100644 --- a/packages/editor-ui/src/components/WorkflowShareModal.ee.vue +++ b/packages/editor-ui/src/components/WorkflowShareModal.ee.vue @@ -439,7 +439,7 @@ export default mixins(showMessage).extend({ goToUpgrade() { let linkUrl = this.$locale.baseText(this.uiStore.contextBasedTranslationKeys.upgradeLinkUrl); if (linkUrl.includes('subscription')) { - linkUrl = this.usageStore.viewPlansUrl; + linkUrl = `${this.usageStore.viewPlansUrl}&source=workflow_sharing`; } window.open(linkUrl, '_blank'); diff --git a/packages/editor-ui/src/views/SettingsUsageAndPlan.vue b/packages/editor-ui/src/views/SettingsUsageAndPlan.vue index d5e1eeaa23..e9e8803768 100644 --- a/packages/editor-ui/src/views/SettingsUsageAndPlan.vue +++ b/packages/editor-ui/src/views/SettingsUsageAndPlan.vue @@ -14,7 +14,9 @@ const router = useRouter(); const queryParamCallback = ref( `callback=${encodeURIComponent(`${window.location.origin}${window.location.pathname}`)}`, ); -const viewPlansUrl = computed(() => `${usageStore.viewPlansUrl}&${queryParamCallback.value}`); +const viewPlansUrl = computed( + () => `${usageStore.viewPlansUrl}&${queryParamCallback.value}&source=usage_page`, +); const managePlanUrl = computed(() => `${usageStore.managePlanUrl}&${queryParamCallback.value}`); const activationKeyModal = ref(false); const activationKey = ref('');