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

Add computed property for ghost lines.

parent e2322b2a
...@@ -18,6 +18,12 @@ const RepoLoadingFile = { ...@@ -18,6 +18,12 @@ const RepoLoadingFile = {
}, },
}, },
computed: {
showGhostLines() {
return loading.tree && !hasFiles;
}
},
methods: { methods: {
lineOfCode(n) { lineOfCode(n) {
return `line-of-code-${n}`; return `line-of-code-${n}`;
...@@ -29,23 +35,23 @@ export default RepoLoadingFile; ...@@ -29,23 +35,23 @@ export default RepoLoadingFile;
</script> </script>
<template> <template>
<tr v-if="loading.tree && !hasFiles" class="loading-file"> <tr v-if="showGhostLines" class="loading-file">
<td> <td>
<div class="animation-container animation-container-small"> <div class="animation-container animation-container-small">
<div v-for="n in 6" :class="lineOfCode(n)" :key="n"></div> <div v-for="n in 6" :class="lineOfCode(n)" :key="n"></div>
</div> </div>
</td> </td>
<td v-if="!isMini" class="hidden-sm hidden-xs"> <td v-if="!isMini" class="hidden-sm hidden-xs">
<div class="animation-container"> <div class="animation-container">
<div v-for="n in 6" :class="lineOfCode(n)" :key="n"></div> <div v-for="n in 6" :class="lineOfCode(n)" :key="n"></div>
</div> </div>
</td> </td>
<td v-if="!isMini" class="hidden-xs"> <td v-if="!isMini" class="hidden-xs">
<div class="animation-container animation-container-small"> <div class="animation-container animation-container-small">
<div v-for="n in 6" :class="lineOfCode(n)" :key="n"></div> <div v-for="n in 6" :class="lineOfCode(n)" :key="n"></div>
</div> </div>
</td> </td>
</tr> </tr>
</template> </template>
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