From bd3c5cfc03867049a6951599e4ad99235bacb25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viterbo=20Rodr=C3=ADguez?= Date: Wed, 29 May 2024 10:51:33 -0300 Subject: [PATCH] fix mobile + added copy to clip by line --- .../Transaction/TransactionInputViewer.vue | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/components/Transaction/TransactionInputViewer.vue b/src/components/Transaction/TransactionInputViewer.vue index d3e6c6bb..203d5c36 100644 --- a/src/components/Transaction/TransactionInputViewer.vue +++ b/src/components/Transaction/TransactionInputViewer.vue @@ -128,6 +128,14 @@ onMounted(() => { initView(); }); +const copied = ref(false); +const copyToClipboard = (row_value: string) => { + navigator.clipboard.writeText(row_value); + copied.value = true; + setTimeout(() => { + copied.value = false; + }, 2000); +}; @@ -192,11 +200,19 @@ onMounted(() => { {{ props.row ? props.row.type : '' }} - +
{{ props.row ? props.row.value : '' }} - {{ props.row ? props.row.value : '' }}
+ + + {{ copied ? $t('components.copied') : $t('components.copy_to_clipboard') }} +
@@ -242,8 +258,14 @@ onMounted(() => { } &-cell { + &--value { + cursor: pointer; + } &-value { - white-space: normal; + // solamente para resoluciones desktop + @media (min-width: 1024px) { + white-space: normal; + } } } &-header-cell {