-
- Downloads
feat: Add image error handling and improve styles
- Added a new `addErrorHandler` method in `html.mjs` to handle missing images by providing a fallback placeholder and applying CSS classes for error styling. This ensures a smoother user experience when images fail to load. - Updated the `getTemplate` method in `html.mjs` to utilize the new `addErrorHandler` method, thereby enhancing functionality with error management integrated directly in the HTML assembly. - Refactored the `initEventHandler` method in `message.mjs` to directly set content options without unnecessary delays, which improves content rendering and responsiveness. - Enhanced CSS transitions in `html.pcss` and `message.pcss`, ensuring images and divs smoothly transition, which enhances visual appeal during UI updates. - Changed a background color in `html.pcss` to provide better contrast and visual clarity.
Showing
- source/components/content/viewer/html.mjs 28 additions, 1 deletionsource/components/content/viewer/html.mjs
- source/components/content/viewer/message.mjs 4 additions, 7 deletionssource/components/content/viewer/message.mjs
- source/components/content/viewer/style/html.pcss 9 additions, 0 deletionssource/components/content/viewer/style/html.pcss
- source/components/content/viewer/style/message.pcss 5 additions, 0 deletionssource/components/content/viewer/style/message.pcss
- source/components/content/viewer/stylesheet/html.mjs 1 addition, 1 deletionsource/components/content/viewer/stylesheet/html.mjs
- source/components/content/viewer/stylesheet/message.mjs 1 addition, 1 deletionsource/components/content/viewer/stylesheet/message.mjs
Loading
Please register or sign in to comment