migrating vendor frontend to new architecture

This commit is contained in:
2025-10-28 22:58:55 +01:00
parent b0cc0385f8
commit cd5097fc04
28 changed files with 312 additions and 228 deletions

View File

@@ -1,14 +1,8 @@
// static/admin/js/icons-page.js
// Setup logging
const ICONS_PAGE_LOG_LEVEL = 3;
const iconsLog = {
error: (...args) => ICONS_PAGE_LOG_LEVEL >= 1 && console.error('❌ [ICONS PAGE ERROR]', ...args),
warn: (...args) => ICONS_PAGE_LOG_LEVEL >= 2 && console.warn('⚠️ [ICONS PAGE WARN]', ...args),
info: (...args) => ICONS_PAGE_LOG_LEVEL >= 3 && console.info(' [ICONS PAGE INFO]', ...args),
debug: (...args) => ICONS_PAGE_LOG_LEVEL >= 4 && console.log('🔍 [ICONS PAGE DEBUG]', ...args)
};
// ✅ Use centralized logger - ONE LINE!
// Create custom logger since icons page is not pre-configured
const iconsLog = window.LogConfig.createLogger('ICONS');
/**
* Icons Browser Alpine.js Component
@@ -60,9 +54,14 @@ function adminIcons() {
}
window._iconsPageInitialized = true;
const startTime = performance.now();
// Load icons from global Icons object
this.loadIcons();
const duration = performance.now() - startTime;
window.LogConfig.logPerformance('Icons Page Init', duration);
iconsLog.info('=== ICONS PAGE INITIALIZATION COMPLETE ===');
},
@@ -169,7 +168,7 @@ function adminIcons() {
Utils.showToast(`'${iconName}' code copied!`, 'success');
iconsLog.debug('Icon usage code copied:', iconName);
} catch (error) {
iconsLog.error('Failed to copy code:', error);
window.LogConfig.logError(error, 'Copy Icon Usage');
Utils.showToast('Failed to copy code', 'error');
}
},
@@ -183,7 +182,7 @@ function adminIcons() {
Utils.showToast(`'${iconName}' copied!`, 'success');
iconsLog.debug('Icon name copied:', iconName);
} catch (error) {
iconsLog.error('Failed to copy name:', error);
window.LogConfig.logError(error, 'Copy Icon Name');
Utils.showToast('Failed to copy name', 'error');
}
},