mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
update some checks
This commit is contained in:
parent
fbae17d8fb
commit
72f90d67ff
|
@ -32,6 +32,7 @@ const home = computed<IMenuItem>(() => ({
|
||||||
to: { name: VIEWS.HOMEPAGE },
|
to: { name: VIEWS.HOMEPAGE },
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const addProject = computed<IMenuItem>(() => ({
|
const addProject = computed<IMenuItem>(() => ({
|
||||||
id: 'addProject',
|
id: 'addProject',
|
||||||
label: locale.baseText('projects.menu.addProject'),
|
label: locale.baseText('projects.menu.addProject'),
|
||||||
|
@ -102,6 +103,10 @@ const displayProjects = computed(() => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const canCreateProjects = computed(
|
||||||
|
() => projectsStore.hasPermissionToCreateProjects && projectsStore.isTeamProjectFeatureEnabled,
|
||||||
|
);
|
||||||
|
|
||||||
const goToUpgrade = async () => {
|
const goToUpgrade = async () => {
|
||||||
await uiStore.goToUpgrade('rbac', 'upgrade-rbac');
|
await uiStore.goToUpgrade('rbac', 'upgrade-rbac');
|
||||||
};
|
};
|
||||||
|
@ -123,14 +128,13 @@ onMounted(async () => {
|
||||||
data-test-id="project-home-menu-item"
|
data-test-id="project-home-menu-item"
|
||||||
/>
|
/>
|
||||||
</ElMenu>
|
</ElMenu>
|
||||||
<hr
|
<hr v-if="displayProjects.length || canCreateProjects" class="mt-m mb-m" />
|
||||||
v-if="
|
<N8nText
|
||||||
displayProjects.length ||
|
v-if="!props.collapsed && displayProjects.length"
|
||||||
(projectsStore.hasPermissionToCreateProjects && projectsStore.isTeamProjectFeatureEnabled)
|
:class="$style.projectsLabel"
|
||||||
"
|
tag="h3"
|
||||||
class="mt-m mb-m"
|
bold
|
||||||
/>
|
>
|
||||||
<N8nText v-if="!props.collapsed" :class="$style.projectsLabel" tag="h3" bold>
|
|
||||||
<span>{{ locale.baseText('projects.menu.title') }}</span>
|
<span>{{ locale.baseText('projects.menu.title') }}</span>
|
||||||
</N8nText>
|
</N8nText>
|
||||||
<ElMenu v-if="displayProjects.length" :collapse="props.collapsed" :class="$style.projectItems">
|
<ElMenu v-if="displayProjects.length" :collapse="props.collapsed" :class="$style.projectItems">
|
||||||
|
@ -155,9 +159,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</ElMenu>
|
</ElMenu>
|
||||||
<N8nTooltip
|
<N8nTooltip
|
||||||
v-if="
|
v-if="canCreateProjects"
|
||||||
projectsStore.hasPermissionToCreateProjects && projectsStore.isTeamProjectFeatureEnabled
|
|
||||||
"
|
|
||||||
placement="right"
|
placement="right"
|
||||||
:disabled="projectsStore.canCreateProjects"
|
:disabled="projectsStore.canCreateProjects"
|
||||||
>
|
>
|
||||||
|
@ -189,13 +191,7 @@ onMounted(async () => {
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
</template>
|
</template>
|
||||||
</N8nTooltip>
|
</N8nTooltip>
|
||||||
<hr
|
<hr v-if="displayProjects.length || canCreateProjects" class="mt-m mb-m" />
|
||||||
v-if="
|
|
||||||
displayProjects.length ||
|
|
||||||
(projectsStore.hasPermissionToCreateProjects && projectsStore.isTeamProjectFeatureEnabled)
|
|
||||||
"
|
|
||||||
class="mt-m mb-m"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue