Move mobile button
This commit is contained in:
parent
7a782ed911
commit
f2a422157f
|
|
@ -15,12 +15,7 @@ log.debug("MainNavigationBar created");
|
||||||
|
|
||||||
const courseSessionsStore = useCourseSessionsStore();
|
const courseSessionsStore = useCourseSessionsStore();
|
||||||
const { inMediaLibrary, inAppointments } = useRouteLookups();
|
const { inMediaLibrary, inAppointments } = useRouteLookups();
|
||||||
const { hasMediaLibraryMenu, hasAppointmentsMenu, hasSessionTitle } =
|
const { hasMediaLibraryMenu, hasAppointmentsMenu } = useNavigationAttributes();
|
||||||
useNavigationAttributes();
|
|
||||||
|
|
||||||
const selectedCourseSessionTitle = computed(() => {
|
|
||||||
return courseSessionsStore.currentCourseSession?.title;
|
|
||||||
});
|
|
||||||
|
|
||||||
const appointmentsUrl = computed(() => {
|
const appointmentsUrl = computed(() => {
|
||||||
const currentCourseSession = courseSessionsStore.currentCourseSession;
|
const currentCourseSession = courseSessionsStore.currentCourseSession;
|
||||||
|
|
@ -40,7 +35,6 @@ onMounted(() => {
|
||||||
<nav class="bg-blue-900 text-white">
|
<nav class="bg-blue-900 text-white">
|
||||||
<div class="mx-auto px-4 lg:px-8">
|
<div class="mx-auto px-4 lg:px-8">
|
||||||
<div class="relative flex h-16 justify-between">
|
<div class="relative flex h-16 justify-between">
|
||||||
<MobileMenuButton />
|
|
||||||
<div class="flex flex-1 items-stretch justify-start">
|
<div class="flex flex-1 items-stretch justify-start">
|
||||||
<HomeNavigation />
|
<HomeNavigation />
|
||||||
<CourseSessionNavigation />
|
<CourseSessionNavigation />
|
||||||
|
|
@ -62,7 +56,7 @@ onMounted(() => {
|
||||||
v-if="hasAppointmentsMenu"
|
v-if="hasAppointmentsMenu"
|
||||||
:to="appointmentsUrl"
|
:to="appointmentsUrl"
|
||||||
data-cy="all-duedates-link"
|
data-cy="all-duedates-link"
|
||||||
class="nav-item"
|
class="nav-item-no-mobile"
|
||||||
:class="{ 'nav-item--active': inAppointments() }"
|
:class="{ 'nav-item--active': inAppointments() }"
|
||||||
>
|
>
|
||||||
<it-icon-calendar-light class="h-8 w-8" />
|
<it-icon-calendar-light class="h-8 w-8" />
|
||||||
|
|
@ -71,22 +65,12 @@ onMounted(() => {
|
||||||
<!-- Notification Bell & Menu -->
|
<!-- Notification Bell & Menu -->
|
||||||
<NotificationButton />
|
<NotificationButton />
|
||||||
|
|
||||||
<div
|
|
||||||
v-if="hasSessionTitle"
|
|
||||||
class="nav-item hidden items-center lg:inline-flex"
|
|
||||||
>
|
|
||||||
<div class="" data-cy="current-course-session-title">
|
|
||||||
{{ selectedCourseSessionTitle }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="nav-item">
|
<div class="nav-item">
|
||||||
<ProfileMenuButton />
|
<ProfileMenuButton />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<MobileMenuButton />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="postcss"></style>
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ const showMenu = ref(false);
|
||||||
@logout="userStore.handleLogout()"
|
@logout="userStore.handleLogout()"
|
||||||
/>
|
/>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
<div class="absolute inset-y-0 left-0 flex items-center lg:hidden">
|
<div class="inset-y-0 flex items-center lg:hidden">
|
||||||
<!-- Mobile menu button -->
|
<!-- Mobile menu button -->
|
||||||
<div data-cy="navigation-mobile-menu-button" class="flex" @click="showMenu = true">
|
<div data-cy="navigation-mobile-menu-button" class="flex" @click="showMenu = true">
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,11 @@ function popoverClick(event: Event) {
|
||||||
<AccountMenu @close="showMenu = false" />
|
<AccountMenu @close="showMenu = false" />
|
||||||
</ItFullScreenModal>
|
</ItFullScreenModal>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
<div v-if="userStore.loggedIn" class="flex items-center" data-cy="header-profile">
|
<div
|
||||||
|
v-if="userStore.loggedIn"
|
||||||
|
class="hidden items-center lg:flex"
|
||||||
|
data-cy="header-profile"
|
||||||
|
>
|
||||||
<Popover class="relative">
|
<Popover class="relative">
|
||||||
<PopoverButton @click="popoverClick($event)">
|
<PopoverButton @click="popoverClick($event)">
|
||||||
<div v-if="userStore.avatar_url">
|
<div v-if="userStore.avatar_url">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue