diff options
| author | Hakaba Hitoyo <example@example.com> | 2018-02-04 08:36:10 +0900 |
|---|---|---|
| committer | Hakaba Hitoyo <example@example.com> | 2018-02-04 08:36:10 +0900 |
| commit | 013f11497fbc955bea6c182d64b512de2ee3bcdf (patch) | |
| tree | 6979bab5ddc02f68992cf8e71b4612e3f2b02d12 /src/components/post_status_form | |
| parent | 95cba854f389ebdee200d0df147e4c26ed4949a0 (diff) | |
| parent | d97e6777ba849c9802da1e566d2baa2e1d7bdf70 (diff) | |
slove-conflict
Diffstat (limited to 'src/components/post_status_form')
| -rw-r--r-- | src/components/post_status_form/post_status_form.js | 9 | ||||
| -rw-r--r-- | src/components/post_status_form/post_status_form.vue | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index acc97c86..1f63de25 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -64,14 +64,15 @@ const PostStatusForm = { img: profile_image_url_original })) } else if (firstchar === ':') { - const matchedEmoji = filter(this.emoji, (emoji) => emoji.shortcode.match(this.textAtCaret.slice(1))) + const matchedEmoji = filter(this.emoji.concat(this.customEmoji), (emoji) => emoji.shortcode.match(this.textAtCaret.slice(1))) if (matchedEmoji.length <= 0) { return false } - return map(take(matchedEmoji, 5), ({shortcode, image_url}) => ({ + return map(take(matchedEmoji, 5), ({shortcode, image_url, utf}) => ({ // eslint-disable-next-line camelcase screen_name: `:${shortcode}:`, name: '', + utf: utf || '', img: image_url })) } else { @@ -90,6 +91,9 @@ const PostStatusForm = { }, emoji () { return this.$store.state.config.emoji || [] + }, + customEmoji () { + return this.$store.state.config.customEmoji || [] } }, methods: { @@ -104,6 +108,7 @@ const PostStatusForm = { }, postStatus (newStatus) { if (this.posting) { return } + if (this.submitDisabled) { return } if (this.newStatus.status === '') { if (this.newStatus.files.length > 0) { diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index bb2329f3..8e436428 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -6,8 +6,9 @@ </div> <div style="position:relative;" v-if="candidates"> <div class="autocomplete-panel base05-background"> - <div v-for="candidate in candidates" @click="replace(candidate.screen_name + ' ')" class="autocomplete base02"> - <img :src="candidate.img"></img> + <div v-for="candidate in candidates" @click="replace(candidate.utf || (candidate.screen_name + ' '))" class="autocomplete base02"> + <span v-if="candidate.img"><img :src="candidate.img"></img></span> + <span v-else>{{candidate.utf}}</span> <span> {{candidate.screen_name}} <small class="base02">{{candidate.name}}</small> |
