2024-04-26 07:54:02 +02:00
|
|
|
<template>
|
2024-11-30 00:58:04 +01:00
|
|
|
<Sidebar>
|
2024-12-15 16:16:16 +01:00
|
|
|
<SquarePattern v-if="!canParseUrl(backgroundImage.value as string)" />
|
2024-12-07 18:26:52 +01:00
|
|
|
<slot v-if="!route.meta.requiresAuth || identity" />
|
|
|
|
|
<Card v-else class="shadow-none bg-transparent border-none p-4 max-w-md mx-auto">
|
|
|
|
|
<CardHeader class="text-center gap-y-4">
|
2024-12-07 22:17:22 +01:00
|
|
|
<CardTitle>{{ m.sunny_quick_lionfish_flip() }}</CardTitle>
|
2024-12-07 18:26:52 +01:00
|
|
|
<CardDescription>
|
2024-12-07 22:17:22 +01:00
|
|
|
{{ m.brave_known_pelican_drip() }}
|
2024-12-07 18:26:52 +01:00
|
|
|
</CardDescription>
|
|
|
|
|
</CardHeader>
|
|
|
|
|
<CardFooter>
|
|
|
|
|
<Button variant="secondary" class="w-full" @click="signInAction">
|
2024-12-07 22:17:22 +01:00
|
|
|
{{ m.fuzzy_sea_moth_absorb() }}
|
2024-12-07 18:26:52 +01:00
|
|
|
</Button>
|
|
|
|
|
</CardFooter>
|
|
|
|
|
</Card>
|
2024-11-30 00:58:04 +01:00
|
|
|
</Sidebar>
|
2024-12-09 16:52:04 +01:00
|
|
|
<MobileNavbar />
|
2024-11-30 19:15:23 +01:00
|
|
|
<ComposerDialog />
|
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-12-09 16:52:04 +01:00
|
|
|
import MobileNavbar from "~/components/navigation/mobile-navbar.vue";
|
2024-11-30 00:58:04 +01:00
|
|
|
import Sidebar from "~/components/sidebars/sidebar.vue";
|
2024-12-07 18:26:52 +01:00
|
|
|
import { Button } from "~/components/ui/button";
|
|
|
|
|
import {
|
|
|
|
|
Card,
|
|
|
|
|
CardDescription,
|
|
|
|
|
CardFooter,
|
|
|
|
|
CardHeader,
|
|
|
|
|
CardTitle,
|
|
|
|
|
} from "~/components/ui/card";
|
2024-12-07 22:17:22 +01:00
|
|
|
import * as m from "~/paraglide/messages.js";
|
2024-12-15 16:16:16 +01:00
|
|
|
import { SettingIds } from "~/settings";
|
2024-04-26 07:54:02 +02:00
|
|
|
|
2024-12-07 18:26:52 +01:00
|
|
|
const appData = useAppData();
|
|
|
|
|
const signInAction = () => signIn(appData);
|
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-12-15 16:16:16 +01:00
|
|
|
const backgroundImage = useSetting(SettingIds.BackgroundURL);
|
|
|
|
|
const canParseUrl = URL.canParse;
|
|
|
|
|
|
2024-12-07 18:26:52 +01:00
|
|
|
const route = useRoute();
|
|
|
|
|
|
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>
|