feat: Change desktop UM experience (#5312)

* refactor: Hide prompt for desktop

* feat: add email field to personalization modal

* fix: update survey interfaces

* chore: enable personalization survey email key display condition

* feat: add users page upsell for desktop client

* feat: disable UM on desktop where possible

* refactor: Have a single function to decide whether UM is enabled

* feat: update community nodes upsell link

---------

Co-authored-by: Alex Grozav <alex@grozav.com>
Co-authored-by: krynble <omar@n8n.io>
Co-authored-by: freyamade <freya@n8n.io>
This commit is contained in:
Omar Ajoue
2023-02-08 10:42:22 +01:00
committed by GitHub
parent d8865aa917
commit 5e3e70b83b
19 changed files with 177 additions and 64 deletions

View File

@@ -115,18 +115,6 @@
>
{{ $locale.baseText('workflows.shareModal.save') }}
</n8n-button>
<template #fallback>
<n8n-link :to="uiStore.contextBasedTranslationKeys.workflows.sharing.unavailable.linkUrl">
<n8n-button :loading="loading" size="medium">
{{
$locale.baseText(
uiStore.contextBasedTranslationKeys.workflows.sharing.unavailable.button,
)
}}
</n8n-button>
</n8n-link>
</template>
</enterprise-edition>
</template>
</Modal>
@@ -198,6 +186,11 @@ export default mixins(showMessage).extend({
isSharingEnabled(): boolean {
return this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.Sharing);
},
fallbackLinkUrl(): string {
return `${this.$locale.baseText(
this.uiStore.contextBasedTranslationKeys.upgradeLinkUrl as BaseTextKey,
)}${true ? '&utm_campaign=upgrade-workflow-sharing' : ''}`;
},
modalTitle(): string {
return this.$locale.baseText(
this.isSharingEnabled
@@ -444,11 +437,14 @@ export default mixins(showMessage).extend({
});
},
goToUpgrade() {
let linkUrl = this.$locale.baseText(
this.uiStore.contextBasedTranslationKeys.upgradeLinkUrl as BaseTextKey,
);
if (linkUrl.includes('subscription')) {
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');