Skip to content

Commit

Permalink
メッセージの画像のサムネイルを表示するコンポーネントが警告を出していたのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
nokhnaton committed Oct 26, 2024
1 parent ddbed0b commit ed73185
Showing 1 changed file with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
<template>
<template v-if="canShow">
<router-link v-if="isLarge" :to="fileLink" :class="$style.largeContainer">
<!--
<div>
<template v-if="canShow">
<router-link v-if="isLarge" :to="fileLink" :class="$style.largeContainer">
<!--
height, widthはlayout shift対策
https://www.mizdra.net/entry/2020/05/31/192613
-->
<img
draggable="false"
:alt="name"
:src="fileThumbnailPath"
:height="fileThumbnailSize.height"
:width="fileThumbnailSize.width"
/>
<play-icon v-if="isAnimatedImage" :class="$style.playIcon" />
</router-link>
<router-link v-else :to="fileLink" :class="$style.container">
<!--
<img
draggable="false"
:alt="name"
:src="fileThumbnailPath"
:height="fileThumbnailSize.height"
:width="fileThumbnailSize.width"
/>
<play-icon v-if="isAnimatedImage" :class="$style.playIcon" />
</router-link>
<router-link v-else :to="fileLink" :class="$style.container">
<!--
CSSで固定値指定なのでheight, widthはつけない
-->
<img draggable="false" :alt="name" :src="fileThumbnailPath" />
<play-icon v-if="isAnimatedImage" :class="$style.playIcon" />
</router-link>
</template>
<div v-else :class="$style.container">表示できない画像です</div>
<img draggable="false" :alt="name" :src="fileThumbnailPath" />
<play-icon v-if="isAnimatedImage" :class="$style.playIcon" />
</router-link>
</template>
<div v-else :class="$style.container">表示できない画像です</div>
</div>
</template>

<script lang="ts" setup>
Expand Down

0 comments on commit ed73185

Please sign in to comment.