Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/repository/index.js')
-rw-r--r--app/assets/javascripts/repository/index.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/app/assets/javascripts/repository/index.js b/app/assets/javascripts/repository/index.js
index 197b19387cf..120c32caefd 100644
--- a/app/assets/javascripts/repository/index.js
+++ b/app/assets/javascripts/repository/index.js
@@ -9,6 +9,7 @@ import App from './components/app.vue';
import Breadcrumbs from './components/breadcrumbs.vue';
import DirectoryDownloadLinks from './components/directory_download_links.vue';
import LastCommit from './components/last_commit.vue';
+import BlobControls from './components/blob_controls.vue';
import apolloProvider from './graphql';
import commitsQuery from './queries/commits.query.graphql';
import projectPathQuery from './queries/project_path.query.graphql';
@@ -71,8 +72,26 @@ export default function setupVueRepositoryList() {
},
});
+ const initBlobControlsApp = () =>
+ new Vue({
+ el: document.getElementById('js-blob-controls'),
+ router,
+ apolloProvider,
+ render(h) {
+ return h(BlobControls, {
+ props: {
+ projectPath,
+ },
+ });
+ },
+ });
+
initLastCommitApp();
+ if (gon.features.refactorBlobViewer) {
+ initBlobControlsApp();
+ }
+
router.afterEach(({ params: { path } }) => {
setTitle(path, ref, fullName);
});
@@ -144,7 +163,7 @@ export default function setupVueRepositoryList() {
}`,
// Ideally passing this class to `props` should work
// But it doesn't work here. :(
- class: 'btn btn-default btn-md gl-button ml-sm-0',
+ class: 'btn btn-default btn-md gl-button',
},
},
[__('History')],