Commit Graph
7 Commits
Author SHA1 Message Date
Dariusz L dc1bde6231 refactor: use canonical logging imports 2026-08-13 01:16:42 +02:00
Dariusz L f8137a57a7 refactor: add CONFIG and context menu support to notification toast system
- Add centralized CONFIG object with PROJECT_NAME, PROJECT_ICON, CSS_PREFIX,
  LOGGER_NAME, and SHARED_CONTAINER_ID to prevent hardcoded values
- Refactor showNotification to accept both legacy (backgroundColor, duration, type)
  and new (options object) signatures for backward compatibility
- Replace hardcoded CSS IDs and keyframe names with CONFIG-prefixed variants
- Change notification container layout from row-reverse to column for proper stacking
- Add context menu binding support via contextMenuModel and contextMenuTooltip options
- Extract SVG icons into dedicated iconSVGs record/object
- Fix wrapper functions (showSuccessNotification, showErrorNotification etc.) to
  pass type as first argument instead of undefined
- Increase container z-index to 100005 to appear above modal overlays
- Remove unused lf-progress and lf-progress-rewind keyframes
2026-06-30 01:39:23 +02:00
Dariusz L d0b7261671 Refactor notification progress to use requestAnimationFrame and fix db imports
- Replace CSS animation-based notification progress bar with requestAnimationFrame-driven animation
- Centralize getCanvasState/setCanvasState imports at top-level in CanvasView (remove dynamic import())
- Clean up animation frame lifecycle tracking to prevent orphaned rAF callbacks
- Set local debug log level in python/config.py for development diagnostics
2026-06-30 00:27:52 +02:00
Dariusz L 868221b285 feat: add notification system with deduplication
Implemented a comprehensive notification system with smart deduplication for LayerForge's "Paste Image" operations. The system prevents duplicate error/warning notifications while providing clear feedback for all clipboard operations including success, failure, and edge cases.
2025-08-14 14:30:51 +02:00
Dariusz L 5e9869f827 Refactor notifications and improve matting UX
Refactored notification utilities for a more modern, reusable notification system and added info/success/error notifications to the background removal (matting) workflow. Removed the custom error dialog in favor of notifications, and exposed all notification types for debugging. Updated imports and cleaned up notification-related code.
2025-07-28 00:58:04 +02:00
Dariusz L bfea0cdbab Enhance notification system and auto-correct node_id
Adds a modern, type-based notification UI with support for success, error, info, warning, and alert styles, including a new showAlertNotification function. CanvasState now auto-corrects the node_id widget before saving state and notifies the user if a correction occurs. CanvasView centering logic now uses the actual canvas container for more accurate viewport adjustments.
2025-07-28 00:28:15 +02:00
Dariusz L 7e71d3ec3e Refactor image, mask, and notification logic into utils
Extracted image upload, mask processing, notification, and preview update logic into dedicated utility modules. Updated MaskEditorIntegration and SAMDetectorIntegration to use these new utilities, reducing code duplication and improving maintainability.
2025-07-27 18:19:35 +02:00