Add a checkbox for marking a post's attachments as NSFW

This commit is contained in:
scarlett 2018-08-25 22:18:43 +01:00
parent 30a6b7be5b
commit a7811e7bd9
5 changed files with 13 additions and 3 deletions

View file

@ -53,6 +53,7 @@ const PostStatusForm = {
highlighted: 0,
newStatus: {
status: statusText,
nsfw: false,
files: [],
visibility: this.messageScope || this.$store.state.users.currentUser.default_scope
},
@ -204,6 +205,7 @@ const PostStatusForm = {
status: newStatus.status,
spoilerText: newStatus.spoilerText || null,
visibility: newStatus.visibility,
sensitive: newStatus.nsfw,
media: newStatus.files,
store: this.$store,
inReplyToStatusId: this.replyTo

View file

@ -75,6 +75,11 @@
</div>
</div>
</div>
<div class="upload_settings" v-if="newStatus.files.length > 0">
<input type="checkbox" id="filesSensitive" v-model="newStatus.nsfw">
<label for="filesSensitive" v-if="newStatus.nsfw">{{$t('post_status.attachments_sensitive')}}</label>
<label for="filesSensitive" v-else v-html="$t('post_status.attachments_not_sensitive')"></label>
</div>
</form>
</div>
</template>