2024-04-26 07:54:02 +02:00
|
|
|
<template>
|
2024-11-30 00:58:04 +01:00
|
|
|
<Sidebar>
|
2024-11-30 16:21:16 +01:00
|
|
|
<SquarePattern />
|
2024-11-30 00:58:04 +01:00
|
|
|
<slot />
|
|
|
|
|
</Sidebar>
|
2024-11-30 19:15:23 +01:00
|
|
|
<ComposerDialog />
|
2024-06-21 04:09:09 +02:00
|
|
|
<AttachmentDialog />
|
2024-04-26 07:54:02 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2024-11-30 19:15:23 +01:00
|
|
|
import ComposerDialog from "~/components/composer/dialog.vue";
|
2024-11-30 16:21:16 +01:00
|
|
|
import SquarePattern from "~/components/graphics/square-pattern.vue";
|
2024-11-30 00:58:04 +01:00
|
|
|
import Sidebar from "~/components/sidebars/sidebar.vue";
|
2024-06-21 04:09:09 +02:00
|
|
|
import AttachmentDialog from "~/components/social-elements/notes/attachment-dialog.vue";
|
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>
|