summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes/components/issue_placeholder_note.vue
blob: 4c089d755c85567f4fcaac359ca187cba6f91d14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<script>
  import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';

  export default {
    name: 'issuePlaceholderNote',
    props: {
      note: {
        type: Object,
        required: true,
      },
    },
    components: {
      userAvatarLink,
    },
    data() {
      return {
        currentUser: this.$store.getters.getUserData,
      };
    },
  };
</script>

<template>
  <li class="note being-posted fade-in-half timeline-entry">
    <div class="timeline-entry-inner">
      <div class="timeline-icon">
        <user-avatar-link
          :link-href="currentUser.path"
          :img-src="currentUser.avatar_url"
          :size="40"
          />
      </div>
      <div
        :class="{ discussion: !note.individual_note }"
        class="timeline-content">
        <div class="note-header">
          <div class="note-header-info">
            <a :href="currentUser.path">
              <span class="hidden-xs">{{currentUser.name}}</span>
              <span class="note-headline-light">@{{currentUser.username}}</span>
            </a>
          </div>
        </div>
        <div class="note-body">
          <div class="note-text">
            <p>{{note.body}}</p>
          </div>
        </div>
      </div>
    </div>
  </li>
</template>