Comments (10)
from espui.
Update: I implemented it as...
//h
#define UI_RELOAD ControlType::Reload
//cpp
bool ESPUIClass::remControl(uint16_t id, bool reload_ui)
{
if(nullptr == this->controls) return false;
Control * it = this->controls;
if(id == it->id) {
this->controls = it->next;
delete it;
if(reload_ui) {
reload();
}
return true;
}
Control * it_next = it->next;
while(nullptr != it_next && id != it_next->id) {
it = it_next;
it_next = it_next->next;
}
if(nullptr != it_next) {
it->next = it_next->next;
delete it_next;
if(reload_ui) {
reload();
}
return true;
}
return false;
}
void ESPUIClass::reload()
{
int tryId = 0;
for (int count = 0; count < this->ws->count();) {
if (this->ws->hasClient(tryId)) {
ESPUI.jsonReload(this->ws->client(tryId));
count++;
}
tryId++;
}
}
void ESPUIClass::jsonReload(AsyncWebSocketClient *client)
{
String json;
DynamicJsonDocument document(jsonUpdateDocumentSize);
JsonObject root = document.to<JsonObject>();
root["type"] = (int)UI_RELOAD;
serializeJson(document, json);
if (this->verbosity >= Verbosity::VerboseJSON) {
Serial.println(json);
}
this->ws->textAll(json);
}
on js side:
var handleEvent = function(evt) {
.....
case UI_RELOAD:
window.location.reload();
break;
from espui.
You could make a pull request and we could look into merging it
from espui.
ok
from espui.
Does this implementation is done ?
from espui.
Does this implementation is done ?
Sorry. I completely forgot about that. I will make the Pool Request today.
from espui.
You could make a pull request and we could look into merging it
I can't make pull request:
`
$ git push --set-upstream origin rem_control
ERROR: Permission to s00500/ESPUI.git denied to nen777w.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
`
Please make sure you have the correct access rights
and the repository exists.
Should I use a specific branch for it?
from espui.
Do you have another repo for that ?
from espui.
@nen777w please fork the repository first using the fork button, then push a branch on your own fork of the repo and then make a pull request to this repository again, this is how it works on github ;-)
from espui.
@nen777w please fork the repository first using the fork button, then push a branch on your own fork of the repo and then make a pull request to this repository again, this is how it works on github ;-)
OMG... OK :-)
I Will do it today or tomorrow.
from espui.
Related Issues (20)
- Fixed a bug with iOS Captive Portal Not Loading HOT 8
- alternate port is broken HOT 13
- pad-with-centre image is streched
- ElegantOTA and ESPUI HOT 4
- ESPUI + httpUpdate error HOT 3
- Input a numeric value without using the arrows and pressing the Enter key and ESPUI.updateNumber(...) change the text color of the numeric input widget HOT 1
- https server option HOT 1
- Using the AsyncTCP.h ESPAsyncWebServer.h to enable parallel use of WebSerial HOT 2
- Displaying content of a text file in a tab ?!? HOT 7
- Change user and pass of GUI HOT 2
- Unable to use class lambda - no matching function to call HOT 4
- Conflicting Enums in global scope HOT 7
- horizontal alignment of switcher control HOT 4
- compatibility with ArduinoJson V7 HOT 7
- compiler errors when trying to compile complete example HOT 2
- a "0" is displayed instead of the label o the button HOT 6
- TimeZone in ISO string {new Date().toISOString()}
- TextInput and input of not printable characters
- Unused function declaration in ESPUI.h
- Panel gets deleted after it was hidden and browser refreshed.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espui.