replacing site-local error display by global error display

This commit is contained in:
2025-09-26 15:27:20 +02:00
parent 2a6392cd2b
commit e3b735bb7b
16 changed files with 62 additions and 66 deletions

View File

@@ -1,11 +1,16 @@
export const messages = $state({error:null,warning:null});
export function error(msg){
messages.error = msg;
async function process(msg){
if (msg instanceof Response) return await msg.text();
return msg;
}
export function warn(msg){
messages.warning = msg;
export async function error(msg){
messages.error = await process(msg);
}
export async function warn(msg){
messages.warning = await process(msg);
}
export function yikes(){