diff --git a/web/src/components/ui/CustomField.vue b/web/src/components/ui/CustomField.vue index f4c4951091..0167aa0108 100644 --- a/web/src/components/ui/CustomField.vue +++ b/web/src/components/ui/CustomField.vue @@ -13,8 +13,13 @@ :rules="[...validationRules]" reactive-rules autogrow - /> - + > + + import { truncateText } from "@/utils/format"; +import { copyToClipboard } from "quasar"; +import { notifySuccess, notifyError } from "@/utils/notify"; + export default { name: "CustomField", props: ["field", "modelValue"], @@ -107,6 +115,15 @@ export default { ? "q-mb-xl q-mt-xl" : ""; }, + copyValueToClipboard(modelValue) { + copyToClipboard(modelValue) + .then(() => { + notifySuccess("Copied to clipboard!"); + }) + .catch(() => { + notifyError("Unable to copy to clipboard!"); + }); + } }, computed: { validationRules() {