From a4f31697f49dac8fe5e4bcda9979680541b0c571 Mon Sep 17 00:00:00 2001 From: Azri Kahar <42867097+azrikahar@users.noreply.github.com> Date: Wed, 12 Jan 2022 23:11:24 +0800 Subject: [PATCH] Enable context menu for read-only fields & adds copy/paste options (#10992) * allow viewing of raw value for read only fields * add copy value to form-field-menu * change raw value dialog title when disabled * fix notify typing * add paste option & notification for copy/paste --- app/src/components/v-form/form-field-menu.vue | 41 ++++++++----- app/src/components/v-form/form-field.vue | 59 ++++++++++++++++--- app/src/lang/translations/en-US.yaml | 13 +++- app/src/utils/notify.ts | 4 +- 4 files changed, 91 insertions(+), 26 deletions(-) diff --git a/app/src/components/v-form/form-field-menu.vue b/app/src/components/v-form/form-field-menu.vue index 52bde20ecd..6d3944ebc8 100644 --- a/app/src/components/v-form/form-field-menu.vue +++ b/app/src/components/v-form/form-field-menu.vue @@ -1,16 +1,20 @@ @@ -57,8 +66,12 @@ export default defineComponent({ type: [String, Number, Object, Array, Boolean], default: null, }, + restricted: { + type: Boolean, + default: false, + }, }, - emits: ['update:modelValue', 'unset', 'edit-raw'], + emits: ['update:modelValue', 'unset', 'edit-raw', 'copy-raw', 'paste-raw'], setup(props) { const { t } = useI18n(); diff --git a/app/src/components/v-form/form-field.vue b/app/src/components/v-form/form-field.vue index 16632aff4d..56382ec959 100644 --- a/app/src/components/v-form/form-field.vue +++ b/app/src/components/v-form/form-field.vue @@ -1,12 +1,11 @@