[feat] added license

This commit is contained in:
kwaroran
2023-07-19 22:01:23 +09:00
parent dfc27df7c7
commit 07f6117a01
13 changed files with 269 additions and 106 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'
type: 'error'| 'normal'|'none'|'ask'|'wait'|'selectChar'|'input'|'toast'|'wait2'|'markdown'|'select'|'login'|'tos'
msg: string
}
@@ -78,6 +78,15 @@ export function alertToast(msg:string){
})
}
export function alertWait(msg:string){
alertStore.set({
'type': 'wait',
'msg': msg
})
}
export async function alertSelectChar(){
alertStore.set({
'type': 'selectChar',
@@ -111,6 +120,32 @@ export async function alertConfirm(msg:string){
return get(alertStore).msg === 'yes'
}
export async function alertTOS(){
// if(localStorage.getItem('tos') === 'true'){
// return true
// }
alertStore.set({
'type': 'tos',
'msg': 'tos'
})
while(true){
if (get(alertStore).type === 'none'){
break
}
await sleep(10)
}
if(get(alertStore).msg === 'yes'){
localStorage.setItem('tos', 'true')
return true
}
return false
}
export async function alertInput(msg:string){
alertStore.set({