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 {
},
methods: {
<<<<<<< HEAD
isMarkdown() {
return this.activeFile.extension === 'md';
=======
supportedNonBinaryFileType() {
switch (this.activeFile.extension) {
case 'md':
this.binaryTypes.markdown = true;
return true;
default:
return false;
}
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
},
},
watch: {
blobRaw() {
<<<<<<< HEAD
if(this.isMarkdown()) {
=======
const supported = this.supportedNonBinaryFileType();
if (supported) {
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
this.binaryTypes.markdown = true;
this.activeFile.raw = false;
// counts as binaryish so we use the binary viewer in this case.
......
<<<<<<< HEAD
import Tabs from './repo_tabs'
import Sidebar from './repo_sidebar'
import Editor from './repo_editor'
......@@ -9,16 +8,6 @@ import CommitSection from './repo_commit_section'
import Service from './repo_service'
import Store from './repo_store'
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 {
constructor() {
......
......@@ -10,15 +10,8 @@ export default class RepoEditor {
}
addMonacoEvents() {
<<<<<<< HEAD
this.monacoEditor.onMouseUp(this.onMonacoEditorMouseUp.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) {
......@@ -70,11 +63,7 @@ export default class RepoEditor {
methods: {
showHide() {
<<<<<<< HEAD
if(!this.openedFiles.length || (this.binary && !this.activeFile.raw)) {
=======
if ((!this.openedFiles.length) || this.binary) {
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
self.el.style.display = 'none';
} else {
self.el.style.display = 'inline-block';
......@@ -125,14 +114,10 @@ export default class RepoEditor {
blobRaw() {
this.showHide();
<<<<<<< HEAD
if(!this.isTree) {
// kill the current model;
self.monacoEditor.setModel(null);
// then create the new one
=======
if (!this.isTree) {
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
self.monacoEditor.setModel(
monaco.editor.createModel(
this.blobRaw,
......
<<<<<<< HEAD
import Vue from 'vue'
import Store from './repo_store'
import Helper from './repo_helper'
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 {
constructor(url) {
......@@ -37,14 +31,9 @@ export default class RepoSidebar {
</div>
`,
computed: {
<<<<<<< HEAD
editableBorder() {
return this.editMode ? '1px solid #1F78D1' :'1px solid #f0f0f0';
=======
previewLabel() {
return this.activeFile.raw ? 'Preview' : 'Raw';
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
},
canPreview() {
......@@ -65,15 +54,9 @@ export default class RepoSidebar {
},
methods: {
<<<<<<< HEAD
rawPreviewToggle() {
Helper.setCurrentFileRawOrPreview();
}
=======
setRawPreviewMode() {
},
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
},
});
}
......
......@@ -69,7 +69,6 @@ const RepoHelper = {
},
setActiveFile(file) {
<<<<<<< HEAD
// don't load the file that is already loaded
if(file.url === Store.activeFile.url) return;
......@@ -78,17 +77,9 @@ const RepoHelper = {
if(openedFile.active) {
Store.activeFile = openedFile;
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;
});
<<<<<<< HEAD
// reset the active file raw
Store.activeFile.raw = false;
......@@ -96,9 +87,6 @@ const RepoHelper = {
Store.activeFileLabel = 'Raw';
if(file.binary) {
=======
if (file.binary) {
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
Store.blobRaw = file.base64;
} else {
Store.blobRaw = file.plain;
......@@ -115,17 +103,11 @@ const RepoHelper = {
},
addToOpenedFiles(file) {
<<<<<<< HEAD
const openedFilesAlreadyExists = Store.openedFiles.some((openedFile) => {
return openedFile.url === file.url
});
if(!openedFilesAlreadyExists) {
file.changed = false;
=======
const openedFilesAlreadyExists = Store.openedFiles
.some(openedFile => openedFile.url === file.url);
if (!openedFilesAlreadyExists) {
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
Store.openedFiles.push(file);
}
},
......@@ -198,14 +180,9 @@ const RepoHelper = {
},
// may be tree or file.
<<<<<<< HEAD
getContent(file) {
// don't load the same active file. That's silly.
// if(file && file.url === this.activeFile.url) return;
=======
getContent(treeOrFile) {
let file = treeOrFile;
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
const loadingData = this.setLoading(true);
Service.getContent()
.then((response) => {
......@@ -225,23 +202,8 @@ const RepoHelper = {
data,
);
data.binary = true;
<<<<<<< HEAD
} else {
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;
}
if(!file.url) {
......
......@@ -47,14 +47,11 @@ export default class RepoSidebar {
if (typeof file === 'object') {
if (file.type === 'tree' && file.opened) {
Helper.removeChildFilesOfTree(file);
<<<<<<< HEAD
return;
} else {
url = file.url;
Service.url = url;
Helper.getContent(file);
=======
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
}
url = file.url;
Service.url = url;
......
......@@ -22,12 +22,9 @@ const RepoStore = {
plain: '',
size: 0,
url: '',
<<<<<<< HEAD
raw: false,
newContent: '',
changed: false
=======
>>>>>>> 51a936fb3d2cdbd133a3b0eed463b47c1c92fe7d
},
activeFileIndex: 0,
activeLine: 0,
......
......@@ -151,21 +151,12 @@ describe Gitlab::Conflict::File, lib: true do
default_regexp
end
<<<<<<< files/ruby/regex.rb
def project_name_regexp
/\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/
end
def name_regexp
/\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
# Some extra lines
......@@ -176,13 +167,8 @@ def path_regexp
default_regexp
end
<<<<<<< files/ruby/regex.rb
def archive_formats_regexp
/(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
def git_reference_regexp
......@@ -209,13 +195,8 @@ end
protected
<<<<<<< files/ruby/regex.rb
def default_regexp
/\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
FILE
end
......
......@@ -19,34 +19,20 @@ module Gitlab
default_regexp
end
<<<<<<< files/ruby/regex.rb
def project_name_regexp
/\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/
end
def name_regexp
/\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
def path_regexp
default_regexp
end
<<<<<<< files/ruby/regex.rb
def archive_formats_regexp
/(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
def git_reference_regexp
......@@ -73,13 +59,8 @@ module Gitlab
protected
<<<<<<< files/ruby/regex.rb
def default_regexp
/\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
......
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