diff options
author | Kimsible <1877318+kimsible@users.noreply.github.com> | 2020-11-08 11:35:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 11:35:09 +0100 |
commit | f34cc2a48e534c96598490e1d13e426f05b63d0f (patch) | |
tree | 43d7e61a1be067569babfea31c8b784f42a10d11 /client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts | |
parent | 98b94643127d881cbc09a12812185aed44173f16 (diff) | |
download | PeerTube-f34cc2a48e534c96598490e1d13e426f05b63d0f.tar.gz PeerTube-f34cc2a48e534c96598490e1d13e426f05b63d0f.tar.zst PeerTube-f34cc2a48e534c96598490e1d13e426f05b63d0f.zip |
Improve markdown-it emoji list column display (#3253)
Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Co-authored-by: Rigel Kent <sendmemail@rigelk.eu>
Diffstat (limited to 'client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts')
-rw-r--r-- | client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts index d746a614b..4bde5c53d 100644 --- a/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts +++ b/client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts | |||
@@ -43,9 +43,18 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, | |||
43 | } | 43 | } |
44 | 44 | ||
45 | get emojiMarkupList () { | 45 | get emojiMarkupList () { |
46 | const emojiMarkup = require('markdown-it-emoji/lib/data/light.json') | 46 | const emojiMarkupObjectList = require('markdown-it-emoji/lib/data/light.json') |
47 | |||
48 | // Populate emoji-markup-list from object to array to avoid keys alphabetical order | ||
49 | const emojiMarkupArrayList = [] | ||
50 | for (const emojiMarkupName in emojiMarkupObjectList) { | ||
51 | if (emojiMarkupName) { | ||
52 | const emoji = emojiMarkupObjectList[emojiMarkupName] | ||
53 | emojiMarkupArrayList.push([emoji, emojiMarkupName]) | ||
54 | } | ||
55 | } | ||
47 | 56 | ||
48 | return emojiMarkup | 57 | return emojiMarkupArrayList |
49 | } | 58 | } |
50 | 59 | ||
51 | ngOnInit () { | 60 | ngOnInit () { |
@@ -89,7 +98,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, | |||
89 | 98 | ||
90 | openEmojiModal (event: any) { | 99 | openEmojiModal (event: any) { |
91 | event.preventDefault() | 100 | event.preventDefault() |
92 | this.modalService.open(this.emojiModal, { backdrop: true }) | 101 | this.modalService.open(this.emojiModal, { backdrop: true, size: 'lg' }) |
93 | } | 102 | } |
94 | 103 | ||
95 | hideModals () { | 104 | hideModals () { |