diff options
Diffstat (limited to 'app/assets/javascripts/work_items/components/notes/work_item_note_replying.vue')
-rw-r--r-- | app/assets/javascripts/work_items/components/notes/work_item_note_replying.vue | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/app/assets/javascripts/work_items/components/notes/work_item_note_replying.vue b/app/assets/javascripts/work_items/components/notes/work_item_note_replying.vue new file mode 100644 index 00000000000..46f61ccd204 --- /dev/null +++ b/app/assets/javascripts/work_items/components/notes/work_item_note_replying.vue @@ -0,0 +1,53 @@ +<script> +import { GlAvatar } from '@gitlab/ui'; +import SafeHtml from '~/vue_shared/directives/safe_html'; +import NoteHeader from '~/notes/components/note_header.vue'; +import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; + +export default { + name: 'WorkItemNoteReplying', + components: { + TimelineEntryItem, + GlAvatar, + NoteHeader, + }, + directives: { + SafeHtml, + }, + safeHtmlConfig: { + ADD_TAGS: ['use', 'gl-emoji', 'copy-code'], + }, + constantOptions: { + avatarUrl: window.gon.current_user_avatar_url, + }, + props: { + body: { + type: String, + required: false, + default: '', + }, + }, + computed: { + author() { + return { + avatarUrl: window.gon.current_user_avatar_url, + id: window.gon.current_user_id, + name: window.gon.current_user_fullname, + username: window.gon.current_username, + }; + }, + }, +}; +</script> + +<template> + <timeline-entry-item class="note note-wrapper note-comment gl-p-4 being-posted"> + <div class="timeline-avatar gl-float-left"> + <gl-avatar :src="$options.constantOptions.avatarUrl" :size="32" class="gl-mr-3" /> + </div> + <div class="note-header"> + <note-header :author="author" /> + </div> + <div ref="note-body" v-safe-html:[$options.safeHtmlConfig]="body" class="note-body"></div> + </timeline-entry-item> +</template> |