cotestatnt / esp-fs-webserver

ESP32/ESP8266 webserver, WiFi manager and web editor Arduino library
MIT License
117 stars 28 forks source link

Bool options are not saved #19

Closed Blueforcer closed 1 year ago

Blueforcer commented 1 year ago

bool options, wich will be displayed as switches image

are not saved into the config.json. after i hit "save configuration" i check the config.json and the value is always false

cotestatnt commented 1 year ago

You are right @Blueforcer

I'm sorry, but this is a bug introduced with new setup UI because I have accidentally deleted a row of code. I will fix it immediatly and then I will draft a new release.

cotestatnt commented 1 year ago

Hi @Blueforcer I've just pushed the bugfix and some other functions for the /setup page (upload you custom logo file just clicking on default Espressif logo).

I want to do some more tests before drafting a new release, but if you want to fix this bug just overwrite the setup_htm.h file with the new one uploaded to Github.

Blueforcer commented 1 year ago

youre pretty fast man! i think i can wait until next release. Btw is it possible to get a dropdown as an option? :-)

cotestatnt commented 1 year ago

Btw is it possible to get a dropdown as an option? :-)

This is a feature I had already thought about, but it needs some work because the list can be of different data types. I'll probably implement a version that allows you to use only strings or at most strings and numbers as the return value.

Blueforcer commented 1 year ago

Strings are fine, or maybe just saving the selected index? Then the user can compare whatever he likes.

cotestatnt commented 1 year ago

Goodmorning @Blueforcer The new release contains bug fix and the new method for dropdown listbox (only string values for the moment).

https://github.com/cotestatnt/esp-fs-webserver/releases/tag/1.2.0

Blueforcer commented 1 year ago

Oh boy, that was damn fast! Nice work!

cotestatnt commented 1 year ago

It was easier than i thought :)