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 { GlBadge, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { confidentialityInfoText } from '../constants';
export default {
components: {
GlBadge,
GlIcon,
},
directives: {
GlTooltip: GlTooltipDirective,
},
props: {
workspaceType: {
type: String,
required: true,
},
issuableType: {
type: String,
required: true,
},
hideTextInSmallScreens: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
confidentialTooltip() {
return confidentialityInfoText(this.workspaceType, this.issuableType);
},
confidentialTextClass() {
return {
'gl-display-none gl-sm-display-block': this.hideTextInSmallScreens,
'gl-ml-2': true,
};
},
},
};
</script>
<template>
<gl-badge v-gl-tooltip :title="confidentialTooltip" variant="warning">
<gl-icon name="eye-slash" :size="16" />
<span data-testid="confidential-badge-text" :class="confidentialTextClass">{{
__('Confidential')
}}</span>
</gl-badge>
</template>
|