mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
feat(editor): Implement 'Shared with you' section in the main navigation (#15140)
This commit is contained in:
committed by
GitHub
parent
abdbe50907
commit
1c65e82b38
@@ -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,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user