mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(editor): Check for when to show the community+ modal for the folder's feature (#14146)
Co-authored-by: Milorad Filipovic <milorad@n8n.io>
This commit is contained in:
@@ -327,11 +327,16 @@ const hasFilters = computed(() => {
|
||||
);
|
||||
});
|
||||
|
||||
const isCommunity = computed(() => usageStore.planName.toLowerCase() === 'community');
|
||||
const isSelfHostedDeployment = computed(() => settingsStore.deploymentType === 'default');
|
||||
|
||||
const canUserRegisterCommunityPlus = computed(
|
||||
() => getResourcePermissions(usersStore.currentUser?.globalScopes).community.register,
|
||||
);
|
||||
|
||||
const showRegisteredCommunityCTA = computed(
|
||||
() => isSelfHostedDeployment.value && !foldersEnabled.value && canUserRegisterCommunityPlus.value,
|
||||
);
|
||||
|
||||
/**
|
||||
* WATCHERS, STORE SUBSCRIPTIONS AND EVENT BUS HANDLERS
|
||||
*/
|
||||
@@ -1042,8 +1047,8 @@ const renameFolder = async (folderId: string) => {
|
||||
};
|
||||
|
||||
const createFolderInCurrent = async () => {
|
||||
// Show the community plus enrollment modal if the user is in a community plan
|
||||
if (isCommunity.value && canUserRegisterCommunityPlus.value) {
|
||||
// Show the community plus enrollment modal if the user is self-hosted, and hasn't enabled folders
|
||||
if (showRegisteredCommunityCTA.value) {
|
||||
uiStore.openModalWithData({
|
||||
name: COMMUNITY_PLUS_ENROLLMENT_MODAL,
|
||||
data: { customHeading: i18n.baseText('folders.registeredCommunity.cta.heading') },
|
||||
@@ -1125,7 +1130,7 @@ const moveWorkflowToFolder = async (payload: {
|
||||
name: string;
|
||||
parentFolderId?: string;
|
||||
}) => {
|
||||
if (isCommunity.value && canUserRegisterCommunityPlus.value) {
|
||||
if (showRegisteredCommunityCTA.value) {
|
||||
uiStore.openModalWithData({
|
||||
name: COMMUNITY_PLUS_ENROLLMENT_MODAL,
|
||||
data: { customHeading: i18n.baseText('folders.registeredCommunity.cta.heading') },
|
||||
|
||||
Reference in New Issue
Block a user