BigW Consortium Gitlab

Commit 562df3a3 by Regis

pass svg as prop to commit component

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