frontend/app/components/sidebars/sidebar.vue

32 lines
896 B
Vue
Raw Normal View History

<script setup lang="ts">
import Timelines from "~/components/navigation/timelines.vue";
2024-12-02 22:55:36 +01:00
import LeftSidebar from "./left-sidebar.vue";
import RightSidebar from "./right-sidebar.vue";
const route = useRoute();
const isMd = useMediaQuery("(max-width: 768px)");
const showTimelines = computed(
() =>
["/", "/home", "/local", "/public", "/global"].includes(route.path) &&
isMd.value,
);
const authStore = useAuthStore();
</script>
<template>
2025-12-09 22:32:22 +01:00
<LeftSidebar/>
<main class="grow h-dvh overflow-y-auto">
<header
v-if="showTimelines"
class="flex h-16 items-center bg-background/80 backdrop-blur-2xl sticky top-0 inset-x-0 z-10 p-4"
>
2025-12-09 22:32:22 +01:00
<Timelines/>
</header>
2025-12-09 22:32:22 +01:00
<slot/>
</main>
2025-12-09 22:32:22 +01:00
<RightSidebar
v-if="authStore.isSignedIn"
v-show="preferences.display_notifications_sidebar"
/>
</template>