2023-07-27 05:31:52 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2020-11-15 04:42:04 +00:00
|
|
|
<template>
|
2023-05-14 01:21:56 +00:00
|
|
|
<div style="margin: 1em 0;">
|
2023-03-31 05:14:30 +00: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 04:42:04 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2023-05-14 01:50:21 +00:00
|
|
|
<script lang="ts" setup>
|
2023-12-26 05:19:35 +00:00
|
|
|
import { onMounted, ref } from 'vue';
|
2023-05-14 01:50:21 +00:00
|
|
|
import * as Misskey from 'misskey-js';
|
2023-12-24 07:16:58 +00:00
|
|
|
import { NoteBlock } from './block.type.js';
|
2023-03-31 05:14:30 +00:00
|
|
|
import MkNote from '@/components/MkNote.vue';
|
|
|
|
import MkNoteDetailed from '@/components/MkNoteDetailed.vue';
|
2023-09-19 07:37:43 +00:00
|
|
|
import * as os from '@/os.js';
|
2020-11-15 04:42:04 +00:00
|
|
|
|
2023-05-14 01:50:21 +00:00
|
|
|
const props = defineProps<{
|
|
|
|
block: NoteBlock,
|
|
|
|
page: Misskey.entities.Page,
|
|
|
|
}>();
|
2021-01-30 01:59:05 +00:00
|
|
|
|
2023-12-26 05:19:35 +00:00
|
|
|
const note = ref<Misskey.entities.Note | null>(null);
|
2021-01-30 01:59:05 +00:00
|
|
|
|
2023-05-14 01:50:21 +00:00
|
|
|
onMounted(() => {
|
|
|
|
os.api('notes/show', { noteId: props.block.note })
|
|
|
|
.then(result => {
|
|
|
|
note.value = result;
|
|
|
|
});
|
2020-11-15 04:42:04 +00:00
|
|
|
});
|
|
|
|
</script>
|