ayushsharma82 / ESP-DASH

Blazing fast library to create a functional dashboard for ESP8266 / ESP32
https://espdash.pro
GNU General Public License v3.0
976 stars 200 forks source link

LinkCard + FileUploadCard #188

Closed mathieucarbou closed 11 months ago

mathieucarbou commented 11 months ago

LinkCard screenshot:

image

card.update("/page")
card.update("https://link.to.org.com")

Note 1: We could also have a LinkTab variant (for pro)

Note 2: I did not generate the web page on purpose to let you decide if this can go OSS or not. I have implemented it in both because I think navigation to other useful components like ElegantOTA and WebSerial lacks a lot.

mathieucarbou commented 11 months ago

Added FileUploadCard image

Card _configRestore = Card(&_dashboard, FILE_UPLOAD_CARD, "Configuration Restore", ".txt");

_configRestore.update("/api/config/restore");

Note: /api/config/restore is handled in the app with ESPAyncWebServer. ESP-DASH is not responsible to setup the endpoint and handle the fiel upload. ESP-DAHS just sends the submitted file to the configured endpoint.