[fix] file sync login

This commit is contained in:
kwaroran
2023-06-30 16:44:20 +09:00
parent 7eb6907eef
commit c2648477d2
5 changed files with 76 additions and 27 deletions

View File

@@ -3,7 +3,7 @@ import { sleep } from "./util"
import { language } from "../lang"
interface alertData{
type: 'error'| 'normal'|'none'|'ask'|'wait'|'selectChar'|'input'|'toast'|'wait2'|'markdown'|'select'
type: 'error'| 'normal'|'none'|'ask'|'wait'|'selectChar'|'input'|'toast'|'wait2'|'markdown'|'select'|'login'
msg: string
}
@@ -29,6 +29,21 @@ export function alertNormal(msg:string){
})
}
export async function alertLogin(){
alertStore.set({
'type': 'login',
'msg': 'login'
})
while(true){
if (get(alertStore).type === 'none'){
break
}
await sleep(10)
}
return get(alertStore).msg
}
export async function alertSelect(msg:string[]){
alertStore.set({
'type': 'select',