mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
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:
@@ -10,7 +10,23 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="usersStore.showUMSetupWarning" :class="$style.setupInfoContainer">
|
||||
<div v-if="!settingsStore.isUserManagementEnabled" :class="$style.setupInfoContainer">
|
||||
<n8n-action-box
|
||||
:heading="
|
||||
$locale.baseText(uiStore.contextBasedTranslationKeys.users.settings.unavailable.title)
|
||||
"
|
||||
:description="
|
||||
$locale.baseText(
|
||||
uiStore.contextBasedTranslationKeys.users.settings.unavailable.description,
|
||||
)
|
||||
"
|
||||
:buttonText="
|
||||
$locale.baseText(uiStore.contextBasedTranslationKeys.users.settings.unavailable.button)
|
||||
"
|
||||
@click="goToUpgrade"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="usersStore.showUMSetupWarning" :class="$style.setupInfoContainer">
|
||||
<n8n-action-box
|
||||
:heading="$locale.baseText('settings.users.setupToInviteUsers')"
|
||||
:buttonText="$locale.baseText('settings.users.setupMyAccount')"
|
||||
@@ -53,6 +69,8 @@ import { mapStores } from 'pinia';
|
||||
import { useUIStore } from '@/stores/ui';
|
||||
import { useSettingsStore } from '@/stores/settings';
|
||||
import { useUsersStore } from '@/stores/users';
|
||||
import { BaseTextKey } from '@/plugins/i18n';
|
||||
import { useUsageStore } from '@/stores/usage';
|
||||
|
||||
export default mixins(showMessage, copyPaste).extend({
|
||||
name: 'SettingsUsersView',
|
||||
@@ -66,7 +84,7 @@ export default mixins(showMessage, copyPaste).extend({
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useSettingsStore, useUIStore, useUsersStore),
|
||||
...mapStores(useSettingsStore, useUIStore, useUsersStore, useUsageStore),
|
||||
isSharingEnabled() {
|
||||
return this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.Sharing);
|
||||
},
|
||||
@@ -135,6 +153,19 @@ export default mixins(showMessage, copyPaste).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=users`;
|
||||
} else if (linkUrlTranslationKey.endsWith('.desktop')) {
|
||||
linkUrl = `${linkUrl}&utm_campaign=upgrade-users`;
|
||||
}
|
||||
|
||||
window.open(linkUrl, '_blank');
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user