Commit a1ae5ec9 authored by Jacob Schatz's avatar Jacob Schatz Committed by Eric Eastwood

Conditional colSpan.

parent a68fd3c8
...@@ -20,7 +20,7 @@ const RepoLoadingFile = { ...@@ -20,7 +20,7 @@ const RepoLoadingFile = {
computed: { computed: {
showGhostLines() { showGhostLines() {
return loading.tree && !hasFiles; return this.loading.tree && !this.hasFiles;
} }
}, },
......
<script> <script>
import RepoMixin from '../mixins/repo_mixin';
const RepoPreviousDirectory = { const RepoPreviousDirectory = {
props: { props: {
prevUrl: { prevUrl: {
...@@ -7,6 +9,14 @@ const RepoPreviousDirectory = { ...@@ -7,6 +9,14 @@ const RepoPreviousDirectory = {
}, },
}, },
mixins: [RepoMixin],
computed: {
colSpanCondition() {
return this.isMini ? undefined : 3;
}
},
methods: { methods: {
linkClicked(file) { linkClicked(file) {
this.$emit('linkclicked', file); this.$emit('linkclicked', file);
...@@ -19,7 +29,7 @@ export default RepoPreviousDirectory; ...@@ -19,7 +29,7 @@ export default RepoPreviousDirectory;
<template> <template>
<tr class="prev-directory"> <tr class="prev-directory">
<td colspan="3"> <td :colspan="colSpanCondition">
<a :href="prevUrl" @click.prevent="linkClicked(prevUrl)">..</a> <a :href="prevUrl" @click.prevent="linkClicked(prevUrl)">..</a>
</td> </td>
</tr> </tr>
......
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