Commit 562df3a3 authored by Regis's avatar Regis

pass svg as prop to commit component

parent 07c6c8e0
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
(() => { (() => {
const project = document.querySelector('.pipelines'); const project = document.querySelector('.pipelines');
const entry = document.querySelector('.vue-pipelines-index'); const entry = document.querySelector('.vue-pipelines-index');
const svgs = document.querySelector('.pipeline-svgs');
Vue.use(VueResource); Vue.use(VueResource);
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
data: { data: {
scope: project.dataset.url, scope: project.dataset.url,
store: new gl.PipelineStore(), store: new gl.PipelineStore(),
svgs: svgs.dataset,
}, },
components: { components: {
'vue-pipelines': gl.VuePipelines, 'vue-pipelines': gl.VuePipelines,
...@@ -37,6 +39,7 @@ ...@@ -37,6 +39,7 @@
<vue-pipelines <vue-pipelines
:scope='scope' :scope='scope'
:store='store' :store='store'
:svgs='svgs'
> >
</vue-pipelines> </vue-pipelines>
</div> </div>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
pageRequest: false, pageRequest: false,
}; };
}, },
props: ['scope', 'store'], props: ['scope', 'store', 'svgs'],
created() { created() {
const pagenum = gl.getParameterByName('p'); const pagenum = gl.getParameterByName('p');
const scope = gl.getParameterByName('scope'); const scope = gl.getParameterByName('scope');
...@@ -81,12 +81,13 @@ ...@@ -81,12 +81,13 @@
<pipeline-url :pipeline='pipeline'></pipeline-url> <pipeline-url :pipeline='pipeline'></pipeline-url>
<td> <td>
<commit <commit
:commit-icon-svg='svgs.commitIconSvg'
:author='author(pipeline)' :author='author(pipeline)'
:tag="pipeline.ref['tag?']" :tag="pipeline.ref['tag?']"
:title='commitTitle(pipeline)' :title='commitTitle(pipeline)'
:commit_ref='ref(pipeline)' :commit-ref='ref(pipeline)'
:short_sha='commitSha(pipeline)' :short-sha='commitSha(pipeline)'
:commit_url='commitUrl(pipeline)' :commit-url='commitUrl(pipeline)'
> >
</commit> </commit>
</td> </td>
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
%div %div
.nothing-here-block No pipelines to show .nothing-here-block No pipelines to show
- else - else
.commit-icon-svg.hidden .pipeline-svgs{"data" => {"commit-icon-svg" => custom_icon("icon_commit")} }
= custom_icon("icon_commit")
.icon_status_canceled.hidden .icon_status_canceled.hidden
= custom_icon("icon_status_canceled") = custom_icon("icon_status_canceled")
.icon_status_running.hidden .icon_status_running.hidden
......
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