summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/diff_file.vue
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-12-06 14:39:29 +0000
committerPhil Hughes <me@iamphill.com>2018-12-06 14:39:29 +0000
commit2ed65be1c339346d316dfb2403fc06b82713cf21 (patch)
tree3fa233719f254ed16438799f040b40067ec49185 /app/assets/javascripts/diffs/components/diff_file.vue
parent71da313cd43bcbbbc8ec483944f887bacc518d81 (diff)
downloadgitlab-ce-2ed65be1c339346d316dfb2403fc06b82713cf21.tar.gz
Fixed renamed and mode changed diff viewers
Renders mode changed and renamed file merge request diff viewers on the frontend. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52607
Diffstat (limited to 'app/assets/javascripts/diffs/components/diff_file.vue')
-rw-r--r--app/assets/javascripts/diffs/components/diff_file.vue13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_file.vue b/app/assets/javascripts/diffs/components/diff_file.vue
index f7e3655ea40..3b2a0d156ca 100644
--- a/app/assets/javascripts/diffs/components/diff_file.vue
+++ b/app/assets/javascripts/diffs/components/diff_file.vue
@@ -52,7 +52,9 @@ export default {
(!this.file.highlighted_diff_lines &&
!this.isLoadingCollapsedDiff &&
!this.file.too_large &&
- this.file.text)
+ this.file.text &&
+ !this.file.renamed_file &&
+ !this.file.mode_changed)
);
},
showLoadingIcon() {
@@ -143,9 +145,8 @@ export default {
<a
:href="file.fork_path"
class="js-fork-suggestion-button btn btn-grouped btn-inverted btn-success"
+ >Fork</a
>
- Fork
- </a>
<button
class="js-cancel-fork-suggestion-button btn btn-grouped"
type="button"
@@ -163,9 +164,9 @@ export default {
<gl-loading-icon v-if="showLoadingIcon" class="diff-content loading" />
<div v-else-if="showExpandMessage" class="nothing-here-block diff-collapsed">
{{ __('This diff is collapsed.') }}
- <a class="click-to-expand js-click-to-expand" href="#" @click.prevent="handleToggle">
- {{ __('Click to expand it.') }}
- </a>
+ <a class="click-to-expand js-click-to-expand" href="#" @click.prevent="handleToggle">{{
+ __('Click to expand it.')
+ }}</a>
</div>
<div v-if="file.too_large" class="nothing-here-block diff-collapsed js-too-large-diff">
{{ __('This source diff could not be displayed because it is too large.') }}