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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user