2023-07-27 00:31:52 -05:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2019-04-28 19:11:57 -05:00
|
|
|
<template>
|
2023-05-11 21:46:13 -05:00
|
|
|
<div>
|
2023-09-10 04:40:20 -05:00
|
|
|
<MediaImage
|
|
|
|
v-if="image"
|
|
|
|
:image="image"
|
|
|
|
:disableImageLink="true"
|
|
|
|
/>
|
2019-04-28 19:11:57 -05:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-05-19 06:41:47 -05:00
|
|
|
<script lang="ts" setup>
|
2023-09-10 04:40:20 -05:00
|
|
|
import { ref } from 'vue';
|
2023-05-13 20:50:21 -05:00
|
|
|
import * as Misskey from 'misskey-js';
|
2023-12-24 01:16:58 -06:00
|
|
|
import { ImageBlock } from './block.type.js';
|
2023-09-10 04:40:20 -05:00
|
|
|
import MediaImage from '@/components/MkMediaImage.vue';
|
2019-04-28 19:11:57 -05:00
|
|
|
|
2022-05-19 06:41:47 -05:00
|
|
|
const props = defineProps<{
|
2023-05-13 20:50:21 -05:00
|
|
|
block: ImageBlock,
|
|
|
|
page: Misskey.entities.Page,
|
2022-05-19 06:41:47 -05:00
|
|
|
}>();
|
2021-01-29 19:59:05 -06:00
|
|
|
|
2023-09-10 04:40:20 -05:00
|
|
|
const image = ref<Misskey.entities.DriveFile>(props.page.attachedFiles.find(x => x.id === props.block.fileId));
|
2019-04-28 19:11:57 -05:00
|
|
|
</script>
|