post status form: add basic image captioning support

This commit is contained in:
William Pitcock 2019-02-18 05:57:12 +00:00
parent 90aa64e5b7
commit 4b9572bd17
3 changed files with 10 additions and 0 deletions

View file

@ -67,6 +67,7 @@ const PostStatusForm = {
status: statusText,
nsfw: false,
files: [],
imageDescriptions: {},
visibility: scope
},
caret: 0
@ -242,6 +243,7 @@ const PostStatusForm = {
visibility: newStatus.visibility,
sensitive: newStatus.nsfw,
media: newStatus.files,
imageDescriptions: newStatus.imageDescriptions || {},
store: this.$store,
inReplyToStatusId: this.replyTo,
contentType: newStatus.contentType
@ -251,6 +253,7 @@ const PostStatusForm = {
status: '',
spoilerText: '',
files: [],
imageDescriptions: {},
visibility: newStatus.visibility,
contentType: newStatus.contentType
}

View file

@ -86,6 +86,7 @@
<audio v-if="type(file) === 'audio'" :src="file.image" controls></audio>
<a v-if="type(file) === 'unknown'" :href="file.image">{{file.url}}</a>
</div>
<input type="text" :placeholder="$t('post_status.media_description')" v-model="newStatus.imageDescriptions[file.id]"></input>
</div>
</div>
<div class="upload_settings" v-if="newStatus.files.length > 0">
@ -158,6 +159,11 @@
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
input {
min-width: 300px;
flex: 1;
}
}
.attachments {

View file

@ -60,6 +60,7 @@
"account_not_locked_warning": "Your account is not {0}. Anyone can follow you to view your follower-only posts.",
"account_not_locked_warning_link": "locked",
"attachments_sensitive": "Mark attachments as sensitive",
"media_description": "Media description",
"content_type": {
"plain_text": "Plain text"
},