mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
No db in schema sidebar #10
This commit is contained in:
6
src/assets/styles/messages.css
Normal file
6
src/assets/styles/messages.css
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
.worning {
|
||||||
|
background-color: var(--color-bg-warning);
|
||||||
|
color: var(--color-text-base);
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 0 24px;
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-show="visible" class="chart-container">
|
<div v-show="visible" class="chart-container">
|
||||||
<div class="chart-worning" v-show="!sqlResult && visible">
|
<div class="worning chart-worning" v-show="!sqlResult && visible">
|
||||||
There is no data to build a chart. Run your sql query and make sure the result is not empty.
|
There is no data to build a chart. Run your sql query and make sure the result is not empty.
|
||||||
</div>
|
</div>
|
||||||
<PlotlyEditor
|
<PlotlyEditor
|
||||||
@@ -96,12 +96,8 @@ export default {
|
|||||||
height: calc(100% - 89px);
|
height: calc(100% - 89px);
|
||||||
}
|
}
|
||||||
.chart-worning {
|
.chart-worning {
|
||||||
background-color: var(--color-bg-warning);
|
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
color: var(--color-text-base);
|
|
||||||
font-size: 13px;
|
|
||||||
padding: 0 24px;
|
|
||||||
}
|
}
|
||||||
.chart {
|
.chart {
|
||||||
border-top: 1px solid var(--color-border);
|
border-top: 1px solid var(--color-border);
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ label {
|
|||||||
border: 1px dashed var(--color-border);
|
border: 1px dashed var(--color-border);
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
border-radius: var(--border-radius-big);
|
border-radius: var(--border-radius-big);
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.drop-area {
|
.drop-area {
|
||||||
background-color: var(--color-bg-light-3);
|
background-color: var(--color-bg-light-3);
|
||||||
@@ -67,6 +69,7 @@ label {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
input {
|
input {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import '@/assets/styles/buttons.css'
|
|||||||
import '@/assets/styles/tables.css'
|
import '@/assets/styles/tables.css'
|
||||||
import '@/assets/styles/dialogs.css'
|
import '@/assets/styles/dialogs.css'
|
||||||
import '@/assets/styles/tooltips.css'
|
import '@/assets/styles/tooltips.css'
|
||||||
|
import '@/assets/styles/messages.css'
|
||||||
|
|
||||||
Vue.use(VuePlugin)
|
Vue.use(VuePlugin)
|
||||||
Vue.use(VModal)
|
Vue.use(VModal)
|
||||||
|
|||||||
@@ -6,7 +6,13 @@
|
|||||||
:after="{ size: 80, max: 100 }"
|
:after="{ size: 80, max: 100 }"
|
||||||
>
|
>
|
||||||
<template #left-pane>
|
<template #left-pane>
|
||||||
<schema />
|
<schema v-if="$store.state.schema"/>
|
||||||
|
<div v-else id="empty-schema-container">
|
||||||
|
<div class="worning">
|
||||||
|
Database is not uploaded. Queries can’t be run without database.
|
||||||
|
</div>
|
||||||
|
<db-upload id="db-uploader"/>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #right-pane>
|
<template #right-pane>
|
||||||
<tabs />
|
<tabs />
|
||||||
@@ -19,20 +25,42 @@
|
|||||||
import Splitpanes from '@/components/Splitpanes'
|
import Splitpanes from '@/components/Splitpanes'
|
||||||
import Schema from '@/components/Schema'
|
import Schema from '@/components/Schema'
|
||||||
import Tabs from '@/components/Tabs'
|
import Tabs from '@/components/Tabs'
|
||||||
|
import dbUpload from '@/components/DbUpload'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Editor',
|
name: 'Editor',
|
||||||
components: {
|
components: {
|
||||||
Schema,
|
Schema,
|
||||||
Splitpanes,
|
Splitpanes,
|
||||||
Tabs
|
Tabs,
|
||||||
|
dbUpload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
.schema-tabs-splitter {
|
.schema-tabs-splitter {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin-left: 6px;
|
background-color: var(--color-white);
|
||||||
|
}
|
||||||
|
#empty-schema-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
min-width: 200px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#db-uploader {
|
||||||
|
flex-grow: 1;
|
||||||
|
margin: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.worning {
|
||||||
|
padding: 12px 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
>>>.drop-area {
|
||||||
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user