From 4a266a4d0547c0f68628001e8948dd171ef4554b Mon Sep 17 00:00:00 2001 From: Shpuld Shpludson Date: Fri, 31 Jan 2020 00:24:54 +0000 Subject: Fix one click nsfw unhide on videos --- src/components/attachment/attachment.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/components/attachment') diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index 06b496b0..b832e10f 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -2,6 +2,7 @@ import StillImage from '../still-image/still-image.vue' import VideoAttachment from '../video_attachment/video_attachment.vue' import nsfwImage from '../../assets/nsfw.png' import fileTypeService from '../../services/file_type/file_type.service.js' +import { mapGetters } from 'vuex' const Attachment = { props: [ @@ -49,7 +50,8 @@ const Attachment = { }, fullwidth () { return this.type === 'html' || this.type === 'audio' - } + }, + ...mapGetters(['mergedConfig']) }, methods: { linkClicked ({ target }) { @@ -58,7 +60,7 @@ const Attachment = { } }, openModal (event) { - const modalTypes = this.$store.getters.mergedConfig.playVideosInModal + const modalTypes = this.mergedConfig.playVideosInModal ? ['image', 'video'] : ['image'] if (fileTypeService.fileMatchesSomeType(modalTypes, this.attachment) || @@ -71,7 +73,10 @@ const Attachment = { } }, toggleHidden (event) { - if (this.$store.getters.mergedConfig.useOneClickNsfw && !this.showHidden) { + if ( + (this.mergedConfig.useOneClickNsfw && !this.showHidden) && + (this.type !== 'video' || this.mergedConfig.playVideosInModal) + ) { this.openModal(event) return } -- cgit v1.2.3-70-g09d2 From ba3c2780023e237f95fd05b04cca5a2e7bf696ca Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 12 Feb 2020 01:26:01 +0200 Subject: dismiss warning when selecting other themes, fix collapsed attachments link color --- src/components/attachment/attachment.vue | 2 ++ src/components/style_switcher/style_switcher.js | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/components/attachment') diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 0748b2f0..a7e217c1 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -130,6 +130,8 @@ .placeholder { margin-right: 8px; margin-bottom: 4px; + color: $fallback--link; + color: var(--postLink, $fallback--link); } .nsfw-placeholder { diff --git a/src/components/style_switcher/style_switcher.js b/src/components/style_switcher/style_switcher.js index 0c8a9c3b..a7f586f4 100644 --- a/src/components/style_switcher/style_switcher.js +++ b/src/components/style_switcher/style_switcher.js @@ -385,6 +385,7 @@ export default { origin, forceUseSource = false ) { + this.dismissWarning() if (!source && !theme) { throw new Error('Can\'t load theme: empty') } @@ -723,6 +724,7 @@ export default { } }, selected () { + this.dismissWarning() if (this.selectedVersion === 1) { if (!this.keepRoundness) { this.clearRoundness() -- cgit v1.2.3-70-g09d2