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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-05 12:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-05 12:09:00 +0300
commit015890a1b77cd90e9ffeb704944d1fb63b0ce555 (patch)
treebcf07119c9492fb59e637e732b3427d752c0cc49 /app/assets/javascripts/notes
parentd10e04a10b5c7bf4e46589f05e8b63db30b3972d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/notes')
-rw-r--r--app/assets/javascripts/notes/components/discussion_filter_note.vue37
1 files changed, 17 insertions, 20 deletions
diff --git a/app/assets/javascripts/notes/components/discussion_filter_note.vue b/app/assets/javascripts/notes/components/discussion_filter_note.vue
index ff70c89cd39..83326279423 100644
--- a/app/assets/javascripts/notes/components/discussion_filter_note.vue
+++ b/app/assets/javascripts/notes/components/discussion_filter_note.vue
@@ -1,28 +1,19 @@
<script>
-/* eslint-disable vue/no-v-html */
-import { GlButton, GlIcon } from '@gitlab/ui';
-import { __, sprintf } from '~/locale';
+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,
- },
- computed: {
- timelineContent() {
- return sprintf(
- __(
- "You're only seeing %{startTag}other activity%{endTag} in the feed. To add a comment, switch to one of the following options.",
- ),
- {
- startTag: `<b>`,
- endTag: `</b>`,
- },
- false,
- );
- },
+ GlSprintf,
},
methods: {
selectFilter(value) {
@@ -41,12 +32,18 @@ export default {
<gl-icon name="comment" />
</div>
<div class="timeline-content">
- <div ref="timelineContent" v-html="timelineContent"></div>
+ <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 mt-2">
- <gl-button ref="showAllActivity" variant="default" @click="selectFilter(0)">
+ <gl-button variant="default" @click="selectFilter(0)">
{{ __('Show all activity') }}
</gl-button>
- <gl-button ref="showComments" variant="default" @click="selectFilter(1)">
+ <gl-button variant="default" @click="selectFilter(1)">
{{ __('Show comments only') }}
</gl-button>
</div>