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

29 lines
625 B
Vue
Raw Normal View History

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