monkeeShark/packages/frontend/src/components/page/page.image.vue

29 lines
622 B
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
2023-05-12 02:46:13 +00:00
<div>
<MediaImage
v-if="image"
:image="image"
:disableImageLink="true"
/>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
2023-05-14 01:50:21 +00:00
import * as Misskey from 'misskey-js';
import { ImageBlock } from './block.type';
import MediaImage from '@/components/MkMediaImage.vue';
const props = defineProps<{
2023-05-14 01:50:21 +00:00
block: ImageBlock,
page: Misskey.entities.Page,
}>();
const image = ref<Misskey.entities.DriveFile>(props.page.attachedFiles.find(x => x.id === props.block.fileId));
</script>