frontend/components/sidebars/sidebar.vue
Jesse Wierzbinski 092bce0f24
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 2m30s
Deploy to GitHub Pages / build (push) Failing after 6s
Deploy to GitHub Pages / deploy (push) Has been skipped
Docker / build (push) Failing after 5s
Mirror to Codeberg / Mirror (push) Failing after 0s
chore: ⬆️ Upgrade to the latest Shadcn-Vue version
2025-03-28 01:16:24 +01:00

33 lines
1,016 B
Vue

<script setup lang="ts">
import { cn } from "@/lib/utils";
import Timelines from "~/components/navigation/timelines.vue";
import { SidebarInset } from "~/components/ui/sidebar";
import { SettingIds } from "~/settings";
import LeftSidebar from "./left-sidebar.vue";
import RightSidebar from "./right-sidebar.vue";
const showRightSidebar = useSetting(SettingIds.NotificationsSidebar);
const route = useRoute();
const isMd = useMediaQuery("(max-width: 768px)");
const showTimelines = computed(
() =>
["/", "/home", "/local", "/public", "/global"].includes(route.path) &&
isMd.value,
);
</script>
<template>
<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"
>
<Timelines />
</header>
<slot />
</main>
<RightSidebar v-if="identity" v-show="showRightSidebar.value" />
</template>