Welcome to mirror list, hosted at ThFree Co, Russian Federation.

history_items.vue « components « abuse_report « admin « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 619a8bcfe92819f0726ba98e13cbf6b5903275e3 (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
<script>
import { GlSprintf } from '@gitlab/ui';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import HistoryItem from '~/vue_shared/components/registry/history_item.vue';
import { HISTORY_ITEMS_I18N } from '../constants';

export default {
  name: 'HistoryItems',
  components: {
    GlSprintf,
    TimeAgoTooltip,
    HistoryItem,
  },
  props: {
    report: {
      type: Object,
      required: true,
    },
  },
  computed: {
    reporter() {
      return this.report.reporter;
    },
    reporterName() {
      return this.reporter?.name || this.$options.i18n.deletedReporter;
    },
  },
  i18n: HISTORY_ITEMS_I18N,
};
</script>

<template>
  <!-- The styles `issuable-discussion`, `timeline`, `main-notes-list` and `notes` used below
       are declared in app/assets/stylesheets/pages/notes.scss -->
  <section class="gl-pt-6 issuable-discussion">
    <h2 class="gl-font-lg gl-mt-0 gl-mb-2">{{ $options.i18n.activity }}</h2>
    <ul class="timeline main-notes-list notes">
      <history-item icon="warning">
        <div class="gl-display-flex gl-xs-flex-direction-column">
          <gl-sprintf :message="$options.i18n.reportedByForCategory">
            <template #name>{{ reporterName }}</template>
            <template #category>{{ report.category }}</template>
          </gl-sprintf>
          <time-ago-tooltip :time="report.reportedAt" class="gl-text-secondary gl-sm-ml-3" />
        </div>
      </history-item>
    </ul>
  </section>
</template>