Add new character addition screen

This commit is contained in:
kwaroran
2024-04-11 01:07:22 +09:00
parent a750e39674
commit fb058c430f
6 changed files with 116 additions and 19 deletions

View File

@@ -6,7 +6,7 @@ import { Capacitor } from "@capacitor/core"
import { DataBase, type MessageGenerationInfo } from "./storage/database"
interface alertData{
type: 'error'| 'normal'|'none'|'ask'|'wait'|'selectChar'|'input'|'toast'|'wait2'|'markdown'|'select'|'login'|'tos'|'cardexport'|'requestdata'
type: 'error'| 'normal'|'none'|'ask'|'wait'|'selectChar'|'input'|'toast'|'wait2'|'markdown'|'select'|'login'|'tos'|'cardexport'|'requestdata'|'addchar'
msg: string,
submsg?: string
}
@@ -57,6 +57,21 @@ export async function alertNormalWait(msg:string){
}
}
export async function alertAddCharacter() {
alertStore.set({
'type': 'addchar',
'msg': language.addCharacter
})
while(true){
if (get(alertStore).type === 'none'){
break
}
await sleep(10)
}
return get(alertStore).msg
}
export async function alertLogin(){
alertStore.set({
'type': 'login',