Token management, Factory reset, UX/UI Improvements

This commit is contained in:
2026-02-22 19:35:20 +07:00
parent 639a8417e6
commit 36953e35df
30 changed files with 1601 additions and 197 deletions
+7 -2
View File
@@ -43,6 +43,8 @@ class _ESPTouchDialog extends State<ESPTouchDialog> {
final touchStream = task.execute();
final sub = touchStream.listen((data) async {
var conf = AppConfig();
final dev = Device(
name: widget.name,
routerSsid: widget.ssid,
@@ -50,11 +52,14 @@ class _ESPTouchDialog extends State<ESPTouchDialog> {
networkPassword: widget.password,
);
if (widget.entryIndex != null) {
final oldDev = conf.devices[widget.entryIndex!];
dev.token = oldDev.token;
}
dev.ip = data.ip;
dev.bssid = data.bssid;
var conf = AppConfig();
if (widget.addNewEntry) {
conf.devices.add(dev);
} else {