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

remove saveDbName method (refactor)

This commit is contained in:
lana-k
2020-12-27 18:03:04 +01:00
parent 1150b2e7c4
commit 34764a6e33
5 changed files with 11 additions and 13 deletions

View File

@@ -53,7 +53,8 @@ export default new Vuex.Store({
predefinedQueries: []
},
mutations: {
saveSchema (state, schema) {
saveSchema (state, { dbName, schema }) {
state.dbName = dbName
const parsedSchema = []
schema.forEach(item => {
parsedSchema.push({
@@ -66,9 +67,6 @@ export default new Vuex.Store({
saveDbFile (state, file) {
state.dbFile = file
},
saveDbName (state, name) {
state.dbName = name
},
addTab (state, tab) {
// add new tab only if was not already opened
if (!state.tabs.some(openedTab => openedTab.id === tab.id)) {