1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 10:38:54 +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

@@ -4,6 +4,7 @@ import Workspace from '@/views/Main/Workspace'
import Inquiries from '@/views/Main/Inquiries'
import Welcome from '@/views/Welcome'
import Main from '@/views/Main'
import LoadView from '@/views/LoadView'
import store from '@/store'
import database from '@/lib/database'
@@ -31,6 +32,11 @@ const routes = [
component: Inquiries
}
]
},
{
path: '/load',
name: 'Load',
component: LoadView
}
]
@@ -39,7 +45,7 @@ const router = new VueRouter({
})
router.beforeEach(async (to, from, next) => {
if (!store.state.db) {
if (!store.state.db && to.name !== 'Load') {
const newDb = database.getNewDatabase()
await newDb.loadDb()
store.commit('setDb', newDb)