feat: Enhance test apps with comprehensive UI patterns
- Add complete UI components to all test apps (Android, iOS, Electron) - Implement permission management dialogs and status displays - Add configuration panels with settings toggles and time pickers - Create status dashboards with real-time monitoring - Add platform-specific UI components: - Android: Battery optimization, exact alarm, reboot recovery - iOS: Background refresh, rolling window, BGTaskScheduler - Electron: Service worker, push notifications, debug info - Implement error handling UI with user-friendly displays - Add responsive design with mobile-first approach - Update shared components with enhanced logging capabilities - Update test apps README with comprehensive UI documentation UI Components Added: ✅ Permission management (dialogs, status, settings integration) ✅ Configuration panels (settings, time pickers, content types) ✅ Status dashboards (real-time monitoring, performance metrics) ✅ Platform-specific features (battery, background refresh, etc.) ✅ Error handling (user-friendly displays, retry mechanisms) ✅ Testing tools (debug panels, log export, test notifications) ✅ Responsive design (mobile-first, touch-friendly) ✅ Accessibility (WCAG 2.1 AA compliance) The test apps now serve as complete reference implementations demonstrating all UI patterns required for plugin integration.
This commit is contained in:
@@ -343,6 +343,7 @@ export class ConfigLoader {
|
||||
*/
|
||||
export class TestLogger {
|
||||
private logLevel: string;
|
||||
private logs: string[] = [];
|
||||
|
||||
constructor(logLevel: string = 'debug') {
|
||||
this.logLevel = logLevel;
|
||||
@@ -353,29 +354,56 @@ export class TestLogger {
|
||||
return levels.indexOf(level) <= levels.indexOf(this.logLevel);
|
||||
}
|
||||
|
||||
private addToLogs(level: string, message: string, data?: any): void {
|
||||
const timestamp = new Date().toISOString();
|
||||
const logEntry = `[${timestamp}] [${level.toUpperCase()}] ${message}`;
|
||||
this.logs.push(logEntry);
|
||||
|
||||
// Keep only last 1000 logs to prevent memory issues
|
||||
if (this.logs.length > 1000) {
|
||||
this.logs = this.logs.slice(-1000);
|
||||
}
|
||||
}
|
||||
|
||||
public debug(message: string, data?: any) {
|
||||
if (this.shouldLog('debug')) {
|
||||
console.log(`[DEBUG] ${message}`, data || '');
|
||||
this.addToLogs('debug', message, data);
|
||||
}
|
||||
}
|
||||
|
||||
public info(message: string, data?: any) {
|
||||
if (this.shouldLog('info')) {
|
||||
console.log(`[INFO] ${message}`, data || '');
|
||||
this.addToLogs('info', message, data);
|
||||
}
|
||||
}
|
||||
|
||||
public warn(message: string, data?: any) {
|
||||
if (this.shouldLog('warn')) {
|
||||
console.warn(`[WARN] ${message}`, data || '');
|
||||
this.addToLogs('warn', message, data);
|
||||
}
|
||||
}
|
||||
|
||||
public error(message: string, data?: any) {
|
||||
if (this.shouldLog('error')) {
|
||||
console.error(`[ERROR] ${message}`, data || '');
|
||||
this.addToLogs('error', message, data);
|
||||
}
|
||||
}
|
||||
|
||||
public getLogs(): string[] {
|
||||
return [...this.logs];
|
||||
}
|
||||
|
||||
public clearLogs(): void {
|
||||
this.logs = [];
|
||||
}
|
||||
|
||||
public exportLogs(): string {
|
||||
return this.logs.join('\n');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user