Welcome to mirror list, hosted at ThFree Co, Russian Federation.

super_sidebar_bundle.js « super_sidebar « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b9c7073df8c37539177cf7879a9ee3f659d8e34e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import Vue from 'vue';
import SuperSidebar from './components/super_sidebar.vue';

export const initSuperSidebar = () => {
  const el = document.querySelector('.js-super-sidebar');

  if (!el) return false;

  const { rootPath, sidebar, toggleNewNavEndpoint } = el.dataset;

  return new Vue({
    el,
    name: 'SuperSidebarRoot',
    provide: {
      rootPath,
      toggleNewNavEndpoint,
    },
    render(h) {
      return h(SuperSidebar, {
        props: {
          sidebarData: JSON.parse(sidebar),
        },
      });
    },
  });
};