2023-07-27 08:31:52 +03:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2020-11-15 06:42:04 +02:00
|
|
|
<template>
|
2023-05-14 04:21:56 +03:00
|
|
|
<div style="margin: 1em 0;">
|
2023-03-31 08:14:30 +03:00
|
|
|
<MkNote v-if="note && !block.detailed" :key="note.id + ':normal'" v-model:note="note"/>
|
|
|
|
<MkNoteDetailed v-if="note && block.detailed" :key="note.id + ':detail'" v-model:note="note"/>
|
2020-11-15 06:42:04 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2023-05-14 04:50:21 +03:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { onMounted, Ref, ref } from 'vue';
|
|
|
|
import * as Misskey from 'misskey-js';
|
|
|
|
import { NoteBlock } from './block.type';
|
2023-03-31 08:14:30 +03:00
|
|
|
import MkNote from '@/components/MkNote.vue';
|
|
|
|
import MkNoteDetailed from '@/components/MkNoteDetailed.vue';
|
2021-11-11 19:02:25 +02:00
|
|
|
import * as os from '@/os';
|
2020-11-15 06:42:04 +02:00
|
|
|
|
2023-05-14 04:50:21 +03:00
|
|
|
const props = defineProps<{
|
|
|
|
block: NoteBlock,
|
|
|
|
page: Misskey.entities.Page,
|
|
|
|
}>();
|
2021-01-30 03:59:05 +02:00
|
|
|
|
2023-05-14 04:50:21 +03:00
|
|
|
const note: Ref<Misskey.entities.Note | null> = ref(null);
|
2021-01-30 03:59:05 +02:00
|
|
|
|
2023-05-14 04:50:21 +03:00
|
|
|
onMounted(() => {
|
|
|
|
os.api('notes/show', { noteId: props.block.note })
|
|
|
|
.then(result => {
|
|
|
|
note.value = result;
|
|
|
|
});
|
2020-11-15 06:42:04 +02:00
|
|
|
});
|
|
|
|
</script>
|