Refactor preset handling and improve database snapshot logic

This commit is contained in:
Kwaroran
2024-12-26 03:18:00 +09:00
parent d7f376b8db
commit c6cc258a50
4 changed files with 12 additions and 11 deletions

View File

@@ -1625,15 +1625,16 @@ export async function downloadPreset(id:number, type:'json'|'risupreset'|'return
'risupreset'
)
}))
const buf2 = await encodeRPack(buf)
if(type === 'risupreset'){
const buf2 = await encodeRPack(buf)
downloadFile(pres.name + "_preset.risup", buf2)
}
else{
return {
data: pres,
buf
buf: buf2
}
}