diff options
author | kimsible <kimsible@users.noreply.github.com> | 2020-08-09 16:20:31 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-14 15:03:38 +0200 |
commit | ee3bd9db05faee81c3def742ffd77de02f25342a (patch) | |
tree | b2bf61e27b518c1450e4821c1fa09f2c8fe3015c /client/src/app/+videos/+video-watch/comment/video-comment-add.component.ts | |
parent | fd9c3c8d66197c8f6dfc6cc01cad797cda6c4f30 (diff) | |
download | PeerTube-ee3bd9db05faee81c3def742ffd77de02f25342a.tar.gz PeerTube-ee3bd9db05faee81c3def742ffd77de02f25342a.tar.zst PeerTube-ee3bd9db05faee81c3def742ffd77de02f25342a.zip |
Add emoji list to markdown infos
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 | 16 |
1 files changed, 14 insertions, 2 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 c6e9c73b8..3d0611a2d 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 | |||
@@ -27,6 +27,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, | |||
27 | @Output() cancel = new EventEmitter() | 27 | @Output() cancel = new EventEmitter() |
28 | 28 | ||
29 | @ViewChild('visitorModal', { static: true }) visitorModal: NgbModal | 29 | @ViewChild('visitorModal', { static: true }) visitorModal: NgbModal |
30 | @ViewChild('emojiModal', { static: true }) emojiModal: NgbModal | ||
30 | @ViewChild('textarea', { static: true }) textareaElement: ElementRef | 31 | @ViewChild('textarea', { static: true }) textareaElement: ElementRef |
31 | 32 | ||
32 | addingComment = false | 33 | addingComment = false |
@@ -44,6 +45,12 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, | |||
44 | super() | 45 | super() |
45 | } | 46 | } |
46 | 47 | ||
48 | get emojiMarkupList () { | ||
49 | const emojiMarkup = require('markdown-it-emoji/lib/data/light.json') | ||
50 | |||
51 | return emojiMarkup | ||
52 | } | ||
53 | |||
47 | ngOnInit () { | 54 | ngOnInit () { |
48 | this.buildForm({ | 55 | this.buildForm({ |
49 | text: this.videoCommentValidatorsService.VIDEO_COMMENT_TEXT | 56 | text: this.videoCommentValidatorsService.VIDEO_COMMENT_TEXT |
@@ -97,7 +104,12 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, | |||
97 | } | 104 | } |
98 | } | 105 | } |
99 | 106 | ||
100 | hideVisitorModal () { | 107 | openEmojiModal (event: any) { |
108 | event.preventDefault() | ||
109 | this.modalService.open(this.emojiModal, { backdrop: true }) | ||
110 | } | ||
111 | |||
112 | hideModals () { | ||
101 | this.modalService.dismissAll() | 113 | this.modalService.dismissAll() |
102 | } | 114 | } |
103 | 115 | ||
@@ -145,7 +157,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnChanges, | |||
145 | } | 157 | } |
146 | 158 | ||
147 | gotoLogin () { | 159 | gotoLogin () { |
148 | this.hideVisitorModal() | 160 | this.hideModals() |
149 | this.router.navigate([ '/login' ]) | 161 | this.router.navigate([ '/login' ]) |
150 | } | 162 | } |
151 | 163 | ||