From c666a6368e98ea6b586684a0fb72baa78914c6c4 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Fri, 25 Jul 2025 14:41:21 +0200 Subject: [PATCH] Fix copy/paste logic for lineNameInfo widget --- .../file-matching-parameters.vue | 68 +++++++++++++++---- 1 file changed, 56 insertions(+), 12 deletions(-) diff --git a/lib/www/client/source/src/components/project-settings/file-matching-parameters.vue b/lib/www/client/source/src/components/project-settings/file-matching-parameters.vue index 86b3e4b..15b1353 100644 --- a/lib/www/client/source/src/components/project-settings/file-matching-parameters.vue +++ b/lib/www/client/source/src/components/project-settings/file-matching-parameters.vue @@ -4,15 +4,15 @@ - Paths - Globs - Pattern - Line info + Paths + Globs + Pattern + Line info - + A list of directories which are searched for matching files. @@ -56,7 +56,7 @@ - + A list of glob patterns expanding to match the files of interest. Note that Linux is case-sensitive. @@ -93,7 +93,7 @@ - + Regular expression that describes the file format definition. Used to capture information such as line and sequence number, etc. @@ -153,7 +153,7 @@ - + Line information that will be extracted from file names @@ -165,14 +165,14 @@ label="Example file name" hint="Enter the name of a representative file to make it easier to visualise your configuration" persistent-hint - v-model="lineNameInfo.example" + v-model="lineNameInfo_.example" > @@ -195,6 +195,23 @@ @click="reset" >Reset --> + + mdi-content-copy + Copy + + + mdi-content-paste + Paste + key in data )) { + this.$emit("update:lineNameInfo", data); + this.showSnack(["Line name information pasted from clipboard", "primary"]); + } else { + this.showSnack(["Clipboard contents are not valid line name information", "error"]); + } + } catch (err) { + if (err instanceof SyntaxError) { + this.showSnack(["Clipboard contents are not valid line name information", "error"]); + } + } + }, + reset () { this.globs_ = this.globs; this.paths_ = this.paths; @@ -302,6 +344,8 @@ export default { this.$emit('close'); }, + ...mapActions(["showSnack"]) + }, mounted () {