mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
feat(editor): Add front-end for Data Store feature (#17590)
This commit is contained in:
committed by
GitHub
parent
b745cad72c
commit
b89c254394
@@ -1,22 +1,19 @@
|
||||
import { computed, reactive } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { VIEWS } from '@/constants';
|
||||
|
||||
/**
|
||||
* This composable holds reusable logic that detects the current page type
|
||||
*/
|
||||
export const useProjectPages = () => {
|
||||
const route = useRoute();
|
||||
|
||||
const isOverviewSubPage = computed(
|
||||
() =>
|
||||
route.name === VIEWS.WORKFLOWS ||
|
||||
route.name === VIEWS.HOMEPAGE ||
|
||||
route.name === VIEWS.CREDENTIALS ||
|
||||
route.name === VIEWS.EXECUTIONS ||
|
||||
route.name === VIEWS.FOLDERS,
|
||||
);
|
||||
// Project pages have a projectId in the route params
|
||||
const isProjectsSubPage = computed(() => route.params?.projectId !== undefined);
|
||||
|
||||
// Overview pages don't
|
||||
const isOverviewSubPage = computed(() => route.params?.projectId === undefined);
|
||||
|
||||
// Shared pages are identified by specific route names
|
||||
const isSharedSubPage = computed(
|
||||
() =>
|
||||
route.name === VIEWS.SHARED_WITH_ME ||
|
||||
@@ -24,15 +21,6 @@ export const useProjectPages = () => {
|
||||
route.name === VIEWS.SHARED_CREDENTIALS,
|
||||
);
|
||||
|
||||
const isProjectsSubPage = computed(
|
||||
() =>
|
||||
route.name === VIEWS.PROJECTS_WORKFLOWS ||
|
||||
route.name === VIEWS.PROJECTS_CREDENTIALS ||
|
||||
route.name === VIEWS.PROJECTS_EXECUTIONS ||
|
||||
route.name === VIEWS.PROJECT_SETTINGS ||
|
||||
route.name === VIEWS.PROJECTS_FOLDERS,
|
||||
);
|
||||
|
||||
return reactive({
|
||||
isOverviewSubPage,
|
||||
isSharedSubPage,
|
||||
|
||||
Reference in New Issue
Block a user