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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-01 00:09:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-01 00:09:10 +0300
commit71c16c702a2c647d723bf7177837ed13f30ee3a5 (patch)
tree81f83b819439864c2e277fc8c545ec1bbb17c6fe /app/assets/javascripts/search_settings
parent23332570c97d2b95adecc170a57ca4756346b46a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/search_settings')
-rw-r--r--app/assets/javascripts/search_settings/index.js27
-rw-r--r--app/assets/javascripts/search_settings/mount.js23
2 files changed, 30 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;
diff --git a/app/assets/javascripts/search_settings/mount.js b/app/assets/javascripts/search_settings/mount.js
new file mode 100644
index 00000000000..85ad3b28d59
--- /dev/null
+++ b/app/assets/javascripts/search_settings/mount.js
@@ -0,0 +1,23 @@
+import Vue from 'vue';
+import $ from 'jquery';
+import { expandSection, closeSection } from '~/settings_panels';
+import SearchSettings from '~/search_settings/components/search_settings.vue';
+
+const mountSearch = ({ 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)),
+ },
+ }),
+ });
+
+export default mountSearch;