summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/commit_item.vue
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 09:09:22 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 09:09:22 +0000
commita7608a4940a91e14754d56a7acbe496321fed99c (patch)
treefb661eddbd2d190695050788b7f89168a6f541e3 /app/assets/javascripts/diffs/components/commit_item.vue
parent7734690def0c885f9f79567185c3dc5df353f9a0 (diff)
downloadgitlab-ce-a7608a4940a91e14754d56a7acbe496321fed99c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs/components/commit_item.vue')
-rw-r--r--app/assets/javascripts/diffs/components/commit_item.vue12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/assets/javascripts/diffs/components/commit_item.vue b/app/assets/javascripts/diffs/components/commit_item.vue
index 99bc1b5c040..f579b2ae2ba 100644
--- a/app/assets/javascripts/diffs/components/commit_item.vue
+++ b/app/assets/javascripts/diffs/components/commit_item.vue
@@ -56,6 +56,11 @@ export default {
type: Object,
required: true,
},
+ collapsible: {
+ type: Boolean,
+ required: false,
+ default: true,
+ },
},
computed: {
author() {
@@ -104,7 +109,7 @@ export default {
</script>
<template>
- <li class="commit flex-row js-toggle-container">
+ <li :class="{ 'js-toggle-container': collapsible }" class="commit flex-row">
<user-avatar-link
:link-href="authorUrl"
:img-src="authorAvatar"
@@ -123,7 +128,7 @@ export default {
<span class="commit-row-message d-block d-sm-none">&middot; {{ commit.short_id }}</span>
<button
- v-if="commit.description_html"
+ v-if="commit.description_html && collapsible"
class="text-expander js-toggle-button"
type="button"
:aria-label="__('Toggle commit description')"
@@ -144,7 +149,8 @@ export default {
<pre
v-if="commit.description_html"
- class="commit-row-description js-toggle-content gl-mb-3"
+ :class="{ 'js-toggle-content': collapsible, 'd-block': !collapsible }"
+ class="commit-row-description gl-mb-3 text-dark"
v-html="commit.description_html"
></pre>
</div>