gitlab-org--gitlab-foss/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue

56 lines
1.2 KiB
Vue
Raw Normal View History

2017-09-14 11:01:07 +00:00
<script>
export default {
props: {
isLocked: {
type: Boolean,
default: false,
2017-10-01 15:45:48 +00:00
required: false,
2017-09-14 11:01:07 +00:00
},
isConfidential: {
type: Boolean,
default: false,
2017-10-01 15:45:48 +00:00
required: false,
2017-09-14 11:01:07 +00:00
},
},
computed: {
iconClass() {
return {
'fa-eye-slash': this.isConfidential,
'fa-lock': this.isLocked,
};
},
isLockedAndConfidential() {
return this.isConfidential && this.isLocked;
},
},
};
</script>
<template>
<div class="issuable-note-warning">
<i
aria-hidden="true"
2017-10-06 11:32:39 +00:00
class="fa icon"
2017-09-14 11:01:07 +00:00
:class="iconClass"
v-if="!isLockedAndConfidential"
></i>
<span v-if="isLockedAndConfidential">
{{ __('This issue is confidential and locked.') }}
2017-10-06 06:56:28 +00:00
{{ __('People without permission will never get a notification and won\'t be able to comment.') }}
2017-09-14 11:01:07 +00:00
</span>
<span v-else-if="isConfidential">
{{ __('This is a confidential issue.') }}
{{ __('Your comment will not be visible to the public.') }}
</span>
<span v-else-if="isLocked">
{{ __('This issue is locked.') }}
{{ __('Only project members can comment.') }}
</span>
</div>
</template>