Commit 596e53e2 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Fix eslint offenses

parent e58d30a0
......@@ -65,7 +65,7 @@ const RepoEditor = {
},
editMode() {
console.log('edit mode changed')
console.log('edit mode changed');
const readOnly = !this.editMode;
Store.readOnly = readOnly;
......
......@@ -19,7 +19,7 @@ const RepoHelper = {
newContent: '',
changed: false,
loading: false,
}
};
},
key: '',
......@@ -135,7 +135,7 @@ const RepoHelper = {
getContent(treeOrFile, cb) {
let file = treeOrFile;
console.log('file',file)
console.log('file', file);
// const loadingData = RepoHelper.setLoading(true);
return Service.getContent()
.then((response) => {
......@@ -174,14 +174,14 @@ const RepoHelper = {
}
} else {
// it's a tree
if(!file) Store.isRoot = RepoHelper.isRoot(Service.url);
if (!file) Store.isRoot = RepoHelper.isRoot(Service.url);
file = RepoHelper.setDirectoryOpen(file);
const newDirectory = RepoHelper.dataToListOfFiles(data);
Store.addFilesToDirectory(file, Store.files, newDirectory);
Store.prevURL = Service.blobURLtoParentTree(Service.url);
}
})
.catch((e) => {
.catch(() => {
// RepoHelper.setLoading(false, loadingData);
RepoHelper.loadingError();
});
......
......@@ -28,7 +28,7 @@ const RepoStore = {
tabsOverflow: 41,
tempPrivateToken: '',
submitCommitsLoading: false,
binaryLoaded:false,
binaryLoaded: false,
activeFile: RepoHelper.getDefaultActiveFile(),
activeFileIndex: 0,
activeLine: 0,
......@@ -137,24 +137,24 @@ const RepoStore = {
if (file.type === 'tree') return;
let foundIndex;
RepoStore.openedFiles = RepoStore.openedFiles.filter((openedFile, i) => {
if(openedFile.url === file.url) foundIndex = i;
if (openedFile.url === file.url) foundIndex = i;
return openedFile.url !== file.url;
});
// now activate the right tab based on what you closed.
if(RepoStore.openedFiles.length === 0) {
console.log('open 0')
if (RepoStore.openedFiles.length === 0) {
console.log('open 0');
RepoStore.activeFile = {};
return;
}
if(RepoStore.openedFiles.length === 1 || foundIndex === 0) {
if (RepoStore.openedFiles.length === 1 || foundIndex === 0) {
RepoStore.setActiveFiles(RepoStore.openedFiles[0]);
return;
}
if(foundIndex) {
if(foundIndex > 0) {
if (foundIndex) {
if (foundIndex > 0) {
RepoStore.setActiveFiles(RepoStore.openedFiles[foundIndex - 1]);
}
}
......
......@@ -3,7 +3,7 @@ import repoCommitSection from '~/repo/repo_commit_section.vue';
import RepoStore from '~/repo/repo_store';
import Api from '~/api';
fdescribe('RepoCommitSection', () => {
describe('RepoCommitSection', () => {
const openedFiles = [{
id: 0,
changed: true,
......
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