Commit Graph

71 Commits

Author SHA1 Message Date
Lukas Bachschwell e1fe13bac6
Implement LITTLEFS as requested by @thomastech in #144
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
2022-01-04 11:35:43 +01:00
Ian Gray 232ca3ead4
Support for dynamic custom inline styling.
Adds two functions in ESPUI.h:
setPanelStyle()
setElementStyle()
These allow for custom inline CSS styles to be applied to the panel and to
the specific UI element repectively.

For example:

```
char stylecol1[30]
sprintf(stylecol1, "background-color: #%06X;", (unsigned int) random(0x0, 0xFFFFFF));
ESPUI.setPanelStyle(switch1, stylecol1);
```
This will set the panel of the given control to a random hex colour.

This is supported by both the initial UI message, and by control update messages, so you
can change these styles dynamically in response to other events.

setElementStyle() is not perfect. Because CSS inline styles can only style one specific
DOM element, for controls made up of multiple elements (like the "pad") this is limited.
I have tried to make an appropriate choice for each supported control.
2022-01-03 13:06:55 +01:00
Ian Gray 06460fcc4d
Chunk updates 2022-01-03 13:06:33 +01:00
Lukas Bachschwell c66f528702
Send visibility
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
2021-10-29 19:47:46 +02:00
Lukas Bachschwell aa03c1683d
Add Port Option
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
2021-10-29 19:37:56 +02:00
Lukas Bachschwell b71bc81c0d
Fixing rebase errors with littlefs/debug refactor
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
2020-10-18 11:06:38 +02:00
Lukas Bachschwell a6ddd48abb
Fix all other occurences
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
2020-10-17 22:46:22 +02:00
Lukas Bachschwell 3cf1aa7f49
Fix littleFS does not exist on esp32
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
2020-10-16 14:47:29 +02:00
Lukas Bachschwell 313a069d4c
Change idcounter to start at 1, closes #95 2020-10-02 19:08:45 +02:00
ericBcreator 57a81dbee3
Update ESPUI.cpp 2020-10-01 18:51:54 +02:00
Moritz Wirger 6b2ef81b12 Fix include of ESPUI header 2020-10-01 18:04:28 +02:00
Moritz Wirger 1e5ee117c5 Use DEBUG_ESPUI to en/disable debug code from being compiled
Include clang-format file for formatting code and format code
2020-10-01 18:04:28 +02:00
Moritz Wirger db4164f621 Reduce heap usage by using F and PSTR 2020-10-01 18:04:28 +02:00
Moritz Wirger bfd645d7a1 Use const String& to reduce IROM usage 2020-10-01 18:04:28 +02:00
Lukas Bachschwell cda1a573d6
cleanup
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
2020-08-26 22:16:02 +02:00
Lukas Bachschwell eec13e4934
No reload per default, just send JsonDom 2020-08-26 22:15:56 +02:00
ruslan.teliuk@aspose.com 81366af7f1
Add remControl() method for remove contols 2020-08-26 22:13:38 +02:00
Bastien fffe4a8641 Update filesystem from deprecated SPIFFS to LittleFS 2020-06-30 12:39:51 +02:00
Lukas Bachschwell 9764db9789
Increase timeout for connecting existing network and add continuous slider mode #60 2019-12-28 14:54:41 +01:00
Lukas Bachschwell fe45ed8010
#63 Add variables for jsonDynamicDocument Sizes 2019-12-27 16:27:42 +01:00
Lukas Bachschwell 79f509da74 #10 Graph points working
- timestap still not great
2019-04-15 15:32:14 +02:00
Lukas Bachschwell bff259008f Graph Frontend work
- Adds graph js file
- Adds graph styles
2019-04-15 13:49:15 +02:00
Lukas Bachschwell 36cfe78205 Knowing websocket msg string length 2019-04-15 12:41:22 +02:00
Lukas Bachschwell 2c6aaf82f4 two strings less 2019-04-15 12:38:09 +02:00
Lukas Bachschwell 043ba99ea9 Adding basic structure for new widgets 2019-03-26 16:22:21 +01:00
Lukas Bachschwell 3c69f013fc Proper wrappers
- update order of params of create functions to be simillar
- changed all numbers to be numbers
- split pad creation function
- updated examples
2019-03-24 19:18:53 +01:00
Lukas Bachschwell 650411bac4 Consistent use of updateControl on websocket event
- rename updateControl to updateControlValue
- some earlie returns
2019-03-24 18:46:34 +01:00
Lukas Bachschwell 218ebc67d9 Style change again 2019-03-24 18:10:21 +01:00
Lukas Bachschwell 63b6761044 Cleanup and reformat header
- Construct inside library
- Adds setVerbosity
2019-03-24 16:06:35 +01:00
Lukas Bachschwell b9a087c169 Use ArduinoJson 6.10.0 2019-03-24 15:44:27 +01:00
Christian Riggenbach 6873052b6e Added new features, removed dependency on unique labels
- added Min/Max/Step for numbers and sliders
- labels don't have to be unique anymore; controls can't be updated by labels
- new Slider: JS + CSS
2019-03-19 09:34:16 +01:00
Christian Riggenbach 7125374fa3 Color of elementes are now updateable, reformatted control.js 2019-03-08 22:24:20 +01:00
Christian Riggenbach b987828a25 Preselect the right option in the select-input 2019-03-06 00:18:19 +01:00
Christian Riggenbach d0c59ac659 Small bug: don't set the type to Button in ESPUIClass::slider() 2019-03-04 21:08:52 +01:00
Christian Riggenbach 6178e4fc22 Added the dropdown-Control
* added the Control
* added the frontend-code
* added the control to the examples "gui-newAPI.ino" and "tabbedGui.ino"
2019-03-04 21:07:39 +01:00
Christian Riggenbach 3c42b43fe6 Changed signature of the callback
Call the callback with a pointer instead of a copy of the Control.
Changed all the examples
2019-03-04 21:05:13 +01:00
Christian Riggenbach 4ea7928fd5 Added Tabbed View
* new member of Control: parentControl
* changed addControl() to add children of elements
* added some styles in the css
* two new divs in index.html
* added frontend code to controls.js
* added new demo to demonstrate the tabbed view
2019-03-03 23:33:15 +01:00
Christian Riggenbach 50de3dad87 Added tabbedcontent.js (from https://github.com/elboletaire/tabbedcontent) 2019-03-03 23:27:11 +01:00
Christian Riggenbach acce17b82c IDs are uint16_t, removed not used member ESPUIClass::cIndex 2019-03-03 23:27:11 +01:00
Christian Riggenbach a4989b4eb0 Reordered arguments of ESPUIClass::addControl
The arguments value, color and callback have defaults
2019-03-03 21:50:06 +01:00
Christian Riggenbach 37ce571b9c added ESPUI::updateLabel (works like ESPUI::print) 2019-03-03 21:46:38 +01:00
Christian Riggenbach 8865416331 Updated API
* Sourcecode reindented/reformated, added scopes to all the ifs
* Linked list for holding all the controls
* IDs are autogenerated, Control is now a class
* generalised API for creating controls, removed a lot of redundant code
* a lot of glue for the old API
* check if callback exists before calling it
* Instantation moved out of ESPUI.cpp, must be in the users application
* verbose printing on the serial line dependent of instantation ESPUI(...)
* streamlined begin(...), make authentification optional
2019-03-03 21:13:45 +01:00
Lukas Bachschwell 98d1215d7a #44 Adding define to reenable WS BasicAuth 2018-12-27 11:34:28 +01:00
Lukas Bachschwell 7a10457f99 #44 Adding Basic Auth
- Also authing websockets
- Implemented on begin and beginSpiffs
- Added notes to Gui example
2018-12-26 13:38:38 +01:00
Lukas Bachschwell f31575b50c #43 Sending Initial GUI as one big array
- Added new  INITIAL_GUI Type
- spliting GUI Blob to events in controls js
- formating the json in jsonDom into one big array
2018-12-26 12:35:35 +01:00
Felix Eckhardt e9aca78c9c
udpateSlider implementation with label was missing 2018-12-02 11:41:45 +01:00
Lukas Bachschwell 7d46a4de96 #9 #21 Adds Text input / Number input Support
also loads of reformating
2018-11-26 18:25:10 +01:00
wvdv2002 600e46c457 refactored debug define into DEBUG_ESPUI 2018-07-03 17:43:58 +02:00
Lukas Bachschwell e771320e6a #9 adjusting labels for wraping
renaming datafiles
going on for numbers
2018-05-27 11:47:53 +02:00
Lukas Bachschwell cb5f00cbc0 Adding Backendcode for #10 graph and #9 number controls 2018-05-27 10:42:29 +02:00