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

discussion_filter_note.vue « components « notes « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 61af0b065359b4e5ba5f4a8b85468b9d5af40bb9 (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 { GlButton, GlIcon, GlSprintf } from '@gitlab/ui';
import { s__ } from '~/locale';

import notesEventHub from '../event_hub';

export default {
  i18n: {
    information: s__(
      "Notes|You're only seeing %{boldStart}other activity%{boldEnd} in the feed. To add a comment, switch to one of the following options.",
    ),
  },
  components: {
    GlButton,
    GlIcon,
    GlSprintf,
  },
  methods: {
    selectFilter(value) {
      notesEventHub.$emit('dropdownSelect', value);
    },
  },
};
</script>

<template>
  <li
    class="timeline-entry note note-wrapper discussion-filter-note js-discussion-filter-note"
    data-qa-selector="discussion_filter_container"
  >
    <div class="timeline-icon d-none d-lg-flex">
      <gl-icon name="comment" />
    </div>
    <div class="timeline-content">
      <div data-testid="discussion-filter-timeline-content">
        <gl-sprintf :message="$options.i18n.information">
          <template #bold="{ content }">
            <b>{{ content }}</b>
          </template>
        </gl-sprintf>
      </div>
      <div class="discussion-filter-actions gl-mt-3 gl-display-flex">
        <gl-button variant="default" class="gl-mr-3" @click="selectFilter(0)">
          {{ __('Show all activity') }}
        </gl-button>
        <gl-button variant="default" @click="selectFilter(1)">
          {{ __('Show comments only') }}
        </gl-button>
      </div>
    </div>
  </li>
</template>