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

No db in schema sidebar #10

This commit is contained in:
lana-k
2020-11-13 23:32:37 +01:00
parent 92e6150ea5
commit 39151732cf
5 changed files with 43 additions and 9 deletions

View File

@@ -6,7 +6,13 @@
:after="{ size: 80, max: 100 }"
>
<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 cant be run without database.
</div>
<db-upload id="db-uploader"/>
</div>
</template>
<template #right-pane>
<tabs />
@@ -19,20 +25,42 @@
import Splitpanes from '@/components/Splitpanes'
import Schema from '@/components/Schema'
import Tabs from '@/components/Tabs'
import dbUpload from '@/components/DbUpload'
export default {
name: 'Editor',
components: {
Schema,
Splitpanes,
Tabs
Tabs,
dbUpload
}
}
</script>
<style>
<style scoped>
.schema-tabs-splitter {
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>