diff options
Diffstat (limited to 'app/assets/javascripts/repository/index.js')
-rw-r--r-- | app/assets/javascripts/repository/index.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/assets/javascripts/repository/index.js b/app/assets/javascripts/repository/index.js index 52f53be045b..d9216e88676 100644 --- a/app/assets/javascripts/repository/index.js +++ b/app/assets/javascripts/repository/index.js @@ -2,6 +2,7 @@ import Vue from 'vue'; import createRouter from './router'; import App from './components/app.vue'; import Breadcrumbs from './components/breadcrumbs.vue'; +import LastCommit from './components/last_commit.vue'; import apolloProvider from './graphql'; import { setTitle } from './utils/title'; @@ -48,6 +49,24 @@ export default function setupVueRepositoryList() { }, }); + const commitEl = document.getElementById('js-last-commit'); + + if (commitEl) { + // eslint-disable-next-line no-new + new Vue({ + el: commitEl, + router, + apolloProvider, + render(h) { + return h(LastCommit, { + props: { + currentPath: this.$route.params.pathMatch, + }, + }); + }, + }); + } + return new Vue({ el, router, |