post status form: add basic image captioning support
This commit is contained in:
parent
90aa64e5b7
commit
4b9572bd17
|
@ -67,6 +67,7 @@ const PostStatusForm = {
|
||||||
status: statusText,
|
status: statusText,
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
files: [],
|
files: [],
|
||||||
|
imageDescriptions: {},
|
||||||
visibility: scope
|
visibility: scope
|
||||||
},
|
},
|
||||||
caret: 0
|
caret: 0
|
||||||
|
@ -242,6 +243,7 @@ const PostStatusForm = {
|
||||||
visibility: newStatus.visibility,
|
visibility: newStatus.visibility,
|
||||||
sensitive: newStatus.nsfw,
|
sensitive: newStatus.nsfw,
|
||||||
media: newStatus.files,
|
media: newStatus.files,
|
||||||
|
imageDescriptions: newStatus.imageDescriptions || {},
|
||||||
store: this.$store,
|
store: this.$store,
|
||||||
inReplyToStatusId: this.replyTo,
|
inReplyToStatusId: this.replyTo,
|
||||||
contentType: newStatus.contentType
|
contentType: newStatus.contentType
|
||||||
|
@ -251,6 +253,7 @@ const PostStatusForm = {
|
||||||
status: '',
|
status: '',
|
||||||
spoilerText: '',
|
spoilerText: '',
|
||||||
files: [],
|
files: [],
|
||||||
|
imageDescriptions: {},
|
||||||
visibility: newStatus.visibility,
|
visibility: newStatus.visibility,
|
||||||
contentType: newStatus.contentType
|
contentType: newStatus.contentType
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@
|
||||||
<audio v-if="type(file) === 'audio'" :src="file.image" controls></audio>
|
<audio v-if="type(file) === 'audio'" :src="file.image" controls></audio>
|
||||||
<a v-if="type(file) === 'unknown'" :href="file.image">{{file.url}}</a>
|
<a v-if="type(file) === 'unknown'" :href="file.image">{{file.url}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
<input type="text" :placeholder="$t('post_status.media_description')" v-model="newStatus.imageDescriptions[file.id]"></input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="upload_settings" v-if="newStatus.files.length > 0">
|
<div class="upload_settings" v-if="newStatus.files.length > 0">
|
||||||
|
@ -158,6 +159,11 @@
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
min-width: 300px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.attachments {
|
.attachments {
|
||||||
|
|
|
@ -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": "Your account is not {0}. Anyone can follow you to view your follower-only posts.",
|
||||||
"account_not_locked_warning_link": "locked",
|
"account_not_locked_warning_link": "locked",
|
||||||
"attachments_sensitive": "Mark attachments as sensitive",
|
"attachments_sensitive": "Mark attachments as sensitive",
|
||||||
|
"media_description": "Media description",
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"plain_text": "Plain text"
|
"plain_text": "Plain text"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue