diff options
author | Dessalines <tyhou13@gmx.com> | 2019-09-02 15:55:50 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-09-02 15:55:50 -0700 |
commit | f538b3fb22da11cccd381196c7b5650edc2a3abf (patch) | |
tree | 2c4923772c16097ca9e087cf087dd4bb297df45e /ui/src/components/comment-form.tsx | |
parent | d99fa5268d63e0bdc9107fb16b60eabc168aff51 (diff) |
Using a proper twitter emoji list for the definitions.
- Fixes #260
Diffstat (limited to 'ui/src/components/comment-form.tsx')
-rw-r--r-- | ui/src/components/comment-form.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx index 93ad69ea..54035fde 100644 --- a/ui/src/components/comment-form.tsx +++ b/ui/src/components/comment-form.tsx @@ -1,7 +1,8 @@ import { Component, linkEvent } from 'inferno'; import { CommentNode as CommentNodeI, CommentForm as CommentFormI, SearchForm, SearchType, SortType, UserOperation, SearchResponse } from '../interfaces'; import { Subscription } from "rxjs"; -import { capitalizeFirstLetter, mentionDropdownFetchLimit, msgOp, md, emojiMentionList, mdToHtml, randomStr, imageUploadUrl, markdownHelpUrl } from '../utils'; +import { capitalizeFirstLetter, mentionDropdownFetchLimit, msgOp, mdToHtml, randomStr, imageUploadUrl, markdownHelpUrl } from '../utils'; +import { twemojis } from '../twemojis'; import { WebSocketService, UserService } from '../services'; import * as autosize from 'autosize'; import { i18n } from '../i18next'; @@ -49,12 +50,12 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> { trigger: ':', menuItemTemplate: (item: any) => { let emoji = `:${item.original.key}:`; - return `${md.renderInline(emoji)} ${emoji}`; + return `${item.original.val} ${emoji}`; }, selectTemplate: (item: any) => { return `:${item.original.key}:`; }, - values: emojiMentionList(), + values: Object.entries(twemojis).map(e => {return {'key': e[0], 'val': e[1]}}), allowSpaces: false, autocompleteMode: true, menuItemLimit: 10, |