enhance(frontend): データセーバーモードで隠れる画像を増やす等 (#11806)

* enhance datasaver mode

* サムネイルがないとき変な角丸にならんようにする

* Avoid using wildcard selector

* Avoid wildcard

* Update MkMediaImage.vue

* (fix) ノートの画像プレビューがでない

* (fix) recent pages design

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
かっこかり 2023-09-10 18:40:20 +09:00 committed by GitHub
parent 85078601c2
commit c0838c473f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 87 additions and 43 deletions

View file

@ -5,20 +5,24 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<div>
<ImgWithBlurhash v-if="image" style="max-width: 100%;" :hash="image.blurhash" :src="image.url" :alt="image.comment" :title="image.comment" :width="image.properties.width" :height="image.properties.height" :cover="false"/>
<MediaImage
v-if="image"
:image="image"
:disableImageLink="true"
/>
</div>
</template>
<script lang="ts" setup>
import { } from 'vue';
import { ref } from 'vue';
import * as Misskey from 'misskey-js';
import { ImageBlock } from './block.type';
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
import MediaImage from '@/components/MkMediaImage.vue';
const props = defineProps<{
block: ImageBlock,
page: Misskey.entities.Page,
}>();
const image = props.page.attachedFiles.find(x => x.id === props.block.fileId);
const image = ref<Misskey.entities.DriveFile>(props.page.attachedFiles.find(x => x.id === props.block.fileId));
</script>