debian-mirror-gitlab/app/assets/javascripts/search/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
771 B
JavaScript
Raw Normal View History

2021-03-11 19:13:27 +05:30
import setHighlightClass from 'ee_else_ce/search/highlight_blob_search_result';
2021-01-03 14:25:43 +05:30
import { queryToObject } from '~/lib/utils/url_utility';
2021-03-11 19:13:27 +05:30
import Project from '~/pages/projects/project';
import refreshCounts from '~/pages/search/show/refresh_counts';
import { initSidebar } from './sidebar';
import { initSearchSort } from './sort';
2021-01-03 14:25:43 +05:30
import createStore from './store';
2021-02-22 17:27:13 +05:30
import { initTopbar } from './topbar';
2021-01-03 14:25:43 +05:30
2021-01-29 00:20:46 +05:30
export const initSearchApp = () => {
2021-09-04 01:27:46 +05:30
const query = queryToObject(window.location.search);
2021-03-11 19:13:27 +05:30
const store = createStore({ query });
2021-01-03 14:25:43 +05:30
2021-02-22 17:27:13 +05:30
initTopbar(store);
2021-01-29 00:20:46 +05:30
initSidebar(store);
2021-03-11 19:13:27 +05:30
initSearchSort(store);
setHighlightClass(query.search); // Code Highlighting
refreshCounts(); // Other Scope Tab Counts
Project.initRefSwitcher(); // Code Search Branch Picker
2021-01-03 14:25:43 +05:30
};