diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-03-11 18:53:34 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-03-11 18:53:34 +0000 |
| commit | 7c26435e66fd7e142ea4b88fbe51eede32eeb5ce (patch) | |
| tree | d7b4ea789ceaaa8e5dacd7e74100962853853132 /src/components/post_status_form | |
| parent | 7e9c8c3d219aa3b787c5606efbb54a73c1738b07 (diff) | |
| parent | f397537642a6b8a4079d8d45d835ddd50f2d2b4a (diff) | |
Merge branch 'develop' into 'master'
Update master with bugfixes (and other changes)
See merge request pleroma/pleroma-fe!673
Diffstat (limited to 'src/components/post_status_form')
| -rw-r--r-- | src/components/post_status_form/post_status_form.js | 6 | ||||
| -rw-r--r-- | src/components/post_status_form/post_status_form.vue | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index c28c51bf..1f0df35a 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -171,6 +171,9 @@ const PostStatusForm = { }, formattingOptionsEnabled () { return this.$store.state.instance.formattingOptionsEnabled + }, + postFormats () { + return this.$store.state.instance.postFormats || [] } }, methods: { @@ -219,6 +222,9 @@ const PostStatusForm = { this.highlighted = 0 } }, + onKeydown (e) { + e.stopPropagation() + }, setCaret ({target: {selectionStart}}) { this.caret = selectionStart }, diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 40d24b97..3d1df91b 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -20,6 +20,7 @@ ref="textarea" @click="setCaret" @keyup="setCaret" v-model="newStatus.status" :placeholder="$t('post_status.default')" rows="1" class="form-control" + @keydown="onKeydown" @keydown.down="cycleForward" @keydown.up="cycleBackward" @keydown.shift.tab="cycleBackward" @@ -38,9 +39,9 @@ <span class="text-format" v-if="formattingOptionsEnabled"> <label for="post-content-type" class="select"> <select id="post-content-type" v-model="newStatus.contentType" class="form-control"> - <option value="text/plain">{{$t('post_status.content_type.plain_text')}}</option> - <option value="text/html">HTML</option> - <option value="text/markdown">Markdown</option> + <option v-for="postFormat in postFormats" :key="postFormat" :value="postFormat"> + {{$t(`post_status.content_type["${postFormat}"]`)}} + </option> </select> <i class="icon-down-open"></i> </label> |
