#469 - update behavior of safe_dm

This commit is contained in:
dave 2019-04-02 11:19:45 -04:00
parent 9d5ed04147
commit 67258571c5
3 changed files with 9 additions and 5 deletions

View File

@ -180,8 +180,8 @@ const PostStatusForm = {
postFormats () { postFormats () {
return this.$store.state.instance.postFormats || [] return this.$store.state.instance.postFormats || []
}, },
showDirectWarning () { safeDMEnabled () {
return this.$store.state.instance.safeDM && this.newStatus.visibility === 'direct' return this.$store.state.instance.safeDM
} }
}, },
methods: { methods: {

View File

@ -3,13 +3,16 @@
<form @submit.prevent="postStatus(newStatus)"> <form @submit.prevent="postStatus(newStatus)">
<div class="form-group" > <div class="form-group" >
<i18n <i18n
v-if="!this.$store.state.users.currentUser.locked && this.newStatus.visibility == 'private'" v-if="!$store.state.users.currentUser.locked && newStatus.visibility == 'private'"
path="post_status.account_not_locked_warning" path="post_status.account_not_locked_warning"
tag="p" tag="p"
class="visibility-notice"> class="visibility-notice">
<router-link :to="{ name: 'user-settings' }">{{ $t('post_status.account_not_locked_warning_link') }}</router-link> <router-link :to="{ name: 'user-settings' }">{{ $t('post_status.account_not_locked_warning_link') }}</router-link>
</i18n> </i18n>
<p v-if="showDirectWarning" class="visibility-notice">{{ $t('post_status.direct_warning') }}</p> <p v-if="newStatus.visibility === 'direct'" class="visibility-notice">
<span v-if="safeDMEnabled">{{ $t('post_status.direct_warning_to_first_only') }}</span>
<span v-else>{{ $t('post_status.direct_warning_to_all') }}</span>
</p>
<EmojiInput <EmojiInput
v-if="newStatus.spoilerText || alwaysShowSubject" v-if="newStatus.spoilerText || alwaysShowSubject"
type="text" type="text"

View File

@ -80,7 +80,8 @@
}, },
"content_warning": "Subject (optional)", "content_warning": "Subject (optional)",
"default": "Just landed in L.A.", "default": "Just landed in L.A.",
"direct_warning": "This post will only be visible to all the mentioned users.", "direct_warning_to_all": "This post will be visible to all the mentioned users.",
"direct_warning_to_first_only": "This post will only be visible to the mentioned user at the beginning of the message.",
"posting": "Posting", "posting": "Posting",
"scope": { "scope": {
"direct": "Direct - Post to mentioned users only", "direct": "Direct - Post to mentioned users only",