All files / app/assets/javascripts/lib/logger hello.js

100% Statements 5/5
100% Branches 2/2
100% Functions 1/1
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 30 31 32 33 34 35 36 37 38 39      2x 2x 2x   2x   2x                                                          
import { s__, sprintf } from '~/locale';
import { PROMO_URL } from 'jh_else_ce/lib/utils/url_utility';
 
const HANDSHAKE = String.fromCodePoint(0x1f91d);
const MAG = String.fromCodePoint(0x1f50e);
const ROCKET = String.fromCodePoint(0x1f680);
 
export const logHello = () => {
  // eslint-disable-next-line no-console
  console.log(
    `%c${s__('HelloMessage|Welcome to GitLab!')}%c
 
${s__(
  'HelloMessage|Does this page need fixes or improvements? Open an issue or contribute a merge request to help make GitLab more lovable. At GitLab, everyone can contribute!',
)}
 
${sprintf(s__('HelloMessage|%{handshake_emoji} Contribute to GitLab: %{contribute_link}'), {
  handshake_emoji: `${HANDSHAKE}`,
  contribute_link: `${PROMO_URL}/community/contribute/`,
})}
${sprintf(s__('HelloMessage|%{magnifier_emoji} Create a new GitLab issue: %{new_issue_link}'), {
  magnifier_emoji: `${MAG}`,
  new_issue_link: 'https://gitlab.com/gitlab-org/gitlab/-/issues/new',
})}
${
  window.gon?.dot_com
    ? `${sprintf(
        s__(
          'HelloMessage|%{rocket_emoji} We like your curiosity! Help us improve GitLab by joining the team: %{jobs_page_link}',
        ),
        { rocket_emoji: `${ROCKET}`, jobs_page_link: `${PROMO_URL}/jobs/` },
      )}`
    : ''
}`,
    `padding-top: 0.5em; font-size: 2em;`,
    'padding-bottom: 0.5em;',
  );
};