mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 17:15:53 +03:00
[GH-ISSUE #415] feature templating #347
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#347
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tablatronix on GitHub (Sep 8, 2017).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/415
I would like to add basic templating , ideas on how to implement welcome.
For starters, modifying http_input string for scan rows, what is the best way ?
A callout on wifiscan, a setter, some other templating method.
This needs to be discussed here, i do not want to have to add support framework for every element we want to allow customized, it will get out of hand, so we need a better mechanism, even callouts for now until we have a templating system.
@tablatronix commented on GitHub (Sep 8, 2017):
adding wifiscan
HTTTP_ITEMtemplate tags{R}RSSI{e}encryption type@tablatronix commented on GitHub (Sep 8, 2017):
Adding some styles

adding callouts, similar to kentaylors branch
Probably gonna remove the success and just have the primary for actions, default for notes, danger for attention
@tzapu commented on GitHub (Sep 9, 2017):
as a mention, there was a very nice pull request around here, using webpack to spit out all the templates needed in a header file. it was cool because it did all the minimising and uglyfying for you.
@tablatronix commented on GitHub (Sep 9, 2017):
I will look around, I only remember the json one but it was bloated with a personal project and jquery
@tzapu commented on GitHub (Sep 13, 2017):
i think this is the one
https://github.com/tzapu/WiFiManager/pull/282
thanks for all your great work
@tablatronix commented on GitHub (Sep 13, 2017):
Ill look it over, ignored that because I only say the translation part.
Adding i18n and externalizing the strings is on roadmap
@JacobBriggsAckama commented on GitHub (Jan 8, 2018):
Would it help if I was to see if I can resolve the merge conflicts in #282 and do some testing? I suppose I could fork this and add the code I need, but that is a code deadend and I'd rather my time be useful :)
@tablatronix commented on GitHub (Jan 8, 2018):
This is on next milestone so not really
@JacobBriggsAckama commented on GitHub (Jan 8, 2018):
okay, I'll fork and work against my own feature, and rework my sketch in the future once this has landed. Thanks for all your hard work @tablatronix
@tablatronix commented on GitHub (Jan 8, 2018):
Please post ideas also.
I thought about callout filters
@JacobBriggsAckama commented on GitHub (Jan 8, 2018):
I'll have a think and see, but at the moment I feel like just having all the strings (along with their corresponding html) be parametrised and overridable on the server (IE on the esp8266) as in #393 would be the simplest method that would give us the smallest complied code.
I guess the other option would be to do the templating in javascript, using something like https://github.com/janl/mustache.js, or even better http://handlebarsjs.com/, then changing the content would be nice and contained.... We would be swapping processing power on the esp8266 for a larger download to the users phone but I am not sure that is really an issue.
@tablatronix commented on GitHub (Jan 8, 2018):
Well there is 2 things that need to happen all strings in a new include and callouts for real time logic
@tablatronix commented on GitHub (Jan 8, 2018):
The only problem I have with that pattern is each callback needs a a setter, a constant, and maybe a global. Sonif we suddenly need 10 customs then its non maintainable.
@tzapu commented on GitHub (Jan 9, 2018):
for people that really want to customise the heck out of it, would it not be better maybe to have it somehow serve the html files from spiffs?
if it finds routes/templates on spiffs (or maybe a toggle to load from sd)load that, if not, present the embedded portal
this would allow pretty much endless customisation withour us having to worry about size of lib
it would also allow us to provide a smarter, prettier configuration portal, that is optional
also, i don't say this enough, but thank you @tablatronix , you are wonderful :D
@tablatronix commented on GitHub (Jan 9, 2018):
I think
.h file const
spiffs
callouts for select pages ( save, wifiscan, etc for dynamic logic )
But we still need to decide if templating will just be the same sprintf() mechanism or something better.
@sorriso93 commented on GitHub (Mar 28, 2018):
Hi I'm looking for request for new functionality but I didn't find it. Maybe this is the appropriate discussion. Is it not possibile to foresee in addition to custom ip configuration via the webserver also the hostname?
@tablatronix commented on GitHub (Mar 28, 2018):
Create a new feature request issue thx
@dontsovcmc commented on GitHub (Nov 5, 2019):
The main problem - the third 'wifisaved screen' page! It doesnt' needed!
Userfriedly way - to see wi-fi status somewhere near button 'safe' cause if error happened - you can change ssid, pwd on the page.
I see, that /status request is very sloow on master branch. Maybe this feature for the dev branch.
Now I test radiobuttons as SSIDs:
const char HTTP_ITEM[] PROGMEM = "<label class='radcontainer'>{v}<input type='radio' name='network' value='{v}' onclick='c(this)'><span class='radiomark'></span>{qi}{qp}</label>";function c changes:
function c(l){document.getElementById('s').value=l.value;@tablatronix commented on GitHub (Nov 5, 2019):
I have no idea what you mean lol
@dontsovcmc commented on GitHub (Nov 5, 2019):
I mean to increase usability WiFiManager should remove "/wifisave" page and show connect status near button
@tablatronix commented on GitHub (Nov 5, 2019):
wifisave exists because we have to shut the ap down to connect, you cannot just connect to the sta in the background. It is that way on purpose