1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

Loading remote database and inquiries #109

This commit is contained in:
lana-k
2023-06-05 22:31:39 +02:00
parent 998e8d66f7
commit 0044d82b6f
15 changed files with 585 additions and 11 deletions

View File

@@ -3,8 +3,9 @@
<splitpanes
class="query-results-splitter"
horizontal
:before="{ size: 50, max: 100 }"
:after="{ size: 50, max: 100 }"
:before="{ size: topPaneSize, max: 100 }"
:after="{ size: 100 - topPaneSize, max: 100 }"
:default="{ before: 50, after: 50 }"
>
<template #left-pane>
<div :id="'above-' + tab.id" class="above" />
@@ -70,6 +71,13 @@ export default {
Splitpanes,
Teleport
},
data () {
return {
topPaneSize: this.tab.maximize
? this.tab.layout[this.tab.maximize] === 'above' ? 100 : 0
: 50
}
},
computed: {
isActive () {
return this.tab.id === this.$store.state.currentTabId

View File

@@ -2,8 +2,9 @@
<div>
<splitpanes
class="schema-tabs-splitter"
:before="{ size: 20, max: 30 }"
:after="{ size: 80, max: 100 }"
:before="{ size: schemaWidth, max: 30 }"
:after="{ size: 100 - schemaWidth, max: 100 }"
:default="{ before: 20, after: 80 }"
>
<template #left-pane>
<schema/>
@@ -28,6 +29,11 @@ export default {
Splitpanes,
Tabs
},
data () {
return {
schemaWidth: this.$route.query.hide_schema === '1' ? 0 : 20
}
},
async beforeCreate () {
const schema = this.$store.state.db.schema
if (!schema || schema.length === 0) {