feat: first run download db

This commit is contained in:
TaurusXin 2024-07-24 16:33:05 +08:00
parent 29b7366727
commit b4e520958f
2 changed files with 6 additions and 1 deletions

View File

@ -65,7 +65,7 @@ const Panel: React.FC = () => {
} else { } else {
setCheckDisabled(true) setCheckDisabled(true)
setMacInputDisabled(true) setMacInputDisabled(true)
// download setIsOpen(true)
} }
}) })
}, []) }, [])
@ -213,6 +213,8 @@ const Panel: React.FC = () => {
if (res) { if (res) {
QueryVersion().then(res => { QueryVersion().then(res => {
setDatabaseDate(res) setDatabaseDate(res)
setMacInputDisabled(false)
setCheckDisabled(false)
}) })
} }
}) })

View File

@ -66,6 +66,9 @@ func (helper *SQLiteHelper) InitSQLiteHelper() bool {
} }
func (helper *SQLiteHelper) Close() { func (helper *SQLiteHelper) Close() {
if helper.db == nil {
return
}
helper.db.Close() helper.db.Close()
} }