From b682c5561f710927dc7efa8d8e48a7861253352d Mon Sep 17 00:00:00 2001 From: Elia Bieri Date: Wed, 25 Sep 2024 10:37:15 +0200 Subject: [PATCH] Only show cockpit and preview link when in CS --- client/src/components/header/MainNavigationBar.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/client/src/components/header/MainNavigationBar.vue b/client/src/components/header/MainNavigationBar.vue index 1f478161..8b2f7ca8 100644 --- a/client/src/components/header/MainNavigationBar.vue +++ b/client/src/components/header/MainNavigationBar.vue @@ -90,12 +90,17 @@ const hasMediaLibraryMenu = computed(() => ) ); -const hasCockpitMenu = computed(() => - Boolean(courseSessionsStore.currentCourseSession?.actions.includes("expert-cockpit")) +const hasCockpitMenu = computed( + () => + Boolean( + courseSessionsStore.currentCourseSession?.actions.includes("expert-cockpit") + ) && inCourse() ); -const hasPreviewMenu = computed(() => - Boolean(courseSessionsStore.currentCourseSession?.actions.includes("preview")) +const hasPreviewMenu = computed( + () => + Boolean(courseSessionsStore.currentCourseSession?.actions.includes("preview")) && + inCourse() ); const hasAppointmentsMenu = computed(() =>