Add alertNormalWait function to alert.ts and handle tab activation in saveDb function

This commit is contained in:
kwaroran
2024-04-08 22:00:20 +09:00
parent e65785b225
commit 4e8e6a6f70
2 changed files with 33 additions and 1 deletions

View File

@@ -44,6 +44,19 @@ export function alertNormal(msg:string){
})
}
export async function alertNormalWait(msg:string){
alertStore.set({
'type': 'normal',
'msg': msg
})
while(true){
if (get(alertStore).type === 'none'){
break
}
await sleep(10)
}
}
export async function alertLogin(){
alertStore.set({
'type': 'login',