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

@@ -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() {