added config for preload and made attachment responsive to it

This commit is contained in:
ValD 2018-12-12 03:33:53 +05:30
parent b195ce12e1
commit 7b4e08dd93
6 changed files with 13 additions and 3 deletions

View file

@ -14,6 +14,7 @@ const settings = {
hideAttachmentsInConvLocal: user.hideAttachmentsInConv,
hideNsfwLocal: user.hideNsfw,
hideISPLocal: user.hideISP,
preloadNsfwImage: user.preloadNsfwImage,
hidePostStatsLocal: typeof user.hidePostStats === 'undefined'
? instance.hidePostStats
: user.hidePostStats,
@ -84,6 +85,9 @@ const settings = {
hideNsfwLocal (value) {
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
},
preloadNsfwImage(value) {
this.$store.dispatch('setOption', { name: 'preloadNsfwImage', value })
},
hideISPLocal (value) {
this.$store.dispatch('setOption', { name: 'hideISP', value })
},

View file

@ -118,6 +118,10 @@
<input type="checkbox" id="hideNsfw" v-model="hideNsfwLocal">
<label for="hideNsfw">{{$t('settings.nsfw_clickthrough')}}</label>
</li>
<li>
<input type="checkbox" id="preloadNsfwImage" v-model="preloadNsfwImage">
<label for="preloadNsfwImage">{{$t('settings.preload_sensitive')}}</label>
</li>
<li>
<input type="checkbox" id="stopGifs" v-model="stopGifs">
<label for="stopGifs">{{$t('settings.stop_gifs')}}</label>