refactor: pageBlockTypesをjson-schemaに移植
This commit is contained in:
parent
6e99fd5224
commit
02b9c7aecc
14 changed files with 152 additions and 54 deletions
|
|
@ -14,15 +14,19 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { onMounted, 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,
|
||||
block: Misskey.entities.PageBlock,
|
||||
page: Misskey.entities.Page,
|
||||
}>();
|
||||
|
||||
const image = ref<Misskey.entities.DriveFile>(props.page.attachedFiles.find(x => x.id === props.block.fileId));
|
||||
const image = ref<Misskey.entities.DriveFile | null>(null);
|
||||
|
||||
onMounted(() => {
|
||||
image.value = props.page.attachedFiles.find(x => x.id === props.block.fileId) ?? null;
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue