feat(editor): Add front-end for Data Store feature (#17590)

This commit is contained in:
Milorad FIlipović
2025-07-31 13:07:00 +02:00
committed by GitHub
parent b745cad72c
commit b89c254394
35 changed files with 1820 additions and 99 deletions

View File

@@ -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,