feat(editor): Implement 'Shared with you' section in the main navigation (#15140)

This commit is contained in:
Milorad FIlipović
2025-05-08 09:24:32 +02:00
committed by GitHub
parent abdbe50907
commit 1c65e82b38
23 changed files with 537 additions and 174 deletions

View File

@@ -0,0 +1,31 @@
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,
);
const isSharedSubPage = computed(
() =>
route.name === VIEWS.SHARED_WITH_ME ||
route.name === VIEWS.SHARED_WORKFLOWS ||
route.name === VIEWS.SHARED_CREDENTIALS,
);
return reactive({
isOverviewSubPage,
isSharedSubPage,
});
};