2024-11-30 00:58:04 +01:00
|
|
|
<script setup lang="ts">
|
2025-02-09 18:37:41 +01:00
|
|
|
import { cn } from "@/lib/utils";
|
2025-03-28 01:16:24 +01:00
|
|
|
import Timelines from "~/components/navigation/timelines.vue";
|
|
|
|
|
import { SidebarInset } from "~/components/ui/sidebar";
|
2024-12-04 14:34:09 +01:00
|
|
|
import { SettingIds } from "~/settings";
|
2024-12-02 22:55:36 +01:00
|
|
|
import LeftSidebar from "./left-sidebar.vue";
|
|
|
|
|
import RightSidebar from "./right-sidebar.vue";
|
2024-12-04 14:34:09 +01:00
|
|
|
|
|
|
|
|
const showRightSidebar = useSetting(SettingIds.NotificationsSidebar);
|
2024-12-04 15:17:47 +01:00
|
|
|
|
|
|
|
|
const route = useRoute();
|
2024-12-26 14:34:59 +01:00
|
|
|
const isMd = useMediaQuery("(max-width: 768px)");
|
|
|
|
|
const showTimelines = computed(
|
|
|
|
|
() =>
|
|
|
|
|
["/", "/home", "/local", "/public", "/global"].includes(route.path) &&
|
|
|
|
|
isMd.value,
|
|
|
|
|
);
|
2024-11-30 00:58:04 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-03-28 01:16:24 +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"
|
|
|
|
|
>
|
|
|
|
|
<Timelines />
|
|
|
|
|
</header>
|
|
|
|
|
<slot />
|
|
|
|
|
</main>
|
|
|
|
|
<RightSidebar v-if="identity" v-show="showRightSidebar.value" />
|
2024-11-30 00:58:04 +01:00
|
|
|
</template>
|