Polished XPath view structore
This commit is contained in:
		| @@ -55,10 +55,10 @@ import {html} from '@codemirror/lang-html' | ||||
| </script> | ||||
|  | ||||
| <template> | ||||
|     <div class="editor h-full overflow-scroll"> | ||||
|   <div class="editor w-full max-w-full h-full overflow-scroll"> | ||||
|      | ||||
|     <codemirror | ||||
|       style="height: 100%; padding:0.5rem ; border-radius: 0.5rem" | ||||
|       style="height: 100%; width: 100%; padding:1rem ; border-radius: 1rem" | ||||
|       :model-value="code" | ||||
|       @update:model-value="dataUpdated" | ||||
|       :extensions="extensions" | ||||
|   | ||||
| @@ -42,8 +42,8 @@ function canBeFormatted() { | ||||
| </script> | ||||
|  | ||||
| <template> | ||||
|     <div class="flex flex-col w-full h-1/2"> | ||||
|         <div class="flex place-content-between w-full pr-2 items-center m-2"> | ||||
|     <div class="flex flex-col w-full h-1/2 gap-2"> | ||||
|         <div class="flex place-content-between w-full pr-2 items-center"> | ||||
|             <span class="dark:text-white">{{ stylizedName }}</span> | ||||
|             <div class="flex space-x-2"> | ||||
|                 <InsertTemplateComponent :stylized-name="props.stylizedName" @update:default-data="(data: string) => updateData(data)"></InsertTemplateComponent> | ||||
| @@ -51,7 +51,6 @@ function canBeFormatted() { | ||||
|                 <button class="tool-button" @click="clear">Clear</button> | ||||
|             </div> | ||||
|         </div> | ||||
|         <!-- <textarea id="xmlField" v-model="data" @input="sendValue()" class="text-field h-full"></textarea> --> | ||||
|         <CodeEditor @update:updated-code="sendNewValue" v-model="data" :code="data" :config="{disabled:false, language:stylizedName}"></CodeEditor> | ||||
|     </div> | ||||
| </template> | ||||
| @@ -129,8 +129,8 @@ function emitVersionChange() { | ||||
| </script> | ||||
|  | ||||
| <template> | ||||
|     <div class="flex flex-col w-full lg:w-1/2 h-1/2 lg:h-full items-center"> | ||||
|         <div class="flex place-content-between w-full items-center m-2"> | ||||
|     <div class="flex flex-col gap-2 w-full lg:w-1/2 h-1/2 lg:h-full items-center"> | ||||
|         <div class="flex place-content-between w-full items-center"> | ||||
|             <span class="dark:text-white">Result:</span> | ||||
|             <div class="flex space-x-2"> | ||||
|                 <select v-model="engine" name="engine" @change="changeAvailableVersions()" class="px-3 rounded-full border border-slate-400 bg-white dark:text-slate-100 dark:bg-gray-600"> | ||||
| @@ -144,7 +144,6 @@ function emitVersionChange() { | ||||
|             </div> | ||||
|         </div> | ||||
|         <div class="overflow-scroll h-full w-full"> | ||||
|             <!--  <pre class="whitespace-pre-wrap"><code>{{ result }}</code></pre>  --> | ||||
|             <CodeEditor :code="result" :config="{disabled:true,language:tool}"></CodeEditor> | ||||
|         </div> | ||||
|          | ||||
|   | ||||
| @@ -38,7 +38,7 @@ function toggleTooltips() { | ||||
| </script> | ||||
|  | ||||
| <template> | ||||
|     <div :class="{ 'w-4/12' : !areTooltipsHidden }" class="hidden xl:flex shrink-0 items-stretch p-2 flex-row rounded-xl shadow-lg bg-gradient-to-r from-blue-400 to-blue-300 dark:from-sky-600 dark:to-sky-800"> | ||||
|     <div :class="areTooltipsHidden ? '' : 'w-4/12'" class="hidden 2xl:flex shrink-0 items-stretch p-2 flex-row rounded-xl shadow-lg bg-gradient-to-r from-blue-400 to-blue-300 dark:from-sky-600 dark:to-sky-800"> | ||||
|         <button :class="{'mr-2' : !areTooltipsHidden }" class="text-xl w-6 dark:text-slate-100" @click="toggleTooltips()"> | ||||
|             T<br/>o<br/>o<br/>l<br/>t<br/>i<br/>p<br/>s | ||||
|         </button> | ||||
|   | ||||
| @@ -17,11 +17,13 @@ function updateVersion(newVersion: string) { | ||||
|  | ||||
| <template> | ||||
|     <div id="layout" class="flex flex-col lg:flex-row w-full h-full gap-4"> | ||||
|         <div class="flex flex-col w-full lg:w-1/2 h-full items-center gap-4"> | ||||
|             <xmlInputFieldComponent stylized-name="XML" :data="xml" @update="(data) => {xml = data}"></xmlInputFieldComponent> | ||||
|             <xmlInputFieldComponent stylized-name="XPath" :data="query" @update="(data) => {query = data}"></xmlInputFieldComponent> | ||||
|         <div class="flex flex-col lg:flex-row gap-4 w-full lg:w-7/12 grow"> | ||||
|             <div class="flex flex-col w-full lg:w-1/2 h-full items-center gap-4 "> | ||||
|                 <xmlInputFieldComponent stylized-name="XML" :data="xml" @update="(data) => {xml = data}"></xmlInputFieldComponent> | ||||
|                 <xmlInputFieldComponent stylized-name="XPath" :data="query" @update="(data) => {query = data}"></xmlInputFieldComponent> | ||||
|             </div> | ||||
|             <xmlOutputFieldComponent tool="xpath" :xml="xml" :query="query" @update="(version) => updateVersion(version)"></xmlOutputFieldComponent> | ||||
|         </div> | ||||
|         <xmlOutputFieldComponent tool="xpath" :xml="xml" :query="query" @update="(version) => updateVersion(version)"></xmlOutputFieldComponent> | ||||
|         <tooltipComponent :version="version"></tooltipComponent> | ||||
|     </div> | ||||
| </template> | ||||
		Reference in New Issue
	
	Block a user