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

copy_email_to_clipboard.vue « components « sidebar « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8c8241cf6a4a94375b12c019e06e63b6e5f4888c (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script>
import { s__, __, sprintf } from '~/locale';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';

export default {
  i18n: {
    copyEmail: __('Copy email address'),
  },
  components: {
    ClipboardButton,
  },
  props: {
    copyText: {
      type: String,
      required: true,
    },
  },
  computed: {
    emailText() {
      return sprintf(s__('RightSidebar|Issue email: %{copyText}'), { copyText: this.copyText });
    },
  },
};
</script>

<template>
  <div
    data-qa-selector="copy-forward-email"
    class="copy-email-address gl-display-flex gl-align-items-center gl-justify-content-space-between"
  >
    <span
      class="gl-overflow-hidden gl-text-overflow-ellipsis gl-white-space-nowrap hide-collapsed gl-w-85p"
      >{{ emailText }}</span
    >
    <clipboard-button
      class="copy-email-button gl-bg-none!"
      category="tertiary"
      :title="$options.i18n.copyEmail"
      :text="copyText"
      tooltip-placement="left"
    />
  </div>
</template>