summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/page/page.image.vue
blob: 29aebf63e548810760e571a793acc833769790d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->

<template>
<div>
	<MediaImage
		v-if="image"
		:image="image"
		:disableImageLink="true"
	/>
</div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import * as Misskey from 'misskey-js';
import { ImageBlock } from './block.type.js';
import MediaImage from '@/components/MkMediaImage.vue';

const props = defineProps<{
	block: ImageBlock,
	page: Misskey.entities.Page,
}>();

const image = ref<Misskey.entities.DriveFile>(props.page.attachedFiles.find(x => x.id === props.block.fileId));
</script>