forked from DebaucheryLibrarian/traxxx
Added dark and SFW modes.
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
<li>
|
||||
<a
|
||||
v-if="tag.poster"
|
||||
:href="`/img/${tag.poster.path}`"
|
||||
:title="tag.poster.comment"
|
||||
:href="`/img/${poster.path}`"
|
||||
:title="poster.comment"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="photo-link"
|
||||
>
|
||||
<img
|
||||
:src="`/img/${tag.poster.thumbnail}`"
|
||||
:src="`/img/${poster.thumbnail}`"
|
||||
:alt="tag.poster.comment"
|
||||
class="poster"
|
||||
>
|
||||
@@ -19,7 +19,7 @@
|
||||
</li>
|
||||
|
||||
<li
|
||||
v-for="photo in tag.photos"
|
||||
v-for="photo in photos"
|
||||
:key="`photo-${photo.id}`"
|
||||
>
|
||||
<a
|
||||
@@ -41,6 +41,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
function poster() {
|
||||
if (this.$store.state.ui.sfw) {
|
||||
return this.tag.poster.sfw;
|
||||
}
|
||||
|
||||
return this.tag.poster;
|
||||
}
|
||||
|
||||
function photos() {
|
||||
if (this.$store.state.ui.sfw) {
|
||||
return this.tag.photos.map(photo => photo.sfw);
|
||||
}
|
||||
|
||||
return this.tag.photos;
|
||||
}
|
||||
|
||||
export default {
|
||||
props: {
|
||||
tag: {
|
||||
@@ -48,6 +64,10 @@ export default {
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
poster,
|
||||
photos,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user