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/search/sidebar/index.js')
-rw-r--r--app/assets/javascripts/search/sidebar/index.js20
1 files changed, 8 insertions, 12 deletions
diff --git a/app/assets/javascripts/search/sidebar/index.js b/app/assets/javascripts/search/sidebar/index.js
index 3a699355dc9..9a7472ccad3 100644
--- a/app/assets/javascripts/search/sidebar/index.js
+++ b/app/assets/javascripts/search/sidebar/index.js
@@ -4,27 +4,23 @@ import GlobalSearchSidebar from './components/app.vue';
Vue.use(Translate);
-export const sidebarInitState = () => {
- const el = document.getElementById('js-search-sidebar');
- if (!el) return {};
-
- const { navigationJson, searchType } = el.dataset;
-
- const navigationJsonParsed = JSON.parse(navigationJson);
-
- return { navigationJsonParsed, searchType };
-};
-
export const initSidebar = (store) => {
const el = document.getElementById('js-search-sidebar');
+ const hederEl = document.getElementById('super-sidebar-context-header');
+ const headerText = hederEl.innerText;
if (!el) return false;
return new Vue({
el,
+ name: 'GlobalSearchSidebar',
store,
render(createElement) {
- return createElement(GlobalSearchSidebar);
+ return createElement(GlobalSearchSidebar, {
+ props: {
+ headerText,
+ },
+ });
},
});
};