QOL Navigation
This commit is contained in:
parent
604ae30901
commit
ce8157e6bf
1 changed files with 8 additions and 2 deletions
|
@ -57,7 +57,7 @@
|
|||
</div>
|
||||
<div
|
||||
class="p-1"
|
||||
:class="typeof value == 'object' ? 'bg-gray-200' : ''"
|
||||
:class="typeof value == 'object' && queryMode != 'structure' ? 'bg-gray-200' : ''"
|
||||
title="Visual Builder"
|
||||
@click="queryMode = 'builder'"
|
||||
>
|
||||
|
@ -65,7 +65,7 @@
|
|||
</div>
|
||||
<div
|
||||
class="p-1"
|
||||
:class="typeof value == 'string' ? 'bg-gray-200' : ''"
|
||||
:class="typeof value == 'string' && queryMode != 'structure' ? 'bg-gray-200' : ''"
|
||||
title="SQL Editor"
|
||||
@click="queryMode = 'editor'"
|
||||
>
|
||||
|
@ -136,10 +136,16 @@ export default defineComponent({
|
|||
} else {
|
||||
this.value = "";
|
||||
}
|
||||
this.activeQueryId = undefined;
|
||||
},
|
||||
activeQueryId() {
|
||||
let query = this.queries.find((t) => t.id == this.activeQueryId)?.query;
|
||||
if (query != undefined) {
|
||||
if (typeof query == "string") {
|
||||
this.queryMode = "editor";
|
||||
} else {
|
||||
this.queryMode = "builder";
|
||||
}
|
||||
this.value = query;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue