Add risu rcc for export

This commit is contained in:
kwaroran
2024-02-02 18:07:03 +09:00
parent f3cb493451
commit bfb6633f89
4 changed files with 196 additions and 15 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'|'login'|'tos'
type: 'error'| 'normal'|'none'|'ask'|'wait'|'selectChar'|'input'|'toast'|'wait2'|'markdown'|'select'|'login'|'tos'|'cardexport'
msg: string
}
@@ -100,6 +100,7 @@ export function alertWait(msg:string){
}
export function alertClear(){
alertStore.set({
'type': 'none',
@@ -140,6 +141,27 @@ export async function alertConfirm(msg:string){
return get(alertStore).msg === 'yes'
}
export async function alertCardExport(){
alertStore.set({
'type': 'cardexport',
'msg': ''
})
while(true){
if (get(alertStore).type === 'none'){
break
}
await sleep(10)
}
return JSON.parse(get(alertStore).msg) as {
type: string,
password: string,
license: string
}
}
export async function alertTOS(){
// if(localStorage.getItem('tos') === 'true'){