diff --git a/app/assets/javascripts/diffs/components/diff_file_header.vue b/app/assets/javascripts/diffs/components/diff_file_header.vue index 69ec6ab8600..bfcc726a030 100644 --- a/app/assets/javascripts/diffs/components/diff_file_header.vue +++ b/app/assets/javascripts/diffs/components/diff_file_header.vue @@ -57,26 +57,12 @@ export default { required: true, }, }, - data() { - return { - blobForkSuggestion: null, - }; - }, computed: { ...mapGetters('diffs', ['diffHasExpandedDiscussions', 'diffHasDiscussions']), - hasExpandedDiscussions() { - return this.diffHasExpandedDiscussions(this.diffFile); - }, diffContentIDSelector() { return `#diff-content-${this.diffFile.file_hash}`; }, - icon() { - if (this.diffFile.submodule) { - return 'archive'; - } - return this.diffFile.blob.icon; - }, titleLink() { if (this.diffFile.submodule) { return this.diffFile.submodule_tree_url || this.diffFile.submodule_link; @@ -99,9 +85,6 @@ export default { return this.diffFile.file_path; }, - titleTag() { - return this.diffFile.file_hash ? 'a' : 'span'; - }, isUsingLfs() { return this.diffFile.stored_externally && this.diffFile.external_storage === 'lfs'; }, @@ -135,9 +118,6 @@ export default { isModeChanged() { return this.diffFile.viewer.name === diffViewerModes.mode_changed; }, - showExpandDiffToFullFileEnabled() { - return gon.features.expandDiffFullFile && !this.diffFile.is_fully_expanded; - }, expandDiffToFullFileTitle() { if (this.diffFile.isShowingFullFile) { return s__('MRDiff|Show changes only'); @@ -156,21 +136,12 @@ export default { 'toggleFileDiscussionWrappers', 'toggleFullDiff', ]), - handleToggleFile(e, checkTarget) { - if ( - !checkTarget || - e.target === this.$refs.header || - (e.target.classList && e.target.classList.contains('diff-toggle-caret')) - ) { - this.$emit('toggleFile'); - } + handleToggleFile() { + this.$emit('toggleFile'); }, showForkMessage() { this.$emit('showForkMessage'); }, - handleToggleDiscussions() { - this.toggleFileDiscussionWrappers(this.diffFile); - }, handleFileNameClick(e) { const isLinkToOtherPage = this.diffFile.submodule_tree_url || this.diffFile.submodule_link || this.discussionPath; @@ -178,7 +149,6 @@ export default { if (!isLinkToOtherPage) { e.preventDefault(); const selector = this.diffContentIDSelector; - scrollToElement(document.querySelector(selector)); window.location.hash = selector; } @@ -191,22 +161,23 @@ export default {