Commit fa9e729a authored by Phil Hughes's avatar Phil Hughes

fixed rendering bugs

fixed eslint
parent 5f80d042
...@@ -58,10 +58,11 @@ ...@@ -58,10 +58,11 @@
</td> </td>
<template v-if="!isMini"> <template v-if="!isMini">
<td class="commit-message hidden-sm hidden-xs"> <td class="hidden-sm hidden-xs">
<a <a
@click.stop @click.stop
:href="file.lastCommit.url" :href="file.lastCommit.url"
class="commit-message"
> >
{{ file.lastCommit.message }} {{ file.lastCommit.message }}
</a> </a>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</script> </script>
<template> <template>
<tr class="prev-directory"> <tr class="file prev-directory">
<td <td
:colspan="colSpanCondition" :colspan="colSpanCondition"
class="table-cell" class="table-cell"
......
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
</thead> </thead>
<tbody> <tbody>
<repo-previous-directory <repo-previous-directory
v-if="!isRoot" v-if="!isRoot && !loading.tree"
:prev-url="prevURL" :prev-url="prevURL"
/> />
<repo-loading-file <repo-loading-file
......
...@@ -94,7 +94,7 @@ const RepoHelper = { ...@@ -94,7 +94,7 @@ const RepoHelper = {
.then((response) => { .then((response) => {
const data = response.data; const data = response.data;
if (response.headers && response.headers['page-title']) data.pageTitle = response.headers['page-title']; if (response.headers && response.headers['page-title']) data.pageTitle = response.headers['page-title'];
if (response.headers && response.headers['is-root']) Store.isRoot = convertPermissionToBoolean(response.headers['is-root']); if (response.headers && response.headers['is-root'] && Store.isRoot === null) Store.isRoot = convertPermissionToBoolean(response.headers['is-root']);
if (file && file.type === 'blob') { if (file && file.type === 'blob') {
if (!file) file = data; if (!file) file = data;
......
...@@ -2,13 +2,12 @@ import Helper from '../helpers/repo_helper'; ...@@ -2,13 +2,12 @@ import Helper from '../helpers/repo_helper';
import Service from '../services/repo_service'; import Service from '../services/repo_service';
const RepoStore = { const RepoStore = {
monaco: {},
monacoLoading: false, monacoLoading: false,
service: '', service: '',
canCommit: false, canCommit: false,
onTopOfBranch: false, onTopOfBranch: false,
editMode: false, editMode: false,
isRoot: false, isRoot: null,
prevURL: '', prevURL: '',
projectId: '', projectId: '',
projectName: '', projectName: '',
...@@ -38,23 +37,11 @@ const RepoStore = { ...@@ -38,23 +37,11 @@ const RepoStore = {
newMrTemplateUrl: '', newMrTemplateUrl: '',
branchChanged: false, branchChanged: false,
commitMessage: '', commitMessage: '',
binaryTypes: {
png: false,
md: false,
svg: false,
unknown: false,
},
loading: { loading: {
tree: false, tree: false,
blob: false, blob: false,
}, },
resetBinaryTypes() {
Object.keys(RepoStore.binaryTypes).forEach((key) => {
RepoStore.binaryTypes[key] = false;
});
},
setBranchHash() { setBranchHash() {
return Service.getBranch() return Service.getBranch()
.then((data) => { .then((data) => {
......
import RepoHelper from '~/repo/helpers/repo_helper'; import RepoHelper from '~/repo/helpers/repo_helper';
// eslint-disable-next-line import/prefer-default-export
export const file = () => RepoHelper.serializeBlob({ export const file = () => RepoHelper.serializeBlob({
icon: 'icon', icon: 'icon',
url: 'url', url: 'url',
......
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