diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 21:08:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 21:08:53 +0300 |
commit | 5b62f8e3ee531f63ce3c49cae03e2a618ba51615 (patch) | |
tree | 2d2553232fe0663957ee4d1054211cc71cb07679 /app/assets/javascripts/repository | |
parent | cdb41961fd2bc233d36c5b30f89d087c2efa9818 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/repository')
-rw-r--r-- | app/assets/javascripts/repository/components/blob_content_viewer.vue | 3 | ||||
-rw-r--r-- | app/assets/javascripts/repository/index.js | 13 |
2 files changed, 13 insertions, 3 deletions
diff --git a/app/assets/javascripts/repository/components/blob_content_viewer.vue b/app/assets/javascripts/repository/components/blob_content_viewer.vue index 4ce714f7c21..334e7964bc2 100644 --- a/app/assets/javascripts/repository/components/blob_content_viewer.vue +++ b/app/assets/javascripts/repository/components/blob_content_viewer.vue @@ -41,6 +41,7 @@ export default { originalBranch: { default: '', }, + explainCodeAvailable: { default: false }, }, apollo: { projectInfo: { @@ -144,7 +145,7 @@ export default { }, computed: { shouldRenderGenie() { - return this.glFeatures.explainCode && this.glFeatures.explainCodeSnippet && this.isLoggedIn; + return this.explainCodeAvailable; }, isLoggedIn() { return isLoggedIn(); diff --git a/app/assets/javascripts/repository/index.js b/app/assets/javascripts/repository/index.js index 294c0c13648..5a3958d8e4a 100644 --- a/app/assets/javascripts/repository/index.js +++ b/app/assets/javascripts/repository/index.js @@ -32,7 +32,16 @@ Vue.use(PerformancePlugin, { export default function setupVueRepositoryList() { const el = document.getElementById('js-tree-list'); const { dataset } = el; - const { projectPath, projectShortPath, ref, escapedRef, fullName, resourceId, userId } = dataset; + const { + projectPath, + projectShortPath, + ref, + escapedRef, + fullName, + resourceId, + userId, + explainCodeAvailable, + } = dataset; const router = createRouter(projectPath, escapedRef); apolloProvider.clients.defaultClient.cache.writeQuery({ @@ -281,7 +290,7 @@ export default function setupVueRepositoryList() { store: createStore(), router, apolloProvider, - provide: { resourceId, userId }, + provide: { resourceId, userId, explainCodeAvailable: parseBoolean(explainCodeAvailable) }, render(h) { return h(App); }, |