2023-12-04 12:41:55 +01:00
|
|
|
<template>
|
2023-12-24 17:12:21 +01:00
|
|
|
<MkAnimBg
|
|
|
|
v-if="showAnimBg"
|
|
|
|
class="fixed z-0 top-0 left-0 w-screen h-screen transition-opacity duration-[2s]"
|
|
|
|
:class="isCanvasLoaded ? 'opacity-100' : 'opacity-0'"
|
|
|
|
@load="isCanvasLoaded = true"
|
|
|
|
></MkAnimBg>
|
2023-12-13 15:14:07 +01:00
|
|
|
<GMisskeyGateway
|
2023-12-24 17:12:21 +01:00
|
|
|
class="relative"
|
2024-03-13 15:42:36 +01:00
|
|
|
v-if="filteredQuery"
|
2024-01-28 04:32:14 +01:00
|
|
|
:action="{
|
|
|
|
type: 'link',
|
|
|
|
path: `/share?${stringifyQuery(filteredQuery)}`,
|
|
|
|
}"
|
2023-12-24 17:12:21 +01:00
|
|
|
:manualInstance="manualInstance"
|
2023-12-13 15:14:07 +01:00
|
|
|
></GMisskeyGateway>
|
2023-12-04 12:41:55 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2024-03-13 15:42:36 +01:00
|
|
|
import { stringifyQuery, parseQuery } from 'ufo';
|
2023-12-04 12:41:55 +01:00
|
|
|
|
|
|
|
definePageMeta({
|
|
|
|
layout: 'blank',
|
|
|
|
});
|
|
|
|
|
|
|
|
useHead({
|
|
|
|
meta: [
|
|
|
|
{ name: 'robots', content: 'noindex' },
|
|
|
|
],
|
|
|
|
});
|
|
|
|
|
2024-03-13 15:42:36 +01:00
|
|
|
const { meta } = useRoute();
|
2023-12-24 17:12:21 +01:00
|
|
|
|
2024-03-13 15:42:36 +01:00
|
|
|
const manualInstance = ref<string | undefined>();
|
2023-12-24 17:12:21 +01:00
|
|
|
|
2024-03-13 15:42:36 +01:00
|
|
|
const filteredQuery = ref<Record<string, any>>({});
|
2023-12-24 17:12:21 +01:00
|
|
|
|
|
|
|
const isCanvasLoaded = ref(false);
|
|
|
|
const showAnimBg = ref(false);
|
|
|
|
|
2024-03-13 15:42:36 +01:00
|
|
|
if (process.client) {
|
|
|
|
const query = parseQuery(location.search.slice(1));
|
|
|
|
|
|
|
|
filteredQuery.value = {
|
|
|
|
...query,
|
|
|
|
replyId: undefined,
|
|
|
|
renoteId: undefined,
|
|
|
|
visibleUserIds: undefined,
|
|
|
|
fileIds: undefined,
|
|
|
|
manualInstance: undefined,
|
|
|
|
};
|
|
|
|
|
|
|
|
manualInstance.value = Array.isArray(query.manualInstance) ? query.manualInstance[0] : query.manualInstance ?? undefined;
|
2023-12-24 17:12:21 +01:00
|
|
|
}
|
|
|
|
|
2024-03-13 15:42:36 +01:00
|
|
|
onMounted(() => {
|
|
|
|
if (window.innerWidth >= 768) {
|
|
|
|
showAnimBg.value = true;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2023-12-04 12:41:55 +01:00
|
|
|
const { t } = useI18n();
|
|
|
|
|
|
|
|
meta.title = t('_share.title');
|
2023-12-20 11:39:08 +01:00
|
|
|
meta.scrollButton = false;
|
2023-12-13 15:14:07 +01:00
|
|
|
</script>
|