From f41179704131025da10dda6d5129ec9807a02b38 Mon Sep 17 00:00:00 2001 From: Adam Bem Date: Thu, 16 Nov 2023 08:40:28 +0100 Subject: [PATCH 01/12] Added green highlight to parsers --- .../components/xml/XmlOutputFieldComponent.vue | 17 +++++++++++++++-- Frontend/src/style.css | 4 ++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Frontend/src/components/xml/XmlOutputFieldComponent.vue b/Frontend/src/components/xml/XmlOutputFieldComponent.vue index 0c67af8..116cd87 100644 --- a/Frontend/src/components/xml/XmlOutputFieldComponent.vue +++ b/Frontend/src/components/xml/XmlOutputFieldComponent.vue @@ -24,6 +24,7 @@ const engine = ref(''); const version = ref(''); const errorOccurred = ref(false); +const successOccurred = ref(false); onMounted(() => { @@ -119,12 +120,14 @@ async function fetchRequest(request: Request):Promise { function updateOutputField(data: any) { result.value = data.result - errorOccurred.value = data.status == "ERR" + errorOccurred.value = data.status != "OK" + successOccurred.value = data.status == "OK" } function clear() { result.value = "" errorOccurred.value = false + successOccurred.value = false } function emitVersionChange() { @@ -135,6 +138,16 @@ function isVersionSelectionAvailable() { return !(props.tool == "xsd"); } +function highlightField() { + if (errorOccurred.value) { + return "text-field-error"; + } + if (successOccurred.value) { + return "text-field-success"; + } + return ""; +} +