update a lot of change since a while

This commit is contained in:
2026-01-22 10:29:36 +01:00
parent a4dcb95d83
commit e1c1475f10
78 changed files with 4200 additions and 534 deletions

17
app/utils/clientLog.js Normal file
View File

@@ -0,0 +1,17 @@
const ALLOWED_LEVELS = ['info', 'warn', 'error'];
export async function clientLog(level, message, meta = {}) {
if (!ALLOWED_LEVELS.includes(level)) {
console.warn('clientLog: invalid level, fallback to info', level);
level = 'info';
}
try {
await $fetch('/api/log', {
method: 'POST',
body: { level, message, meta }
});
} catch (e) {
console.error('Failed to send client log', e);
}
}