diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index f1af25946ec..92f91a90aaa 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -94055b253d05bc04f533c977be892b0cd6f225ea +803b179a6834fbebcc7886083731bb0f4a67c796 diff --git a/app/assets/javascripts/behaviors/markdown/render_math.js b/app/assets/javascripts/behaviors/markdown/render_math.js index 12f47255bdf..e29c6e9b0ba 100644 --- a/app/assets/javascripts/behaviors/markdown/render_math.js +++ b/app/assets/javascripts/behaviors/markdown/render_math.js @@ -1,6 +1,7 @@ import { spriteIcon } from '~/lib/utils/common_utils'; import { differenceInMilliseconds } from '~/lib/utils/datetime_utility'; import { s__ } from '~/locale'; +import { unrestrictedPages } from './constants'; // Renders math using KaTeX in any element with the // `js-render-math` class @@ -48,6 +49,7 @@ class SafeMathRenderer { this.renderElement = this.renderElement.bind(this); this.render = this.render.bind(this); this.attachEvents = this.attachEvents.bind(this); + this.pageName = document.querySelector('body').dataset.page; } renderElement(chosenEl) { @@ -56,7 +58,7 @@ class SafeMathRenderer { } const el = chosenEl || this.queue.shift(); - const forceRender = Boolean(chosenEl); + const forceRender = Boolean(chosenEl) || unrestrictedPages.includes(this.pageName); const text = el.textContent; el.removeAttribute('style'); diff --git a/app/assets/javascripts/notes/components/note_body.vue b/app/assets/javascripts/notes/components/note_body.vue index 6c9bc4461c2..9d0dc98f4e6 100644 --- a/app/assets/javascripts/notes/components/note_body.vue +++ b/app/assets/javascripts/notes/components/note_body.vue @@ -8,6 +8,7 @@ import { __ } from '~/locale'; import '~/behaviors/markdown/render_gfm'; import Suggestions from '~/vue_shared/components/markdown/suggestions.vue'; import autosave from '../mixins/autosave'; +import { CONFIDENTIAL_CLASSES } from '../constants'; import noteAttachment from './note_attachment.vue'; import noteAwardsList from './note_awards_list.vue'; import noteEditedText from './note_edited_text.vue'; @@ -54,6 +55,11 @@ export default { required: false, default: '', }, + isConfidential: { + type: Boolean, + required: false, + default: false, + }, }, computed: { ...mapGetters(['getDiscussion', 'suggestionsCount', 'getSuggestionsFilePaths']), @@ -95,6 +101,12 @@ export default { return escape(suggestion); }, + confidentialContainerClasses() { + if (this.isConfidential && !this.isEditing) { + return CONFIDENTIAL_CLASSES; + } + return ''; + }, }, mounted() { this.renderGFM(); @@ -160,53 +172,61 @@ export default {