Commit fa9e729a authored by Phil Hughes's avatar Phil Hughes

fixed rendering bugs

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