diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/assets/javascripts/repository/index.js | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/repository/index.js')
-rw-r--r-- | app/assets/javascripts/repository/index.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/assets/javascripts/repository/index.js b/app/assets/javascripts/repository/index.js index e9214e3acff..e5d22f50d72 100644 --- a/app/assets/javascripts/repository/index.js +++ b/app/assets/javascripts/repository/index.js @@ -11,6 +11,7 @@ import RefSelector from '~/ref/components/ref_selector.vue'; import App from './components/app.vue'; import Breadcrumbs from './components/breadcrumbs.vue'; import DirectoryDownloadLinks from './components/directory_download_links.vue'; +import ForkInfo from './components/fork_info.vue'; import LastCommit from './components/last_commit.vue'; import BlobControls from './components/blob_controls.vue'; import apolloProvider from './graphql'; @@ -63,6 +64,28 @@ export default function setupVueRepositoryList() { }, }); + const initForkInfo = () => { + const forkEl = document.getElementById('js-fork-info'); + if (!forkEl) { + return null; + } + const { sourceName, sourcePath } = forkEl.dataset; + return new Vue({ + el: forkEl, + apolloProvider, + render(h) { + return h(ForkInfo, { + props: { + projectPath, + selectedRef: ref, + sourceName, + sourcePath, + }, + }); + }, + }); + }; + const initLastCommitApp = () => new Vue({ el: document.getElementById('js-last-commit'), @@ -118,6 +141,7 @@ export default function setupVueRepositoryList() { initLastCommitApp(); initBlobControlsApp(); + initForkInfo(); initRefSwitcher(); router.afterEach(({ params: { path } }) => { |