feat: Add source to all View Plans links (no-changelog) (#5097)

feat: Add source to all View Plans links
This commit is contained in:
Alex Grozav 2023-01-09 14:57:51 +02:00 committed by GitHub
parent a43e3e4112
commit a79c253345
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 4 deletions

View file

@ -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');

View file

@ -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');

View file

@ -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');

View file

@ -14,7 +14,9 @@ const router = useRouter();
const queryParamCallback = ref<string>(
`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('');