Commit 62302141 authored by Bryce Johnson's avatar Bryce Johnson

Move buildConnectorClass logic to template.

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