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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/sidebar/components/copy_email_to_clipboard.vue
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/sidebar/components/copy_email_to_clipboard.vue')
-rw-r--r--app/assets/javascripts/sidebar/components/copy_email_to_clipboard.vue43
1 files changed, 43 insertions, 0 deletions
diff --git a/app/assets/javascripts/sidebar/components/copy_email_to_clipboard.vue b/app/assets/javascripts/sidebar/components/copy_email_to_clipboard.vue
new file mode 100644
index 00000000000..8c8241cf6a4
--- /dev/null
+++ b/app/assets/javascripts/sidebar/components/copy_email_to_clipboard.vue
@@ -0,0 +1,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>