From 73dac78cd921bae046f8d028c8fcedaac335d2e2 Mon Sep 17 00:00:00 2001
From: callebtc <93376500+callebtc@users.noreply.github.com>
Date: Sat, 10 Aug 2024 13:49:52 +0300
Subject: [PATCH] add copy button (#200)
---
src/components/MintDetailsDialog.vue | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/components/MintDetailsDialog.vue b/src/components/MintDetailsDialog.vue
index c8461432..2279968c 100644
--- a/src/components/MintDetailsDialog.vue
+++ b/src/components/MintDetailsDialog.vue
@@ -117,7 +117,14 @@
{{ contactMethods[contactInfo.method] }}
- {{ contactInfo.info }}
+ {{ shortenText(contactInfo.info, 30) }}
+
@@ -164,6 +171,13 @@ export default defineComponent({
...mapState(useMintsStore, ["showMintInfoData"]),
...mapWritableState(useMintsStore, ["showMintInfoDialog"]),
},
- methods: {},
+ methods: {
+ shortenText: function (text, maxLength) {
+ if (text.length > maxLength) {
+ return text.substring(0, maxLength) + "...";
+ }
+ return text;
+ },
+ },
});