mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 11:57:34 -07:00
sensitiveではないメディアも非表示にできるように (#6248)
* sensitiveではないメディアも非表示にできるように * mounted -> created * remove unnecessary v-if
This commit is contained in:
parent
dc9ea9ea70
commit
ae5a8e776e
2 changed files with 15 additions and 7 deletions
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div class="qjewsnkgzzxlxtzncydssfbgjibiehcy" v-if="image.isSensitive && hide && !$store.state.device.alwaysShowNsfw" @click="hide = false">
|
||||
<div class="qjewsnkgzzxlxtzncydssfbgjibiehcy" v-if="hide" @click="hide = false">
|
||||
<div>
|
||||
<b><fa :icon="faExclamationTriangle"/> {{ $t('sensitive') }}</b>
|
||||
<span>{{ $t('clickToShow') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gqnyydlzavusgskkfvwvjiattxdzsqlf" v-else>
|
||||
<i><fa :icon="faEyeSlash" @click="hide = true"></fa></i>
|
||||
<i><fa :icon="faEyeSlash" @click="hide = true"/></i>
|
||||
<a
|
||||
:href="image.url"
|
||||
:style="style"
|
||||
|
@ -63,6 +63,9 @@ export default Vue.extend({
|
|||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.hide = this.image.isSensitive && !this.$store.state.device.alwaysShowNsfw;
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
if (this.$store.state.device.imageNewTab) {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div class="icozogqfvdetwohsdglrbswgrejoxbdj" v-if="video.isSensitive && hide && !$store.state.device.alwaysShowNsfw" @click="hide = false">
|
||||
<div class="icozogqfvdetwohsdglrbswgrejoxbdj" v-if="hide" @click="hide = false">
|
||||
<div>
|
||||
<b><fa icon="exclamation-triangle"/> {{ $t('sensitive') }}</b>
|
||||
<b><fa :icon="faExclamationTriangle"/> {{ $t('sensitive') }}</b>
|
||||
<span>{{ $t('clickToShow') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kkjnbbplepmiyuadieoenjgutgcmtsvu" v-else>
|
||||
<i><fa :icon="faEyeSlash" @click="hide = true"></fa></i>
|
||||
<i><fa :icon="faEyeSlash" @click="hide = true"/></i>
|
||||
<a
|
||||
:href="video.url"
|
||||
rel="nofollow noopener"
|
||||
|
@ -21,7 +21,8 @@
|
|||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { faPlayCircle, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
|
||||
import { faPlayCircle } from '@fortawesome/free-regular-svg-icons';
|
||||
import { faExclamationTriangle, faEyeSlash } from '@fortawesome/free-solid-svg-icons';
|
||||
import i18n from '../i18n';
|
||||
|
||||
export default Vue.extend({
|
||||
|
@ -36,6 +37,7 @@ export default Vue.extend({
|
|||
return {
|
||||
hide: true,
|
||||
faPlayCircle,
|
||||
faExclamationTriangle,
|
||||
faEyeSlash
|
||||
};
|
||||
},
|
||||
|
@ -45,7 +47,10 @@ export default Vue.extend({
|
|||
'background-image': `url(${this.video.thumbnailUrl})`
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.hide = this.video.isSensitive && !this.$store.state.device.alwaysShowNsfw;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue