fix(editor): Update SSO upgrade link (#6016)

fix(editor): update SSO upgrade link
This commit is contained in:
Csaba Tuncsik 2023-04-19 17:05:58 +02:00 committed by GitHub
parent 0e0a064fa7
commit 953198e092
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@ import { Notification } from 'element-ui';
import { useSSOStore } from '@/stores/sso';
import { useUsageStore } from '@/stores/usage';
import { useUIStore } from '@/stores/ui';
import { BaseTextKey, i18n as locale } from '@/plugins/i18n';
import { i18n as locale } from '@/plugins/i18n';
import CopyInput from '@/components/CopyInput.vue';
const ssoStore = useSSOStore();
@ -56,16 +56,7 @@ const onTest = async () => {
};
const goToUpgrade = () => {
const linkUrlTranslationKey = uiStore.contextBasedTranslationKeys.upgradeLinkUrl as BaseTextKey;
let linkUrl = locale.baseText(linkUrlTranslationKey);
if (linkUrlTranslationKey.endsWith('.upgradeLinkUrl')) {
linkUrl = `${usageStore.viewPlansUrl}&source=sso`;
} else if (linkUrlTranslationKey.endsWith('.desktop')) {
linkUrl = `${linkUrl}&utm_campaign=upgrade-sso`;
}
window.open(linkUrl, '_blank');
uiStore.goToUpgrade('sso', 'upgrade-sso`');
};
onBeforeMount(async () => {