mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11: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(
|
const canUserRegisterCommunityPlus = computed(
|
||||||
() => getResourcePermissions(usersStore.currentUser?.globalScopes).community.register,
|
() => getResourcePermissions(usersStore.currentUser?.globalScopes).community.register,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const showRegisteredCommunityCTA = computed(
|
||||||
|
() => isSelfHostedDeployment.value && !foldersEnabled.value && canUserRegisterCommunityPlus.value,
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WATCHERS, STORE SUBSCRIPTIONS AND EVENT BUS HANDLERS
|
* WATCHERS, STORE SUBSCRIPTIONS AND EVENT BUS HANDLERS
|
||||||
*/
|
*/
|
||||||
@@ -1042,8 +1047,8 @@ const renameFolder = async (folderId: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const createFolderInCurrent = async () => {
|
const createFolderInCurrent = async () => {
|
||||||
// Show the community plus enrollment modal if the user is in a community plan
|
// Show the community plus enrollment modal if the user is self-hosted, and hasn't enabled folders
|
||||||
if (isCommunity.value && canUserRegisterCommunityPlus.value) {
|
if (showRegisteredCommunityCTA.value) {
|
||||||
uiStore.openModalWithData({
|
uiStore.openModalWithData({
|
||||||
name: COMMUNITY_PLUS_ENROLLMENT_MODAL,
|
name: COMMUNITY_PLUS_ENROLLMENT_MODAL,
|
||||||
data: { customHeading: i18n.baseText('folders.registeredCommunity.cta.heading') },
|
data: { customHeading: i18n.baseText('folders.registeredCommunity.cta.heading') },
|
||||||
@@ -1125,7 +1130,7 @@ const moveWorkflowToFolder = async (payload: {
|
|||||||
name: string;
|
name: string;
|
||||||
parentFolderId?: string;
|
parentFolderId?: string;
|
||||||
}) => {
|
}) => {
|
||||||
if (isCommunity.value && canUserRegisterCommunityPlus.value) {
|
if (showRegisteredCommunityCTA.value) {
|
||||||
uiStore.openModalWithData({
|
uiStore.openModalWithData({
|
||||||
name: COMMUNITY_PLUS_ENROLLMENT_MODAL,
|
name: COMMUNITY_PLUS_ENROLLMENT_MODAL,
|
||||||
data: { customHeading: i18n.baseText('folders.registeredCommunity.cta.heading') },
|
data: { customHeading: i18n.baseText('folders.registeredCommunity.cta.heading') },
|
||||||
|
|||||||
Reference in New Issue
Block a user