refactor: main navigation, reduce duplication
This commit is contained in:
parent
93f05e4722
commit
1e27f80949
|
|
@ -57,6 +57,8 @@ onMounted(() => {
|
|||
:course-session="courseSessionsStore.currentCourseSession"
|
||||
:media-url="courseSessionsStore.currentCourseSession?.media_library_url"
|
||||
:user="userStore"
|
||||
:has-expert-navigation="courseSessionsStore.hasExpertNavigation"
|
||||
:has-member-navigation="courseSessionsStore.hasMemberNavigation"
|
||||
@closemodal="state.showMobileNavigationMenu = false"
|
||||
@logout="userStore.handleLogout()"
|
||||
/>
|
||||
|
|
@ -104,56 +106,53 @@ onMounted(() => {
|
|||
|
||||
<div class="hidden space-x-8 lg:flex">
|
||||
<!-- Navigation Links Desktop -->
|
||||
<router-link
|
||||
<template
|
||||
v-if="
|
||||
courseSessionsStore.hasExpertNavigation &&
|
||||
courseSessionsStore.currentCourseSession
|
||||
"
|
||||
:to="`${courseSessionsStore.currentCourseSession.course_url}/cockpit`"
|
||||
class="nav-item"
|
||||
:class="{ 'nav-item--active': inCockpit() }"
|
||||
>
|
||||
{{ t("cockpit.title") }}
|
||||
</router-link>
|
||||
<router-link
|
||||
:to="`${courseSessionsStore.currentCourseSession.course_url}/cockpit`"
|
||||
class="nav-item"
|
||||
:class="{ 'nav-item--active': inCockpit() }"
|
||||
>
|
||||
{{ t("cockpit.title") }}
|
||||
</router-link>
|
||||
|
||||
<router-link
|
||||
v-if="
|
||||
courseSessionsStore.hasExpertNavigation &&
|
||||
courseSessionsStore.currentCourseSession
|
||||
"
|
||||
:to="courseSessionsStore.currentCourseSession.learning_path_url"
|
||||
target="_blank"
|
||||
class="nav-item"
|
||||
>
|
||||
<div class="flex items-center">
|
||||
<span>{{ t("a.VorschauTeilnehmer") }}</span>
|
||||
<it-icon-external-link class="ml-2" />
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link
|
||||
<router-link
|
||||
:to="courseSessionsStore.currentCourseSession.learning_path_url"
|
||||
target="_blank"
|
||||
class="nav-item"
|
||||
>
|
||||
<div class="flex items-center">
|
||||
<span>{{ t("a.VorschauTeilnehmer") }}</span>
|
||||
<it-icon-external-link class="ml-2" />
|
||||
</div>
|
||||
</router-link>
|
||||
</template>
|
||||
<template
|
||||
v-if="
|
||||
courseSessionsStore.hasMemberNavigation &&
|
||||
courseSessionsStore.currentCourseSession
|
||||
"
|
||||
:to="courseSessionsStore.currentCourseSession.learning_path_url"
|
||||
class="nav-item"
|
||||
:class="{ 'nav-item--active': inLearningPath() }"
|
||||
>
|
||||
{{ t("general.learningPath") }}
|
||||
</router-link>
|
||||
<router-link
|
||||
:to="courseSessionsStore.currentCourseSession.learning_path_url"
|
||||
class="nav-item"
|
||||
:class="{ 'nav-item--active': inLearningPath() }"
|
||||
>
|
||||
{{ t("general.learningPath") }}
|
||||
</router-link>
|
||||
|
||||
<router-link
|
||||
v-if="
|
||||
courseSessionsStore.hasMemberNavigation &&
|
||||
courseSessionsStore.currentCourseSession
|
||||
"
|
||||
:to="courseSessionsStore.currentCourseSession.competence_url"
|
||||
class="nav-item"
|
||||
:class="{ 'nav-item--active': inCompetenceProfile() }"
|
||||
>
|
||||
{{ t("competences.title") }}
|
||||
</router-link>
|
||||
<router-link
|
||||
:to="courseSessionsStore.currentCourseSession.competence_url"
|
||||
class="nav-item"
|
||||
:class="{ 'nav-item--active': inCompetenceProfile() }"
|
||||
>
|
||||
{{ t("competences.title") }}
|
||||
</router-link>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue