2024-04-26 07:54:02 +02:00
|
|
|
<template>
|
2024-07-22 01:23:29 +02:00
|
|
|
<div class="from-dark-600 to-dark-900 bg-gradient-to-tl relative min-h-dvh">
|
2024-06-21 04:09:09 +02:00
|
|
|
<SquarePattern />
|
|
|
|
|
<Navigation />
|
2024-06-12 06:41:27 +02:00
|
|
|
|
2024-05-12 07:26:29 +02:00
|
|
|
<div class="relative md:pl-20 min-h-dvh flex flex-row overflow-hidden justify-center xl:justify-between">
|
2024-06-10 06:33:14 +02:00
|
|
|
<OverlayScrollbarsComponent :defer="true" class="w-full max-h-dvh overflow-y-auto" :element="'main'">
|
2024-05-08 14:15:21 +02:00
|
|
|
<slot />
|
2024-05-12 07:26:29 +02:00
|
|
|
</OverlayScrollbarsComponent>
|
2024-06-21 04:09:09 +02:00
|
|
|
<CollapsibleAside v-if="width > 1280 && identity" direction="right"
|
2024-06-15 23:18:58 +02:00
|
|
|
class="max-w-md max-h-dvh overflow-y-auto w-full hidden absolute inset-y-0 xl:flex">
|
2024-06-21 04:09:09 +02:00
|
|
|
<TimelineScroller>
|
|
|
|
|
<Notifications />
|
|
|
|
|
</TimelineScroller>
|
|
|
|
|
</CollapsibleAside>
|
2024-04-26 07:54:02 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-06-21 04:09:09 +02:00
|
|
|
<ComposerModal />
|
|
|
|
|
<AttachmentDialog />
|
2024-04-26 07:54:02 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2024-06-21 04:09:09 +02:00
|
|
|
import ComposerModal from "~/components/composer/modal.client.vue";
|
|
|
|
|
import SquarePattern from "~/components/graphics/square-pattern.vue";
|
|
|
|
|
import CollapsibleAside from "~/components/sidebars/collapsible-aside.vue";
|
|
|
|
|
import Navigation from "~/components/sidebars/navigation.vue";
|
|
|
|
|
import AttachmentDialog from "~/components/social-elements/notes/attachment-dialog.vue";
|
|
|
|
|
import Notifications from "~/components/timelines/notifications.vue";
|
|
|
|
|
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
2024-05-12 07:26:29 +02:00
|
|
|
import { OverlayScrollbarsComponent } from "#imports";
|
2024-05-01 10:40:33 +02:00
|
|
|
const { width } = useWindowSize();
|
2024-04-26 07:54:02 +02:00
|
|
|
|
2024-06-19 08:16:28 +02:00
|
|
|
const { n } = useMagicKeys();
|
|
|
|
|
const activeElement = useActiveElement();
|
|
|
|
|
const notUsingInput = computed(
|
|
|
|
|
() =>
|
|
|
|
|
activeElement.value?.tagName !== "INPUT" &&
|
|
|
|
|
activeElement.value?.tagName !== "TEXTAREA",
|
|
|
|
|
);
|
2024-04-28 07:02:27 +02:00
|
|
|
|
2024-05-12 06:34:03 +02:00
|
|
|
watchEffect(async () => {
|
2024-06-19 08:16:28 +02:00
|
|
|
if (n?.value && notUsingInput.value) {
|
2024-05-12 06:34:03 +02:00
|
|
|
// Wait 50ms
|
|
|
|
|
await new Promise((resolve) => setTimeout(resolve, 50));
|
2024-04-28 07:02:27 +02:00
|
|
|
useEvent("composer:open");
|
|
|
|
|
}
|
|
|
|
|
});
|
2024-04-26 07:54:02 +02:00
|
|
|
</script>
|