forked from mirrors/misskey
アニメーション停止箇所の追加 (#4138)
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
<div class="root photos">
|
||||
<p class="initializing" v-if="fetching"><fa icon="spinner" pulse fixed-width/>{{ $t('@.loading') }}<mk-ellipsis/></p>
|
||||
<div class="stream" v-if="!fetching && images.length > 0">
|
||||
<a v-for="image in images"
|
||||
<a v-for="(image, i) in images" :key="i"
|
||||
class="img"
|
||||
:style="`background-image: url(${image.media.thumbnailUrl})`"
|
||||
:style="`background-image: url(${thumbnail(image.media)})`"
|
||||
:href="image.note | notePage"
|
||||
></a>
|
||||
</div>
|
||||
@@ -15,6 +15,7 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import i18n from '../../../../i18n';
|
||||
import { getStaticImageUrl } from '../../../../common/scripts/get-static-image-url';
|
||||
|
||||
export default Vue.extend({
|
||||
i18n: i18n('mobile/views/pages/user/home.photos.vue'),
|
||||
@@ -50,7 +51,14 @@ export default Vue.extend({
|
||||
}
|
||||
this.fetching = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
thumbnail(image: any): string {
|
||||
return this.$store.state.device.disableShowingAnimatedImages
|
||||
? getStaticImageUrl(image.thumbnailUrl)
|
||||
: image.thumbnailUrl;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user