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_settings/index.js')
-rw-r--r--app/assets/javascripts/search_settings/index.js27
1 files changed, 7 insertions, 20 deletions
diff --git a/app/assets/javascripts/search_settings/index.js b/app/assets/javascripts/search_settings/index.js
index 1fb1a378ffb..676c43c5631 100644
--- a/app/assets/javascripts/search_settings/index.js
+++ b/app/assets/javascripts/search_settings/index.js
@@ -1,23 +1,10 @@
-import Vue from 'vue';
-import $ from 'jquery';
-import { expandSection, closeSection } from '~/settings_panels';
-import SearchSettings from '~/search_settings/components/search_settings.vue';
+const initSearch = async () => {
+ const el = document.querySelector('.js-search-settings-app');
-const initSearch = ({ el }) =>
- new Vue({
- el,
- render: (h) =>
- h(SearchSettings, {
- ref: 'searchSettings',
- props: {
- searchRoot: document.querySelector('#content-body'),
- sectionSelector: 'section.settings',
- },
- on: {
- collapse: (section) => closeSection($(section)),
- expand: (section) => expandSection($(section)),
- },
- }),
- });
+ if (el) {
+ const { default: mount } = await import(/* webpackChunkName: 'search_settings' */ './mount');
+ mount({ el });
+ }
+};
export default initSearch;