アニメーション停止箇所の追加 (#4138)
This commit is contained in:
@ -5,9 +5,9 @@
|
||||
|
||||
<p :class="$style.fetching" v-if="fetching"><fa icon="spinner" pulse fixed-width/>{{ $t('@.loading') }}<mk-ellipsis/></p>
|
||||
<div :class="$style.stream" v-if="!fetching && images.length > 0">
|
||||
<div v-for="image in images"
|
||||
<div v-for="(image, i) in images" :key="i"
|
||||
:class="$style.img"
|
||||
:style="`background-image: url(${image.thumbnailUrl || image.url})`"
|
||||
:style="`background-image: url(${thumbnail(image)})`"
|
||||
draggable="true"
|
||||
@dragstart="onDragstart(image, $event)"
|
||||
></div>
|
||||
@ -20,6 +20,7 @@
|
||||
<script lang="ts">
|
||||
import define from '../../../common/define-widget';
|
||||
import i18n from '../../../i18n';
|
||||
import { getStaticImageUrl } from '../../scripts/get-static-image-url';
|
||||
|
||||
export default define({
|
||||
name: 'photo-stream',
|
||||
@ -77,6 +78,12 @@ export default define({
|
||||
e.dataTransfer.effectAllowed = 'move';
|
||||
e.dataTransfer.setData('mk_drive_file', JSON.stringify(file));
|
||||
},
|
||||
|
||||
thumbnail(image: any): string {
|
||||
return this.$store.state.device.disableShowingAnimatedImages
|
||||
? getStaticImageUrl(image.thumbnailUrl)
|
||||
: image.thumbnailUrl;
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user