Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/diffs/components/diff_table_cell.vue')
-rw-r--r--app/assets/javascripts/diffs/components/diff_table_cell.vue16
1 files changed, 11 insertions, 5 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_table_cell.vue b/app/assets/javascripts/diffs/components/diff_table_cell.vue
index 68fe6787f9b..fdefd63ced2 100644
--- a/app/assets/javascripts/diffs/components/diff_table_cell.vue
+++ b/app/assets/javascripts/diffs/components/diff_table_cell.vue
@@ -10,6 +10,7 @@ import {
NEW_NO_NEW_LINE_TYPE,
LINE_HOVER_CLASS_NAME,
LINE_UNFOLD_CLASS_NAME,
+ INLINE_DIFF_VIEW_TYPE,
} from '../constants';
export default {
@@ -25,6 +26,11 @@ export default {
type: Object,
required: true,
},
+ diffViewType: {
+ type: String,
+ required: false,
+ default: INLINE_DIFF_VIEW_TYPE,
+ },
showCommentButton: {
type: Boolean,
required: false,
@@ -57,9 +63,9 @@ export default {
},
},
computed: {
- ...mapGetters(['isLoggedIn', 'isInlineView']),
+ ...mapGetters(['isLoggedIn']),
normalizedLine() {
- if (this.isInlineView) {
+ if (this.diffViewType === INLINE_DIFF_VIEW_TYPE) {
return this.line;
}
@@ -72,10 +78,10 @@ export default {
return this.normalizedLine.type === CONTEXT_LINE_TYPE;
},
isMetaLine() {
+ const { type } = this.normalizedLine;
+
return (
- this.normalizedLine.type === OLD_NO_NEW_LINE_TYPE ||
- this.normalizedLine.type === NEW_NO_NEW_LINE_TYPE ||
- this.normalizedLine.type === EMPTY_CELL_TYPE
+ type === OLD_NO_NEW_LINE_TYPE || type === NEW_NO_NEW_LINE_TYPE || type === EMPTY_CELL_TYPE
);
},
classNameMap() {