renamed config to preload images and add ident to config

This commit is contained in:
ValD 2018-12-12 03:42:29 +05:30
parent 7b4e08dd93
commit 139659d42c
6 changed files with 13 additions and 11 deletions

View file

@ -13,7 +13,7 @@ const Attachment = {
return { return {
nsfwImage, nsfwImage,
hideNsfwLocal: this.$store.state.config.hideNsfw, hideNsfwLocal: this.$store.state.config.hideNsfw,
preloadNsfwImage: this.$store.state.config.preloadNsfwImage, preloadImage: this.$store.state.config.preloadImage,
loopVideo: this.$store.state.config.loopVideo, loopVideo: this.$store.state.config.loopVideo,
showHidden: false, showHidden: false,
loading: false, loading: false,

View file

@ -9,7 +9,7 @@
<div class="hider" v-if="nsfw && hideNsfwLocal && !hidden"> <div class="hider" v-if="nsfw && hideNsfwLocal && !hidden">
<a href="#" @click.prevent="toggleHidden()">Hide</a> <a href="#" @click.prevent="toggleHidden()">Hide</a>
</div> </div>
<a v-if="type === 'image' && (!hidden || preloadNsfwImage)" class="image-attachment" :class="{'hidden': hidden && preloadNsfwImage}" :href="attachment.url" target="_blank" :title="attachment.description"> <a v-if="type === 'image' && (!hidden || preloadImage)" class="image-attachment" :class="{'hidden': hidden && preloadImage}" :href="attachment.url" target="_blank" :title="attachment.description">
<StillImage :class="{'small': isSmall}" referrerpolicy="no-referrer" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/> <StillImage :class="{'small': isSmall}" referrerpolicy="no-referrer" :mimetype="attachment.mimetype" :src="attachment.large_thumb_url || attachment.url"/>
</a> </a>

View file

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

View file

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

View file

@ -125,7 +125,7 @@
"hide_attachments_in_convo": "Hide attachments in conversations", "hide_attachments_in_convo": "Hide attachments in conversations",
"hide_attachments_in_tl": "Hide attachments in timeline", "hide_attachments_in_tl": "Hide attachments in timeline",
"hide_isp": "Hide instance-specific panel", "hide_isp": "Hide instance-specific panel",
"preload_sensitive": "Preload Sensitive Images", "preload_images": "Preload images",
"hide_post_stats": "Hide post statistics (e.g. the number of favorites)", "hide_post_stats": "Hide post statistics (e.g. the number of favorites)",
"hide_user_stats": "Hide user statistics (e.g. the number of followers)", "hide_user_stats": "Hide user statistics (e.g. the number of followers)",
"import_followers_from_a_csv_file": "Import follows from a csv file", "import_followers_from_a_csv_file": "Import follows from a csv file",

View file

@ -9,7 +9,7 @@ const defaultState = {
hideAttachments: false, hideAttachments: false,
hideAttachmentsInConv: false, hideAttachmentsInConv: false,
hideNsfw: true, hideNsfw: true,
preloadNsfwImage: true, preloadImage: true,
loopVideo: true, loopVideo: true,
loopVideoSilentOnly: true, loopVideoSilentOnly: true,
autoLoad: true, autoLoad: true,