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-07-01 21:08:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-01 21:08:50 +0300
commit2ea5aa8bd11544524b4f5da1e4c750f67bf5fc7d (patch)
tree7771ce1234dc66bb59eb5128561d485f91330056 /app/assets/javascripts/issue_show
parentae1efa2e1d32dee59d8f509ba17b623b5ffe4ba6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/issue_show')
-rw-r--r--app/assets/javascripts/issue_show/components/issuable_header_warnings.vue28
-rw-r--r--app/assets/javascripts/issue_show/index.js12
2 files changed, 40 insertions, 0 deletions
diff --git a/app/assets/javascripts/issue_show/components/issuable_header_warnings.vue b/app/assets/javascripts/issue_show/components/issuable_header_warnings.vue
new file mode 100644
index 00000000000..b6816be9eb8
--- /dev/null
+++ b/app/assets/javascripts/issue_show/components/issuable_header_warnings.vue
@@ -0,0 +1,28 @@
+<script>
+import { mapState } from 'vuex';
+import Icon from '~/vue_shared/components/icon.vue';
+
+export default {
+ components: {
+ Icon,
+ },
+ computed: {
+ ...mapState({
+ confidential: ({ noteableData }) => noteableData.confidential,
+ dicussionLocked: ({ noteableData }) => noteableData.discussion_locked,
+ }),
+ },
+};
+</script>
+
+<template>
+ <div class="gl-display-inline-block">
+ <div v-if="confidential" class="issuable-warning-icon inline">
+ <icon class="icon" name="eye-slash" data-testid="confidential" />
+ </div>
+
+ <div v-if="dicussionLocked" class="issuable-warning-icon inline">
+ <icon class="icon" name="lock" data-testid="locked" />
+ </div>
+ </div>
+</template>
diff --git a/app/assets/javascripts/issue_show/index.js b/app/assets/javascripts/issue_show/index.js
index e170d338408..fe4ff133145 100644
--- a/app/assets/javascripts/issue_show/index.js
+++ b/app/assets/javascripts/issue_show/index.js
@@ -1,6 +1,8 @@
import Vue from 'vue';
import issuableApp from './components/app.vue';
+import IssuableHeaderWarnings from './components/issuable_header_warnings.vue';
import { parseIssuableData } from './utils/parse_data';
+import { store } from '~/notes/stores';
export default function initIssueableApp() {
return new Vue({
@@ -15,3 +17,13 @@ export default function initIssueableApp() {
},
});
}
+
+export function issuableHeaderWarnings() {
+ return new Vue({
+ el: document.getElementById('js-issuable-header-warnings'),
+ store,
+ render(createElement) {
+ return createElement(IssuableHeaderWarnings);
+ },
+ });
+}