@bitblit/asyncglk
Version:
A Typescript Glk library
43 lines (38 loc) • 845 B
JavaScript
/*
Common implementations
======================
Copyright (c) 2024 Dannii Willis
MIT licenced
https://github.com/curiousdannii/asyncglk
*/
//import AlertDialog from './ui/AlertDialog.svelte'
export const ALERT_MODE_ALERT = 0;
export const ALERT_MODE_CONFIRM = 1;
export const ALERT_MODE_PROMPT = 2;
export class NullProvider {
browseable = false;
next = this;
async delete(_path) { }
async exists(_path) {
return null;
}
async read(_path) {
return null;
}
async write(_files) { }
}
export async function show_alert(title, message) {
/*
const alert = new AlertDialog({
target: document.body,
props: {
message,
mode: ALERT_MODE_ALERT,
title,
},
})
await alert.open()
alert.$destroy()
*/
alert(message);
}