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

check data format #109

This commit is contained in:
lana-k
2023-06-10 20:05:42 +02:00
parent 014ecf145e
commit 1a9d1b308b
3 changed files with 6 additions and 3 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "sqliteviz", "name": "sqliteviz",
"version": "0.22.0", "version": "0.23.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "sqliteviz", "name": "sqliteviz",
"version": "0.22.0", "version": "0.23.0",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"codemirror": "^5.57.0", "codemirror": "^5.57.0",

View File

@@ -74,6 +74,9 @@ export default {
if (dataFormat === 'sqlite') { if (dataFormat === 'sqlite') {
await this.getSqliteDb(dataUrl) await this.getSqliteDb(dataUrl)
} else {
this.dataMsg.message = 'Unknown data format'
this.dataMsg.type = 'error'
} }
// Loading indicator is not needed anymore // Loading indicator is not needed anymore

View File

@@ -36,7 +36,7 @@ export default {
}, },
async beforeCreate () { async beforeCreate () {
const schema = this.$store.state.db.schema const schema = this.$store.state.db.schema
if (!schema || schema.length === 0) { if ((!schema || schema.length === 0) && this.$store.state.tabs.length === 0) {
const stmt = [ const stmt = [
'/*', '/*',
' * Your database is empty. In order to start building charts', ' * Your database is empty. In order to start building charts',