aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authordave <starpumadev@gmail.com>2019-04-02 10:26:14 -0400
committerdave <starpumadev@gmail.com>2019-04-02 10:26:14 -0400
commitc9a9b3122db9c2c089e36930ed2a252f80de71cd (patch)
tree7cef1247ccd86075216e4419b56aa19cf2e1c1c7 /src/components
parentac28e8c2f981b6584f0103e10b0a5f5b025fcaae (diff)
#469 - DM warning text should vary based on BE setting
Diffstat (limited to 'src/components')
-rw-r--r--src/components/post_status_form/post_status_form.js4
-rw-r--r--src/components/post_status_form/post_status_form.vue2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 40e2610e..d52abeee 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -179,6 +179,10 @@ const PostStatusForm = {
},
postFormats () {
return this.$store.state.instance.postFormats || []
+ },
+ showDirectWarning () {
+ console.log(this.$store.state.instance)
+ return this.$store.state.instance.safeDM && this.newStatus.visibility === 'direct'
}
},
methods: {
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index 3d3a1082..2f70a2ad 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -9,7 +9,7 @@
class="visibility-notice">
<router-link :to="{ name: 'user-settings' }">{{ $t('post_status.account_not_locked_warning_link') }}</router-link>
</i18n>
- <p v-if="this.newStatus.visibility == 'direct'" class="visibility-notice">{{ $t('post_status.direct_warning') }}</p>
+ <p v-if="showDirectWarning" class="visibility-notice">{{ $t('post_status.direct_warning') }}</p>
<EmojiInput
v-if="newStatus.spoilerText || alwaysShowSubject"
type="text"