File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<template >
22 <a href =" #" class =" copy-text" ref =" text" @click.prevent =" onClick" >
3- {{ $props.text }}
3+ < template v-if = " ! hideText " > {{ $props.text }}</ template >
44 <b-icon icon =" file-multiple-outline" size =" is-small" />
55 </a >
66</template >
@@ -11,10 +11,14 @@ export default {
1111
1212 props: {
1313 text: { type: String , default: ' ' },
14+ hideText: { type: Boolean , default: false },
1415 },
1516
1617 methods: {
17- onClick () {
18+ onClick (e ) {
19+ e .preventDefault ();
20+ e .stopPropagation ();
21+
1822 const input = document .createElement (' input' );
1923 input .setAttribute (' type' , ' text' );
2024 input .style .opacity = ' 0' ;
Original file line number Diff line number Diff line change 7272 </b-tag >
7373 <router-link :to =" { name: 'campaign', params: { id: props.row.id } }" >
7474 {{ props.row.name }}
75+ <copy-text :text =" props.row.name" hide-text />
7576 </router-link >
7677 </p >
7778 <p class =" is-size-7 has-text-grey" >
78- {{ props.row.subject }}
79+ < copy-text :text = " props.row.subject" />
7980 </p >
8081 <b-taglist >
8182 <b-tag class =" is-small" v-for =" t in props.row.tags" :key =" t" >
@@ -265,11 +266,13 @@ import Vue from 'vue';
265266import { mapState } from ' vuex' ;
266267import CampaignPreview from ' ../components/CampaignPreview.vue' ;
267268import EmptyPlaceholder from ' ../components/EmptyPlaceholder.vue' ;
269+ import CopyText from ' ../components/CopyText.vue' ;
268270
269271export default Vue .extend ({
270272 components: {
271273 CampaignPreview,
272274 EmptyPlaceholder,
275+ CopyText,
273276 },
274277
275278 data () {
Original file line number Diff line number Diff line change 108108 <a :href =" `/subscribers/${props.row.id}`" @click.prevent =" showEditForm(props.row)"
109109 :class =" { 'blocklisted': props.row.status === 'blocklisted' }" >
110110 {{ props.row.email }}
111+ <copy-text :text =" `${props.row.email}`" hide-text />
111112 </a >
112113 <b-tag v-if =" props.row.status !== 'enabled'" :class =" props.row.status" data-cy =" blocklisted" >
113114 {{ $t(`subscribers.status.${props.row.status}`) }}
130131 <a :href =" `/subscribers/${props.row.id}`" @click.prevent =" showEditForm(props.row)"
131132 :class =" { 'blocklisted': props.row.status === 'blocklisted' }" >
132133 {{ props.row.name }}
134+ <copy-text :text =" `${props.row.name}`" hide-text />
133135 </a >
134136 </b-table-column >
135137
@@ -194,11 +196,13 @@ import EmptyPlaceholder from '../components/EmptyPlaceholder.vue';
194196import { uris } from ' ../constants' ;
195197import SubscriberBulkList from ' ./SubscriberBulkList.vue' ;
196198import SubscriberForm from ' ./SubscriberForm.vue' ;
199+ import CopyText from ' ../components/CopyText.vue' ;
197200
198201export default Vue .extend ({
199202 components: {
200203 SubscriberForm,
201204 SubscriberBulkList,
205+ CopyText,
202206 EmptyPlaceholder,
203207 },
204208
You can’t perform that action at this time.
0 commit comments