Skip to content

Conversation

@flattermann
Copy link
Collaborator

This PR adds new endpoints needed for the upcoming Clock repo.

Introduced `apiMode` parameter for `handleEndpointFetchFilesFromURL` to allow CORS headers and custom behavior when accessed via API. Added new endpoints `/fetchFromUrlByApi` and `/ping` to support API functionality with appropriate CORS handling. Updated watchdog resets and provided cleaner responses for API integrations.
The clock repo can open this page in a new window (to circumvent mixed content problems). The page will be closed automatically.
Extended `handleEndpointFetchFilesFromURLAction` to accept `clockName` and `authorName` parameters, allowing customization of displayed text during download. Adjusted corresponding calls and added logic to conditionally render the new details on the screen. Also updated font sizes to improve readability.
Added more comprehensive screen updates for multi-screen display during downloads, along with progress messages. Enhanced file handling by introducing temporary files and ensuring proper renaming or cleanup to prevent incomplete downloads.
Introduced `m_forceNextDraw` to control forced screen redrawing during clock type changes, improving display handling. Enhanced `changeClockType` to accept an optional parameter for explicit clock type selection and added logging for better debugging. These changes improve clarity, flexibility, and maintainability of the clock widget code.
Introduced `getWidgetByName` to retrieve a widget using its name and `switchToWidgetByName` to change the current widget by name. These additions enhance lookup and navigation capabilities within the widget set.
Added support for detecting and transforming GitHub URLs to raw content links. Enhanced progress display during file downloads and integrated support for selecting and switching to custom clock types upon successful download. Fixed minor bugs in URL and directory management for improved reliability.
This ensures the widget cycle delay is properly reinitialized when switching to the Clock widget. It prevents potential timing issues caused by outdated cycle delay values.
Enhanced the ClockWidget to allow setting second hand and override colors for custom clocks. Introduced helper functions for clean configuration key generation, added API for updating configurations, and extended logging to reflect color settings. These changes provide a more flexible and user-configurable clock system.
Simplified and streamlined the rendering flow when displaying clockface downloads. Improved clarity by consolidating conditions and ensuring proper screen updates based on clockName, authorName, and customClock values. This reduces redundancy and enhances maintainability.
Extended `ConfigManager` to update corresponding `WiFiManagerParameter` values when configuration changes using `setConfig`. Added a new `findParameter` method to locate parameters, along with `setValue` implementations for `StringParameter`, `IntParameter`, `FloatParameter`, and others. Note: Updates for `BoolParameter` and `ComboBoxParameter` are currently placeholders.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant