diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-10-02 12:34:40 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-10-02 12:34:40 +0300 |
commit | 59a6f15cd22621826116446d5f28753c973ba2d1 (patch) | |
tree | 2ec67836eba18017c8e938119edd76a6f70d8f45 /app/assets/javascripts/notes | |
parent | 00ee7a9f27d3d00936127957eb3c99f803d3e880 (diff) |
Further review changes
Diffstat (limited to 'app/assets/javascripts/notes')
3 files changed, 10 insertions, 11 deletions
diff --git a/app/assets/javascripts/notes/components/issue_comment_form.vue b/app/assets/javascripts/notes/components/issue_comment_form.vue index 715027c6fbc..2c05817ac88 100644 --- a/app/assets/javascripts/notes/components/issue_comment_form.vue +++ b/app/assets/javascripts/notes/components/issue_comment_form.vue @@ -266,9 +266,9 @@ <div class="error-alert"></div> <issue-warning - v-if="hasIssueWarning(getIssueData)" - :is-locked="isIssueLocked(getIssueData)" - :is-confidential="isIssueConfidential(getIssueData)" + v-if="hasWarning(getIssueData)" + :is-locked="isLocked(getIssueData)" + :is-confidential="isConfidential(getIssueData)" /> <markdown-field @@ -276,7 +276,6 @@ :markdown-docs-path="markdownDocsPath" :quick-actions-docs-path="quickActionsDocsPath" :add-spacing-classes="false" - :is-confidential-issue="isIssueConfidential(getIssueData)" ref="markdownField"> <textarea id="note-body" diff --git a/app/assets/javascripts/notes/components/issue_note_form.vue b/app/assets/javascripts/notes/components/issue_note_form.vue index f78289e68aa..e2539d6b89d 100644 --- a/app/assets/javascripts/notes/components/issue_note_form.vue +++ b/app/assets/javascripts/notes/components/issue_note_form.vue @@ -129,9 +129,9 @@ class="edit-note common-note-form js-quick-submit gfm-form"> <issue-warning - v-if="hasIssueWarning(getIssueData)" - :is-locked="isIssueLocked(getIssueData)" - :is-confidential="isIssueConfidential(getIssueData)" + v-if="hasWarning(getIssueData)" + :is-locked="isLocked(getIssueData)" + :is-confidential="isConfidential(getIssueData)" /> <markdown-field diff --git a/app/assets/javascripts/notes/mixins/issuable_state.js b/app/assets/javascripts/notes/mixins/issuable_state.js index a0b3d81d63b..97f3ea0d5de 100644 --- a/app/assets/javascripts/notes/mixins/issuable_state.js +++ b/app/assets/javascripts/notes/mixins/issuable_state.js @@ -1,15 +1,15 @@ export default { methods: { - isIssueConfidential(issue) { + isConfidential(issue) { return !!issue.confidential; }, - isIssueLocked(issue) { + isLocked(issue) { return !!issue.discussion_locked; }, - hasIssueWarning(issue) { - return this.isIssueConfidential(issue) || this.isIssueLocked(issue); + hasWarning(issue) { + return this.isConfidential(issue) || this.isLocked(issue); }, }, }; |