Commit 9fe346af authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Resolve conflicts from eslint changes

parent 3a2f883f
...@@ -20,30 +20,14 @@ export default class RepoBinaryViewer { ...@@ -20,30 +20,14 @@ export default class RepoBinaryViewer {
}, },
methods: { methods: {
<<<<<<< HEAD
isMarkdown() { isMarkdown() {
return this.activeFile.extension === 'md'; return this.activeFile.extension === 'md';
=======
supportedNonBinaryFileType() {
switch (this.activeFile.extension) {
case 'md':
this.binaryTypes.markdown = true;
return true;
default:
return false;
}
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
}, },
}, },
watch: { watch: {
blobRaw() { blobRaw() {
<<<<<<< HEAD
if(this.isMarkdown()) { if(this.isMarkdown()) {
=======
const supported = this.supportedNonBinaryFileType();
if (supported) {
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
this.binaryTypes.markdown = true; this.binaryTypes.markdown = true;
this.activeFile.raw = false; this.activeFile.raw = false;
// counts as binaryish so we use the binary viewer in this case. // counts as binaryish so we use the binary viewer in this case.
......
<<<<<<< HEAD
import Tabs from './repo_tabs' import Tabs from './repo_tabs'
import Sidebar from './repo_sidebar' import Sidebar from './repo_sidebar'
import Editor from './repo_editor' import Editor from './repo_editor'
...@@ -9,16 +8,6 @@ import CommitSection from './repo_commit_section' ...@@ -9,16 +8,6 @@ import CommitSection from './repo_commit_section'
import Service from './repo_service' import Service from './repo_service'
import Store from './repo_store' import Store from './repo_store'
import Helper from './repo_helper' import Helper from './repo_helper'
=======
import Tabs from './repo_tabs';
import Sidebar from './repo_sidebar';
import Editor from './repo_editor';
import FileButtons from './repo_file_buttons';
import BinaryViewer from './repo_binary_viewer';
import Service from './repo_service';
import Store from './repo_store';
import Helper from './repo_helper';
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
export default class RepoBundle { export default class RepoBundle {
constructor() { constructor() {
......
...@@ -10,15 +10,8 @@ export default class RepoEditor { ...@@ -10,15 +10,8 @@ export default class RepoEditor {
} }
addMonacoEvents() { addMonacoEvents() {
<<<<<<< HEAD
this.monacoEditor.onMouseUp(this.onMonacoEditorMouseUp.bind(this)); this.monacoEditor.onMouseUp(this.onMonacoEditorMouseUp.bind(this));
this.monacoEditor.onKeyUp(this.onMonacoEditorKeysPressed.bind(this)); this.monacoEditor.onKeyUp(this.onMonacoEditorKeysPressed.bind(this));
=======
this.vue.$watch('activeFile.lineNumber', () => {
console.log('cahnged');
});
this.monacoEditor.onMouseUp(RepoEditor.onMonacoEditorMouseUp);
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
} }
static onMonacoEditorMouseUp(e) { static onMonacoEditorMouseUp(e) {
...@@ -70,11 +63,7 @@ export default class RepoEditor { ...@@ -70,11 +63,7 @@ export default class RepoEditor {
methods: { methods: {
showHide() { showHide() {
<<<<<<< HEAD
if(!this.openedFiles.length || (this.binary && !this.activeFile.raw)) { if(!this.openedFiles.length || (this.binary && !this.activeFile.raw)) {
=======
if ((!this.openedFiles.length) || this.binary) {
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
self.el.style.display = 'none'; self.el.style.display = 'none';
} else { } else {
self.el.style.display = 'inline-block'; self.el.style.display = 'inline-block';
...@@ -125,14 +114,10 @@ export default class RepoEditor { ...@@ -125,14 +114,10 @@ export default class RepoEditor {
blobRaw() { blobRaw() {
this.showHide(); this.showHide();
<<<<<<< HEAD
if(!this.isTree) { if(!this.isTree) {
// kill the current model; // kill the current model;
self.monacoEditor.setModel(null); self.monacoEditor.setModel(null);
// then create the new one // then create the new one
=======
if (!this.isTree) {
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
self.monacoEditor.setModel( self.monacoEditor.setModel(
monaco.editor.createModel( monaco.editor.createModel(
this.blobRaw, this.blobRaw,
......
<<<<<<< HEAD
import Vue from 'vue' import Vue from 'vue'
import Store from './repo_store' import Store from './repo_store'
import Helper from './repo_helper' import Helper from './repo_helper'
import RepoMiniMixin from './repo_mini_mixin' import RepoMiniMixin from './repo_mini_mixin'
=======
import Vue from 'vue';
import Store from './repo_store';
import Helper from './repo_helper';
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
export default class RepoSidebar { export default class RepoSidebar {
constructor(url) { constructor(url) {
...@@ -37,14 +31,9 @@ export default class RepoSidebar { ...@@ -37,14 +31,9 @@ export default class RepoSidebar {
</div> </div>
`, `,
computed: { computed: {
<<<<<<< HEAD
editableBorder() { editableBorder() {
return this.editMode ? '1px solid #1F78D1' :'1px solid #f0f0f0'; return this.editMode ? '1px solid #1F78D1' :'1px solid #f0f0f0';
=======
previewLabel() {
return this.activeFile.raw ? 'Preview' : 'Raw';
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
}, },
canPreview() { canPreview() {
...@@ -65,15 +54,9 @@ export default class RepoSidebar { ...@@ -65,15 +54,9 @@ export default class RepoSidebar {
}, },
methods: { methods: {
<<<<<<< HEAD
rawPreviewToggle() { rawPreviewToggle() {
Helper.setCurrentFileRawOrPreview(); Helper.setCurrentFileRawOrPreview();
} }
=======
setRawPreviewMode() {
},
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
}, },
}); });
} }
......
...@@ -69,7 +69,6 @@ const RepoHelper = { ...@@ -69,7 +69,6 @@ const RepoHelper = {
}, },
setActiveFile(file) { setActiveFile(file) {
<<<<<<< HEAD
// don't load the file that is already loaded // don't load the file that is already loaded
if(file.url === Store.activeFile.url) return; if(file.url === Store.activeFile.url) return;
...@@ -78,17 +77,9 @@ const RepoHelper = { ...@@ -78,17 +77,9 @@ const RepoHelper = {
if(openedFile.active) { if(openedFile.active) {
Store.activeFile = openedFile; Store.activeFile = openedFile;
Store.activeFileIndex = i; Store.activeFileIndex = i;
=======
Store.openedFiles = Store.openedFiles.map((openedFile) => {
const activeFile = openedFile;
activeFile.active = file.url === activeFile.url; // eslint-disable-line no-param-reassign
if (activeFile.active) {
Store.activeFile = activeFile;
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
} }
return activeFile; return activeFile;
}); });
<<<<<<< HEAD
// reset the active file raw // reset the active file raw
Store.activeFile.raw = false; Store.activeFile.raw = false;
...@@ -96,9 +87,6 @@ const RepoHelper = { ...@@ -96,9 +87,6 @@ const RepoHelper = {
Store.activeFileLabel = 'Raw'; Store.activeFileLabel = 'Raw';
if(file.binary) { if(file.binary) {
=======
if (file.binary) {
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
Store.blobRaw = file.base64; Store.blobRaw = file.base64;
} else { } else {
Store.blobRaw = file.plain; Store.blobRaw = file.plain;
...@@ -115,17 +103,11 @@ const RepoHelper = { ...@@ -115,17 +103,11 @@ const RepoHelper = {
}, },
addToOpenedFiles(file) { addToOpenedFiles(file) {
<<<<<<< HEAD
const openedFilesAlreadyExists = Store.openedFiles.some((openedFile) => { const openedFilesAlreadyExists = Store.openedFiles.some((openedFile) => {
return openedFile.url === file.url return openedFile.url === file.url
}); });
if(!openedFilesAlreadyExists) { if(!openedFilesAlreadyExists) {
file.changed = false; file.changed = false;
=======
const openedFilesAlreadyExists = Store.openedFiles
.some(openedFile => openedFile.url === file.url);
if (!openedFilesAlreadyExists) {
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
Store.openedFiles.push(file); Store.openedFiles.push(file);
} }
}, },
...@@ -198,14 +180,9 @@ const RepoHelper = { ...@@ -198,14 +180,9 @@ const RepoHelper = {
}, },
// may be tree or file. // may be tree or file.
<<<<<<< HEAD
getContent(file) { getContent(file) {
// don't load the same active file. That's silly. // don't load the same active file. That's silly.
// if(file && file.url === this.activeFile.url) return; // if(file && file.url === this.activeFile.url) return;
=======
getContent(treeOrFile) {
let file = treeOrFile;
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
const loadingData = this.setLoading(true); const loadingData = this.setLoading(true);
Service.getContent() Service.getContent()
.then((response) => { .then((response) => {
...@@ -225,23 +202,8 @@ const RepoHelper = { ...@@ -225,23 +202,8 @@ const RepoHelper = {
data, data,
); );
data.binary = true; data.binary = true;
<<<<<<< HEAD
} else { } else {
Store.blobRaw = data.plain; Store.blobRaw = data.plain;
=======
if (!file.url) {
file.url = location.pathname;
}
data.url = file.url;
this.addToOpenedFiles(data);
this.setActiveFile(data);
} else {
Store.blobRaw = data.plain;
if (!file.url) {
file.url = location.pathname;
}
data.url = file.url;
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
data.binary = false; data.binary = false;
} }
if(!file.url) { if(!file.url) {
......
...@@ -47,14 +47,11 @@ export default class RepoSidebar { ...@@ -47,14 +47,11 @@ export default class RepoSidebar {
if (typeof file === 'object') { if (typeof file === 'object') {
if (file.type === 'tree' && file.opened) { if (file.type === 'tree' && file.opened) {
Helper.removeChildFilesOfTree(file); Helper.removeChildFilesOfTree(file);
<<<<<<< HEAD
return; return;
} else { } else {
url = file.url; url = file.url;
Service.url = url; Service.url = url;
Helper.getContent(file); Helper.getContent(file);
=======
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
} }
url = file.url; url = file.url;
Service.url = url; Service.url = url;
......
...@@ -22,12 +22,9 @@ const RepoStore = { ...@@ -22,12 +22,9 @@ const RepoStore = {
plain: '', plain: '',
size: 0, size: 0,
url: '', url: '',
<<<<<<< HEAD
raw: false, raw: false,
newContent: '', newContent: '',
changed: false changed: false
=======
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
}, },
activeFileIndex: 0, activeFileIndex: 0,
activeLine: 0, activeLine: 0,
......
...@@ -151,21 +151,12 @@ describe Gitlab::Conflict::File, lib: true do ...@@ -151,21 +151,12 @@ describe Gitlab::Conflict::File, lib: true do
default_regexp default_regexp
end end
<<<<<<< files/ruby/regex.rb
def project_name_regexp def project_name_regexp
/\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/ /\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/
end end
def name_regexp def name_regexp
/\A[a-zA-Z0-9_\-\. ]*\z/ /\A[a-zA-Z0-9_\-\. ]*\z/
=======
def project_name_regex
%r{\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z}
end
def name_regex
%r{\A[a-zA-Z0-9_\-\. ]*\z}
>>>>>>> files/ruby/regex.rb
end end
# Some extra lines # Some extra lines
...@@ -176,13 +167,8 @@ def path_regexp ...@@ -176,13 +167,8 @@ def path_regexp
default_regexp default_regexp
end end
<<<<<<< files/ruby/regex.rb
def archive_formats_regexp def archive_formats_regexp
/(zip|tar|7z|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/ /(zip|tar|7z|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/
=======
def archive_formats_regex
%r{(zip|tar|7z|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)}
>>>>>>> files/ruby/regex.rb
end end
def git_reference_regexp def git_reference_regexp
...@@ -209,13 +195,8 @@ end ...@@ -209,13 +195,8 @@ end
protected protected
<<<<<<< files/ruby/regex.rb
def default_regexp def default_regexp
/\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/ /\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/
=======
def default_regex
%r{\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z}
>>>>>>> files/ruby/regex.rb
end end
FILE FILE
end end
......
...@@ -19,34 +19,20 @@ module Gitlab ...@@ -19,34 +19,20 @@ module Gitlab
default_regexp default_regexp
end end
<<<<<<< files/ruby/regex.rb
def project_name_regexp def project_name_regexp
/\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/ /\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/
end end
def name_regexp def name_regexp
/\A[a-zA-Z0-9_\-\. ]*\z/ /\A[a-zA-Z0-9_\-\. ]*\z/
=======
def project_name_regex
%r{\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z}
end
def name_regex
%r{\A[a-zA-Z0-9_\-\. ]*\z}
>>>>>>> files/ruby/regex.rb
end end
def path_regexp def path_regexp
default_regexp default_regexp
end end
<<<<<<< files/ruby/regex.rb
def archive_formats_regexp def archive_formats_regexp
/(zip|tar|7z|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/ /(zip|tar|7z|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/
=======
def archive_formats_regex
%r{(zip|tar|7z|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)}
>>>>>>> files/ruby/regex.rb
end end
def git_reference_regexp def git_reference_regexp
...@@ -73,13 +59,8 @@ module Gitlab ...@@ -73,13 +59,8 @@ module Gitlab
protected protected
<<<<<<< files/ruby/regex.rb
def default_regexp def default_regexp
/\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/ /\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/
=======
def default_regex
%r{\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z}
>>>>>>> files/ruby/regex.rb
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment