1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 02:28:54 +08:00

add tests for isTabNeedName

This commit is contained in:
lana-k
2021-01-13 21:12:16 +01:00
parent 33a9b261bf
commit 3168c77c17
2 changed files with 26 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ export default {
isTabNeedName (queryTab) {
const isFromScratch = !queryTab.initName
return isFromScratch || queryTab.isPredefined
return queryTab.isPredefined || isFromScratch
},
save (queryTab, newName) {
@@ -74,7 +74,7 @@ export default {
// Create downloader
const downloader = document.createElement('a')
downloader.hidden = true
document.body.appendChild(downloader)
document.body.append(downloader)
// Prepare data
const name = data.name || 'My sqlitevis queries'
@@ -137,7 +137,7 @@ export default {
reader.readAsText(file)
})
document.body.appendChild(uploader)
document.body.append(uploader)
}
uploader.click()
}