feat: Implement Discord app UI and settings management
- Added MainUI class for displaying voice state, status icon, and buttons. - Introduced MainUIHandler to manage UI interactions and bridge communication. - Created SettingsUI for displaying QR code and configuration instructions. - Implemented SettingsUIHandler to manage settings and web server interactions. - Developed WebHandler for handling HTTP requests for settings configuration. - Updated AppRegistry to initialize with the new Discord app descriptor. - Enhanced InteractionHandler to support keyboard interactions across app switches. - Updated UIHandler to manage app switching and rendering of app icons. - Enabled QR code support in LVGL configuration.
This commit is contained in:
@@ -53,13 +53,13 @@ public:
|
||||
* @brief Switch to a new app by its descriptor
|
||||
*
|
||||
* Deinitializes the current app (if any), initializes the new app,
|
||||
* and updates the display. Holds shared ownership of the descriptor
|
||||
* to ensure the app remains valid while active.
|
||||
* and updates the display. The descriptor must remain valid in the
|
||||
* AppRegistry for the lifetime of the app.
|
||||
*
|
||||
* @param app_descriptor Shared pointer to the app descriptor
|
||||
* @param app_descriptor Pointer to the app descriptor (managed by AppRegistry)
|
||||
* @return ESP_OK on success, error code otherwise
|
||||
*/
|
||||
esp_err_t switch_app(std::shared_ptr<AppDescriptor> app_descriptor);
|
||||
esp_err_t switch_app(AppDescriptor* app_descriptor);
|
||||
|
||||
/**
|
||||
* @brief Display shutdown screen
|
||||
@@ -114,5 +114,5 @@ private:
|
||||
|
||||
lv_obj_t* main_screen_ = nullptr; ///< Root screen
|
||||
RootLayout root_layout_; ///< Main screen layout manager
|
||||
std::shared_ptr<AppDescriptor> active_descriptor_ = nullptr; ///< Currently active app descriptor (shared ownership)
|
||||
AppDescriptor* active_descriptor_ = nullptr; ///< Currently active app descriptor (managed by AppRegistry)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user