feat: add module apply
This commit is contained in:
@@ -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'|'addchar'|'hypaV2',
|
||||
type: 'error'| 'normal'|'none'|'ask'|'wait'|'selectChar'|'input'|'toast'|'wait2'|'markdown'|'select'|'login'|'tos'|'cardexport'|'requestdata'|'addchar'|'hypaV2'|'selectModule',
|
||||
msg: string,
|
||||
submsg?: string
|
||||
}
|
||||
@@ -269,6 +269,23 @@ export async function alertInput(msg:string){
|
||||
return get(alertStore).msg
|
||||
}
|
||||
|
||||
export async function alertModuleSelect(){
|
||||
|
||||
alertStore.set({
|
||||
'type': 'selectModule',
|
||||
'msg': ''
|
||||
})
|
||||
|
||||
while(true){
|
||||
if (get(alertStore).type === 'none'){
|
||||
break
|
||||
}
|
||||
await sleep(10)
|
||||
}
|
||||
|
||||
return get(alertStore).msg
|
||||
}
|
||||
|
||||
export function alertRequestData(info:AlertGenerationInfoStoreData){
|
||||
alertGenerationInfoStore.set(info)
|
||||
alertStore.set({
|
||||
|
||||
Reference in New Issue
Block a user