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/super_sidebar/super_sidebar_bundle.js')
-rw-r--r--app/assets/javascripts/super_sidebar/super_sidebar_bundle.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/assets/javascripts/super_sidebar/super_sidebar_bundle.js b/app/assets/javascripts/super_sidebar/super_sidebar_bundle.js
index f6afde02fa5..322eca72016 100644
--- a/app/assets/javascripts/super_sidebar/super_sidebar_bundle.js
+++ b/app/assets/javascripts/super_sidebar/super_sidebar_bundle.js
@@ -65,13 +65,23 @@ export const initSuperSidebar = () => {
if (!el) return false;
- const { rootPath, sidebar, toggleNewNavEndpoint, forceDesktopExpandedSidebar } = el.dataset;
+ const {
+ rootPath,
+ sidebar,
+ toggleNewNavEndpoint,
+ forceDesktopExpandedSidebar,
+ commandPalette,
+ } = el.dataset;
bindSuperSidebarCollapsedEvents(forceDesktopExpandedSidebar);
initSuperSidebarCollapsedState(parseBoolean(forceDesktopExpandedSidebar));
const sidebarData = JSON.parse(sidebar);
const searchData = convertObjectPropsToCamelCase(sidebarData.search);
+
+ const commandPaletteData = JSON.parse(commandPalette);
+ const projectFilesPath = commandPaletteData.project_files_url;
+ const projectBlobPath = commandPaletteData.project_blob_url;
const commandPaletteCommands = sidebarData.create_new_menu_groups || [];
const commandPaletteLinks = convertObjectPropsToCamelCase(sidebarData.current_menu_items || []);
@@ -91,6 +101,8 @@ export const initSuperSidebar = () => {
commandPaletteLinks,
autocompletePath,
searchContext,
+ projectFilesPath,
+ projectBlobPath,
},
store: createStore({
searchPath,