2019-07-07 11:18:12 +05:30
|
|
|
<script>
|
2021-01-29 00:20:46 +05:30
|
|
|
import { GlButton, GlIcon, GlSprintf } from '@gitlab/ui';
|
|
|
|
import { s__ } from '~/locale';
|
2019-07-07 11:18:12 +05:30
|
|
|
|
|
|
|
import notesEventHub from '../event_hub';
|
|
|
|
|
|
|
|
export default {
|
2021-01-29 00:20:46 +05:30
|
|
|
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.",
|
|
|
|
),
|
|
|
|
},
|
2019-07-07 11:18:12 +05:30
|
|
|
components: {
|
2020-10-24 23:57:45 +05:30
|
|
|
GlButton,
|
2020-11-24 15:15:51 +05:30
|
|
|
GlIcon,
|
2021-01-29 00:20:46 +05:30
|
|
|
GlSprintf,
|
2019-07-07 11:18:12 +05:30
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
selectFilter(value) {
|
|
|
|
notesEventHub.$emit('dropdownSelect', value);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2021-01-29 00:20:46 +05:30
|
|
|
<li
|
|
|
|
class="timeline-entry note note-wrapper discussion-filter-note js-discussion-filter-note"
|
|
|
|
data-qa-selector="discussion_filter_container"
|
|
|
|
>
|
2019-07-07 11:18:12 +05:30
|
|
|
<div class="timeline-icon d-none d-lg-flex">
|
2020-11-24 15:15:51 +05:30
|
|
|
<gl-icon name="comment" />
|
2019-07-07 11:18:12 +05:30
|
|
|
</div>
|
|
|
|
<div class="timeline-content">
|
2021-01-29 00:20:46 +05:30
|
|
|
<div data-testid="discussion-filter-timeline-content">
|
|
|
|
<gl-sprintf :message="$options.i18n.information">
|
|
|
|
<template #bold="{ content }">
|
|
|
|
<b>{{ content }}</b>
|
|
|
|
</template>
|
|
|
|
</gl-sprintf>
|
|
|
|
</div>
|
2019-07-07 11:18:12 +05:30
|
|
|
<div class="discussion-filter-actions mt-2">
|
2021-01-29 00:20:46 +05:30
|
|
|
<gl-button variant="default" @click="selectFilter(0)">
|
2019-07-07 11:18:12 +05:30
|
|
|
{{ __('Show all activity') }}
|
2020-10-24 23:57:45 +05:30
|
|
|
</gl-button>
|
2021-01-29 00:20:46 +05:30
|
|
|
<gl-button variant="default" @click="selectFilter(1)">
|
2019-07-07 11:18:12 +05:30
|
|
|
{{ __('Show comments only') }}
|
2020-10-24 23:57:45 +05:30
|
|
|
</gl-button>
|
2019-07-07 11:18:12 +05:30
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</template>
|