Commit 62302141 authored by Bryce Johnson's avatar Bryce Johnson

Move buildConnectorClass logic to template.

parent 349b1c50
...@@ -8,42 +8,32 @@ export default { ...@@ -8,42 +8,32 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
jobs: { jobs: {
type: Array, type: Array,
required: true, required: true,
}, },
isFirstColumn: { isFirstColumn: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false, default: false,
}, },
stageConnectorClass: { stageConnectorClass: {
type: String, type: String,
required: false, required: false,
default: '', default: '',
}, },
}, },
components: { components: {
jobComponent, jobComponent,
dropdownJobComponent, dropdownJobComponent,
}, },
methods: { methods: {
firstJob(list) { firstJob(list) {
return list[0]; return list[0];
}, },
jobId(job) { jobId(job) {
return `ci-badge-${job.name}`; return `ci-badge-${job.name}`;
}, },
buildConnnectorClass(index) {
return index === 0 && !this.isFirstColumn ? 'left-connector' : '';
},
}, },
}; };
</script> </script>
...@@ -60,7 +50,9 @@ export default { ...@@ -60,7 +50,9 @@ export default {
v-for="(job, index) in jobs" v-for="(job, index) in jobs"
:key="job.id" :key="job.id"
class="build" class="build"
:class="buildConnnectorClass(index)" :class="{
'left-connector': index === 0 && !isFirstColumn
}"
:id="jobId(job)"> :id="jobId(job)">
<div class="curve"></div> <div class="curve"></div>
......
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