Implemented red frame on parsing error in Parsers
This commit is contained in:
		| @@ -23,6 +23,8 @@ var versionsForCurrentEngine = ref([""]); | ||||
| const engine = ref(''); | ||||
| const version = ref(''); | ||||
|  | ||||
| const errorOccurred = ref(false); | ||||
|  | ||||
|  | ||||
| onMounted(() => { | ||||
|     changeAvailableEngines(); | ||||
| @@ -111,16 +113,18 @@ function prepareRequestBody():string { | ||||
| async function fetchRequest(request: Request):Promise<JSON> { | ||||
|     var responseBody = await fetch(request) | ||||
|     .then(response => response.json()) | ||||
|     .then((body) => body); | ||||
|     return responseBody; | ||||
|     .then((body) => body) | ||||
|     return responseBody | ||||
| } | ||||
|  | ||||
| function updateOutputField(data: any) { | ||||
|     result.value = data.result; | ||||
|     result.value = data.result | ||||
|     errorOccurred.value = data.status == "ERR" | ||||
| } | ||||
|  | ||||
| function clear() { | ||||
|     result.value = ""; | ||||
|     result.value = "" | ||||
|     errorOccurred.value = false | ||||
| } | ||||
|  | ||||
| function emitVersionChange() { | ||||
| @@ -148,7 +152,7 @@ function isVersionSelectionAvailable() { | ||||
|                 <button class="tool-button" @click="process">Process</button> | ||||
|             </div> | ||||
|         </div> | ||||
|         <div class="overflow-scroll h-full w-full"> | ||||
|         <div class="overflow-scroll h-full w-full rounded-2xl" :class="{'text-field-error' : errorOccurred}"> | ||||
|             <CodeEditor :code="result" :config="{disabled:true,language:tool}"></CodeEditor> | ||||
|         </div> | ||||
|          | ||||
|   | ||||
| @@ -26,4 +26,8 @@ | ||||
|  | ||||
| .file-selector { | ||||
|     @apply block file:border-none file:font-sans file:text-base file:hover:brightness-110 file:py-2 file:px-4 file:h-full file:w-fit file:rounded-full file:bg-gradient-to-r file:from-blue-400 file:to-sky-300  file:dark:text-white file:dark:from-sky-600 file:dark:to-sky-800 file:hover:bg-blue-400 w-fit rounded-full text-sm text-gray-900 border border-gray-300 cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 | ||||
| } | ||||
|  | ||||
| .text-field-error { | ||||
|     @apply shadow-[0px_0px_20px_0px_rgba(255,0,0,1)]; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user