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

config_toggle.js « boards « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1e54c2511b89164ea131d227bcf1bd4c1305813d (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
import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import ConfigToggle from './components/config_toggle.vue';

export default () => {
  const el = document.querySelector('.js-board-config');

  if (!el) {
    return;
  }

  // eslint-disable-next-line no-new
  new Vue({
    el,
    name: 'ConfigToggleRoot',
    render(h) {
      return h(ConfigToggle, {
        props: {
          canAdminList: parseBoolean(el.dataset.canAdminList),
          hasScope: parseBoolean(el.dataset.hasScope),
        },
      });
    },
  });
};