refactor: Update lowLevelAccess check in importCharacterCardSpec

This commit is contained in:
kwaroran
2024-05-29 18:34:57 +09:00
parent f1777aba2c
commit 2870fb2238
2 changed files with 10 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
import { language } from "src/lang"
import { alertError, alertNormal } from "../alert"
import { alertConfirm, alertError, alertNormal } from "../alert"
import { DataBase, setDatabase, type customscript, type loreBook, type triggerscript } from "../storage/database"
import { downloadFile } from "../storage/globalApi"
import { get } from "svelte/store"
@@ -45,6 +45,13 @@ export async function importModule(){
return
}
importData.id = v4()
if(importData.lowLevelAccess){
const conf = await alertConfirm(language.lowLevelAccessConfirm)
if(!conf){
return false
}
}
db.modules.push(importData)
setDatabase(db)
return