summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/app.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/diffs/components/app.vue')
-rw-r--r--app/assets/javascripts/diffs/components/app.vue55
1 files changed, 11 insertions, 44 deletions
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue
index 0b7838292b2..22da38ce7a5 100644
--- a/app/assets/javascripts/diffs/components/app.vue
+++ b/app/assets/javascripts/diffs/components/app.vue
@@ -55,8 +55,6 @@ export default {
diffViewType: state => state.diffs.diffViewType,
mergeRequestDiffs: state => state.diffs.mergeRequestDiffs,
mergeRequestDiff: state => state.diffs.mergeRequestDiff,
- latestVersionPath: state => state.diffs.latestVersionPath,
- startVersion: state => state.diffs.startVersion,
commit: state => state.diffs.commit,
targetBranchName: state => state.diffs.targetBranchName,
renderOverflowWarning: state => state.diffs.renderOverflowWarning,
@@ -75,24 +73,6 @@ export default {
path: '',
};
},
- notAllCommentsDisplayed() {
- if (this.commit) {
- return __('Only comments from the following commit are shown below');
- } else if (this.startVersion) {
- return __(
- "Not all comments are displayed because you're comparing two versions of the diff.",
- );
- }
- return __(
- "Not all comments are displayed because you're viewing an old version of the diff.",
- );
- },
- showLatestVersion() {
- if (this.commit) {
- return __('Show latest version of the diff');
- }
- return __('Show latest version');
- },
canCurrentUserFork() {
return this.currentUser.can_fork === true && this.currentUser.can_create_merge_request;
},
@@ -184,10 +164,8 @@ export default {
<div v-if="isLoading" class="loading"><gl-loading-icon /></div>
<div v-else id="diffs" :class="{ active: shouldShow }" class="diffs tab-pane">
<compare-versions
- v-if="showCompareVersions"
:merge-request-diffs="mergeRequestDiffs"
:merge-request-diff="mergeRequestDiff"
- :start-version="startVersion"
:target-branch="targetBranch"
/>
@@ -200,33 +178,22 @@ export default {
/>
<div
- v-if="commit || startVersion || (mergeRequestDiff && !mergeRequestDiff.latest)"
- class="mr-version-controls"
- >
- <div class="content-block comments-disabled-notif clearfix">
- <i class="fa fa-info-circle"></i> {{ notAllCommentsDisplayed }}
- <div class="pull-right">
- <a :href="latestVersionPath" class="btn btn-sm"> {{ showLatestVersion }} </a>
- </div>
- </div>
- </div>
-
- <commit-widget v-if="commit" :commit="commit" />
-
- <div
:data-can-create-note="getNoteableData.current_user.can_create_note"
class="files d-flex prepend-top-default"
>
<div v-show="showTreeList" class="diff-tree-list"><tree-list /></div>
- <div v-if="diffFiles.length > 0" class="diff-files-holder">
- <diff-file
- v-for="file in diffFiles"
- :key="file.newPath"
- :file="file"
- :can-current-user-fork="canCurrentUserFork"
- />
+ <div class="diff-files-holder">
+ <commit-widget v-if="commit" :commit="commit" />
+ <template v-if="diffFiles.length > 0">
+ <diff-file
+ v-for="file in diffFiles"
+ :key="file.newPath"
+ :file="file"
+ :can-current-user-fork="canCurrentUserFork"
+ />
+ </template>
+ <no-changes v-else />
</div>
- <no-changes v-else />
</div>
</div>
</div>