diff options
Diffstat (limited to 'app/assets/javascripts/integrations/gitlab_slack_application/index.js')
-rw-r--r-- | app/assets/javascripts/integrations/gitlab_slack_application/index.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/app/assets/javascripts/integrations/gitlab_slack_application/index.js b/app/assets/javascripts/integrations/gitlab_slack_application/index.js new file mode 100644 index 00000000000..8bbb81df997 --- /dev/null +++ b/app/assets/javascripts/integrations/gitlab_slack_application/index.js @@ -0,0 +1,34 @@ +import Vue from 'vue'; +import { parseBoolean } from '~/lib/utils/common_utils'; +import GitlabSlackApplication from './components/gitlab_slack_application.vue'; + +export default () => { + const el = document.querySelector('.js-gitlab-slack-application'); + + if (!el) return null; + + const { + projects, + isSignedIn, + signInPath, + slackLinkPath, + gitlabLogoPath, + slackLogoPath, + } = el.dataset; + + return new Vue({ + el, + render(createElement) { + return createElement(GitlabSlackApplication, { + props: { + projects: JSON.parse(projects), + isSignedIn: parseBoolean(isSignedIn), + signInPath, + slackLinkPath, + gitlabLogoPath, + slackLogoPath, + }, + }); + }, + }); +}; |