refactor: remove developer mode and related components

add glowing effect component for tab tiles
improve tab tile appearance with new glow effect
add 'none' log level and simplify log level handling
simplify tab configuration store by removing developer tabs
remove useDebugStatus hook and related debug functionality
remove system info endpoints no longer needed
This commit is contained in:
KevIsDev
2025-07-01 14:26:42 +01:00
parent 7ce263e0f5
commit 46611a8172
23 changed files with 369 additions and 5602 deletions

View File

@@ -1,4 +1,4 @@
export type DebugLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error';
export type DebugLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'none';
import { Chalk } from 'chalk';
const chalk = new Chalk({ level: 3 });
@@ -14,7 +14,7 @@ interface Logger {
setLevel: (level: DebugLevel) => void;
}
let currentLevel: DebugLevel = (import.meta.env.VITE_LOG_LEVEL ?? import.meta.env.DEV) ? 'debug' : 'info';
let currentLevel: DebugLevel = import.meta.env.VITE_LOG_LEVEL || (import.meta.env.DEV ? 'debug' : 'info');
export const logger: Logger = {
trace: (...messages: any[]) => log('trace', undefined, messages),
@@ -45,12 +45,17 @@ function setLevel(level: DebugLevel) {
}
function log(level: DebugLevel, scope: string | undefined, messages: any[]) {
const levelOrder: DebugLevel[] = ['trace', 'debug', 'info', 'warn', 'error'];
const levelOrder: DebugLevel[] = ['trace', 'debug', 'info', 'warn', 'error', 'none'];
if (levelOrder.indexOf(level) < levelOrder.indexOf(currentLevel)) {
return;
}
// If current level is 'none', don't log anything
if (currentLevel === 'none') {
return;
}
const allMessages = messages.reduce((acc, current) => {
if (acc.endsWith('\n')) {
return acc + current;