summaryrefslogtreecommitdiff
path: root/src/client/app/common
diff options
context:
space:
mode:
authorMeiMei <30769358+mei23@users.noreply.github.com>2019-02-05 06:22:39 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-02-05 06:22:39 +0900
commit41629810813778812bc9dd729f68e8cd3e7e7758 (patch)
tree9b3722bade0d3f47d9fbe8feef0c71851c25d16b /src/client/app/common
parent[Client] Fix bug (diff)
downloadmisskey-41629810813778812bc9dd729f68e8cd3e7e7758.tar.gz
misskey-41629810813778812bc9dd729f68e8cd3e7e7758.tar.bz2
misskey-41629810813778812bc9dd729f68e8cd3e7e7758.zip
アニメーション停止箇所の追加 (#4138)
Diffstat (limited to 'src/client/app/common')
-rw-r--r--src/client/app/common/views/widgets/photo-stream.vue11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/app/common/views/widgets/photo-stream.vue b/src/client/app/common/views/widgets/photo-stream.vue
index 516c626323..d57be1d33f 100644
--- a/src/client/app/common/views/widgets/photo-stream.vue
+++ b/src/client/app/common/views/widgets/photo-stream.vue
@@ -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>