2024-04-26 07:54:02 +02:00
|
|
|
<template>
|
2024-06-10 05:24:55 +02:00
|
|
|
<div class="from-dark-600 to-dark-900 bg-gradient-to-tl relative min-h-dvh">
|
2024-06-15 23:18:58 +02:00
|
|
|
<GraphicsSquarePattern />
|
2024-05-12 09:30:02 +02:00
|
|
|
<LazySidebarsNavigation />
|
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-15 23:18:58 +02:00
|
|
|
<LazySidebarsCollapsibleAside v-if="width > 1280 && identity" direction="right"
|
|
|
|
|
class="max-w-md max-h-dvh overflow-y-auto w-full hidden absolute inset-y-0 xl:flex">
|
|
|
|
|
<LazyTimelinesTimelineScroller>
|
|
|
|
|
<LazyTimelinesNotifications />
|
|
|
|
|
</LazyTimelinesTimelineScroller>
|
|
|
|
|
</LazySidebarsCollapsibleAside>
|
2024-04-26 07:54:02 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-05-12 09:30:02 +02:00
|
|
|
<LazyComposerModal />
|
2024-06-05 02:03:15 +02:00
|
|
|
<LazySocialElementsNotesAttachmentDialog />
|
2024-04-26 07:54:02 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
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-06-10 05:24:55 +02:00
|
|
|
const identity = useCurrentIdentity();
|
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>
|