refactor(editor): Go to upgrade page (#5994)

* refactor(editor): Go to upgrade page

* test(editor): add UI store upgrade link tests

* fix(editor): update execution filter links

* fix(editor): update unit test

* fix(editor): update unit test

* fix(editor): remove unused variables
This commit is contained in:
Csaba Tuncsik
2023-04-19 11:00:09 +02:00
committed by GitHub
parent f9a810aaf7
commit 9eeba13156
8 changed files with 97 additions and 71 deletions

View File

@@ -529,17 +529,7 @@ export default mixins(workflowHelpers, titleChange).extend({
}
},
goToUpgrade() {
const linkUrlTranslationKey = this.uiStore.contextBasedTranslationKeys
.upgradeLinkUrl as BaseTextKey;
let linkUrl = this.$locale.baseText(linkUrlTranslationKey);
if (linkUrlTranslationKey.endsWith('.upgradeLinkUrl')) {
linkUrl = `${this.usageStore.viewPlansUrl}&source=workflow_sharing`;
} else if (linkUrlTranslationKey.endsWith('.desktop')) {
linkUrl = `${linkUrl}&utm_campaign=upgrade-workflow-sharing`;
}
window.open(linkUrl, '_blank');
this.uiStore.goToUpgrade('workflow_sharing', 'upgrade-workflow-sharing');
},
},
watch: {