summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/search/sidebar/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/search/sidebar/index.js')
-rw-r--r--app/assets/javascripts/search/sidebar/index.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/assets/javascripts/search/sidebar/index.js b/app/assets/javascripts/search/sidebar/index.js
new file mode 100644
index 00000000000..6419e8ac2c6
--- /dev/null
+++ b/app/assets/javascripts/search/sidebar/index.js
@@ -0,0 +1,19 @@
+import Vue from 'vue';
+import Translate from '~/vue_shared/translate';
+import GlobalSearchSidebar from './components/app.vue';
+
+Vue.use(Translate);
+
+export const initSidebar = store => {
+ const el = document.getElementById('js-search-sidebar');
+
+ if (!el) return false;
+
+ return new Vue({
+ el,
+ store,
+ render(createElement) {
+ return createElement(GlobalSearchSidebar);
+ },
+ });
+};