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>2023-09-25 18:10:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-25 18:10:16 +0300
commit02e4b2d0043b416314ffb76694aff200584352d5 (patch)
treea7d027891f3089960950d7ec75ba60d981623ab4 /app/assets/javascripts/issuable
parent7a3aca2b5b3bfdebbd7bb6353d5bdcdc422670da (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/issuable')
-rw-r--r--app/assets/javascripts/issuable/components/hidden_badge.vue36
-rw-r--r--app/assets/javascripts/issuable/components/locked_badge.vue36
2 files changed, 72 insertions, 0 deletions
diff --git a/app/assets/javascripts/issuable/components/hidden_badge.vue b/app/assets/javascripts/issuable/components/hidden_badge.vue
new file mode 100644
index 00000000000..a80dc2f62d4
--- /dev/null
+++ b/app/assets/javascripts/issuable/components/hidden_badge.vue
@@ -0,0 +1,36 @@
+<script>
+import { GlBadge, GlIcon, GlTooltipDirective } from '@gitlab/ui';
+import { issuableTypeText } from '~/issues/constants';
+import { __, sprintf } from '~/locale';
+
+export default {
+ components: {
+ GlBadge,
+ GlIcon,
+ },
+ directives: {
+ GlTooltip: GlTooltipDirective,
+ },
+ props: {
+ issuableType: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ },
+ computed: {
+ title() {
+ return sprintf(__('This %{issuable} is hidden because its author has been banned.'), {
+ issuable: issuableTypeText[this.issuableType],
+ });
+ },
+ },
+};
+</script>
+
+<template>
+ <gl-badge v-gl-tooltip :title="title" variant="warning">
+ <gl-icon name="spam" />
+ <span class="gl-sr-only">{{ __('Hidden') }}</span>
+ </gl-badge>
+</template>
diff --git a/app/assets/javascripts/issuable/components/locked_badge.vue b/app/assets/javascripts/issuable/components/locked_badge.vue
new file mode 100644
index 00000000000..f97ac888417
--- /dev/null
+++ b/app/assets/javascripts/issuable/components/locked_badge.vue
@@ -0,0 +1,36 @@
+<script>
+import { GlBadge, GlIcon, GlTooltipDirective } from '@gitlab/ui';
+import { issuableTypeText } from '~/issues/constants';
+import { __, sprintf } from '~/locale';
+
+export default {
+ components: {
+ GlBadge,
+ GlIcon,
+ },
+ directives: {
+ GlTooltip: GlTooltipDirective,
+ },
+ props: {
+ issuableType: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ },
+ computed: {
+ title() {
+ return sprintf(__('This %{issuable} is locked. Only project members can comment.'), {
+ issuable: issuableTypeText[this.issuableType],
+ });
+ },
+ },
+};
+</script>
+
+<template>
+ <gl-badge v-gl-tooltip :title="title" variant="warning">
+ <gl-icon name="lock" />
+ <span class="gl-sr-only">{{ __('Locked') }}</span>
+ </gl-badge>
+</template>