refactor: improve charx loading

This commit is contained in:
kwaroran
2024-06-03 22:13:24 +09:00
parent 725b180094
commit 1e4d372f3b
2 changed files with 78 additions and 17 deletions

View File

@@ -66,12 +66,14 @@ async function importCharacterProcess(f:{
if(f.name.endsWith('charx')){
console.log('reading charx')
const reader = new CharXReader()
alertStore.set({
type: 'wait',
msg: 'Loading... (Reading)'
})
await reader.read(f.data)
const reader = new CharXReader()
await reader.read(f.data, {
alertInfo: true
})
const cardData = reader.cardData
if(!cardData){
alertError(language.errors.noData)