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

sidebar_bundle.js « issuable_sidebar « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c8acafa8cd89fd9f7b5cf701412c95eaa57ce966 (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
27
import Vue from 'vue';

import SidebarApp from './components/sidebar_app.vue';

export default () => {
  const el = document.getElementById('js-vue-issuable-sidebar');

  if (!el) {
    return false;
  }

  const { sidebarStatusClass } = el.dataset;
  // An empty string is present when user is signed in.
  const signedIn = el.dataset.signedIn === '';

  return new Vue({
    el,
    components: { SidebarApp },
    render: createElement =>
      createElement('sidebar-app', {
        props: {
          signedIn,
          sidebarStatusClass,
        },
      }),
  });
};