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

index.js « new « sessions « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf126b0e202cf8fd18494bf5e174d0787a36a092 (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
28
29
import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import EmailVerification from './components/email_verification.vue';

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

  if (!el) {
    return null;
  }

  const { obfuscatedEmail, verifyPath, resendPath, offerEmailReset, updateEmailPath } = el.dataset;

  return new Vue({
    el,
    name: 'EmailVerificationRoot',
    render(createElement) {
      return createElement(EmailVerification, {
        props: {
          obfuscatedEmail,
          verifyPath,
          resendPath,
          isOfferEmailReset: parseBoolean(offerEmailReset),
          updateEmailPath,
        },
      });
    },
  });
};