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>
|
||||||
<div
|
<div
|
||||||
class="p-1"
|
class="p-1"
|
||||||
:class="typeof value == 'object' ? 'bg-gray-200' : ''"
|
:class="typeof value == 'object' && queryMode != 'structure' ? 'bg-gray-200' : ''"
|
||||||
title="Visual Builder"
|
title="Visual Builder"
|
||||||
@click="queryMode = 'builder'"
|
@click="queryMode = 'builder'"
|
||||||
>
|
>
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="p-1"
|
class="p-1"
|
||||||
:class="typeof value == 'string' ? 'bg-gray-200' : ''"
|
:class="typeof value == 'string' && queryMode != 'structure' ? 'bg-gray-200' : ''"
|
||||||
title="SQL Editor"
|
title="SQL Editor"
|
||||||
@click="queryMode = 'editor'"
|
@click="queryMode = 'editor'"
|
||||||
>
|
>
|
||||||
|
@ -136,10 +136,16 @@ export default defineComponent({
|
||||||
} else {
|
} else {
|
||||||
this.value = "";
|
this.value = "";
|
||||||
}
|
}
|
||||||
|
this.activeQueryId = undefined;
|
||||||
},
|
},
|
||||||
activeQueryId() {
|
activeQueryId() {
|
||||||
let query = this.queries.find((t) => t.id == this.activeQueryId)?.query;
|
let query = this.queries.find((t) => t.id == this.activeQueryId)?.query;
|
||||||
if (query != undefined) {
|
if (query != undefined) {
|
||||||
|
if (typeof query == "string") {
|
||||||
|
this.queryMode = "editor";
|
||||||
|
} else {
|
||||||
|
this.queryMode = "builder";
|
||||||
|
}
|
||||||
this.value = query;
|
this.value = query;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue