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',

View File

@@ -39,6 +39,7 @@ export const CurrentShowMemoryLimit = writable(db.showMemoryLimit)
export const ShowVN = writable(false)
export const SettingsMenuIndex = writable(-1)
export const CurrentVariablePointer = writable({} as {[key:string]: string|number|boolean})
export const OpenRealmStore = writable(false)
function createSimpleCharacter(char:character|groupChat){
if((!char) || char.type === 'group'){