diff options
author | Samantha Ming <sming@gitlab.com> | 2019-08-10 02:36:32 +0000 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2019-08-10 02:36:32 +0000 |
commit | fc0ff7cf033e6267d7348057faee0fbedf5b90e8 (patch) | |
tree | 49dc31b7ff02ccd3cb37191fae100e7bbf661c54 /app/assets/javascripts/diffs/components/inline_diff_expansion_row.vue | |
parent | cdac9ed86fb2c3a373be5b923bc3f02387b528fc (diff) | |
download | gitlab-ce-fc0ff7cf033e6267d7348057faee0fbedf5b90e8.tar.gz |
Replace ... with new expansion options
- expand upwards
- expand downwards
- expand all
in both inline and parallel views
Diffstat (limited to 'app/assets/javascripts/diffs/components/inline_diff_expansion_row.vue')
-rw-r--r-- | app/assets/javascripts/diffs/components/inline_diff_expansion_row.vue | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/app/assets/javascripts/diffs/components/inline_diff_expansion_row.vue b/app/assets/javascripts/diffs/components/inline_diff_expansion_row.vue new file mode 100644 index 00000000000..6e732727f42 --- /dev/null +++ b/app/assets/javascripts/diffs/components/inline_diff_expansion_row.vue @@ -0,0 +1,53 @@ +<script> +import Icon from '~/vue_shared/components/icon.vue'; +import DiffExpansionCell from './diff_expansion_cell.vue'; +import { MATCH_LINE_TYPE } from '../constants'; + +export default { + components: { + Icon, + DiffExpansionCell, + }, + props: { + fileHash: { + type: String, + required: true, + }, + contextLinesPath: { + type: String, + required: true, + }, + line: { + type: Object, + required: true, + }, + isTop: { + type: Boolean, + required: false, + default: false, + }, + isBottom: { + type: Boolean, + required: false, + default: false, + }, + }, + computed: { + isMatchLine() { + return this.line.type === MATCH_LINE_TYPE; + }, + }, +}; +</script> + +<template> + <tr v-if="isMatchLine" class="line_expansion match"> + <diff-expansion-cell + :file-hash="fileHash" + :context-lines-path="contextLinesPath" + :line="line" + :is-top="isTop" + :is-bottom="isBottom" + /> + </tr> +</template> |