fix: display of table structure cleared query builder request
This commit is contained in:
parent
9e50d95d7b
commit
8a85cc054d
2 changed files with 11 additions and 16 deletions
|
@ -46,18 +46,13 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="grow max-lg:hidden"></div>
|
||||
<div class="p-1 border border-gray-400 bg-gray-100 rounded-md" title="Schema-Struktur" @click="showStructure">
|
||||
<SparklesIcon class="text-gray-500 h-6 w-6 cursor-pointer" />
|
||||
</div>
|
||||
<div class="flex flex-row min-w-fit overflow-hidden border border-gray-400 rounded-md">
|
||||
<div
|
||||
class="p-1"
|
||||
:class="queryMode == 'structure' ? 'bg-gray-200' : ''"
|
||||
title="Schema-Struktur"
|
||||
@click="queryMode = 'structure'"
|
||||
>
|
||||
<SparklesIcon class="text-gray-500 h-6 w-6 cursor-pointer" />
|
||||
</div>
|
||||
<div
|
||||
class="p-1"
|
||||
:class="typeof value == 'object' && queryMode != 'structure' ? 'bg-gray-200' : ''"
|
||||
:class="typeof value == 'object' ? 'bg-gray-200' : ''"
|
||||
title="Visual Builder"
|
||||
@click="queryMode = 'builder'"
|
||||
>
|
||||
|
@ -65,7 +60,7 @@
|
|||
</div>
|
||||
<div
|
||||
class="p-1"
|
||||
:class="typeof value == 'string' && queryMode != 'structure' ? 'bg-gray-200' : ''"
|
||||
:class="typeof value == 'string' ? 'bg-gray-200' : ''"
|
||||
title="SQL Editor"
|
||||
@click="queryMode = 'editor'"
|
||||
>
|
||||
|
@ -74,10 +69,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="p-2 h-44 md:h-60 w-full overflow-y-auto">
|
||||
<div v-if="queryMode == 'structure'">
|
||||
<img src="/administration-db.png" class="h-full w-full cursor-pointer" @click="showStructure" />
|
||||
</div>
|
||||
<textarea v-else-if="typeof value == 'string'" v-model="value" placeholder="SQL Query" class="h-full w-full" />
|
||||
<textarea v-if="typeof value == 'string'" v-model="value" placeholder="SQL Query" class="h-full w-full" />
|
||||
<Table v-else v-model="value" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -153,7 +145,7 @@ export default defineComponent({
|
|||
data() {
|
||||
return {
|
||||
autoChangeFlag: false as boolean,
|
||||
queryMode: "builder" as "builder" | "editor" | "structure",
|
||||
queryMode: "builder" as "builder" | "editor",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal">schnließen</button>
|
||||
<a href="/administration-db.png" button primary-outline download="Datenbank-Schema" class="!whitespace-nowrap"
|
||||
>Bild herunterladen</a
|
||||
>
|
||||
<button primary-outline @click="closeModal">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue