Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editor): Update SSO upgrade link #6016

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions packages/editor-ui/src/views/SettingsSso.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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 () => {
Expand Down