From 76646d8ccd01809db2ea7f8aeccbd77703939892 Mon Sep 17 00:00:00 2001 From: elims <46279009+theelims@users.noreply.github.com> Date: Thu, 4 May 2023 22:28:26 +0200 Subject: [PATCH] reorganized some stuff --- README.md | 4 +- factory_settings.ini | 2 +- interface/src/lib/SettingsCard.svelte | 18 - .../lib/{ => components}/ConfirmDialog.svelte | 0 .../lib/{ => components}/InputPassword.svelte | 0 .../src/lib/components/SettingsCard.svelte | 35 ++ interface/src/lib/components/spinner.svelte | 8 + interface/src/lib/spinner.svelte | 8 - interface/src/lib/stores/features.ts | 20 + interface/src/routes/+page.svelte | 2 +- interface/src/routes/connections/MQTT.svelte | 12 +- interface/src/routes/connections/NTP.svelte | 4 +- interface/src/routes/demo/+page.svelte | 11 +- interface/src/routes/demo/+page.ts | 8 +- interface/src/routes/demo/Demo.svelte | 7 + interface/src/routes/login.svelte | 2 +- .../src/routes/system/OTASettings.svelte | 18 +- .../src/routes/system/SystemStatus.svelte | 4 +- interface/src/routes/user/+page.svelte | 1 - interface/src/routes/wifi/Accesspoint.svelte | 4 +- interface/src/routes/wifi/Wifi.svelte | 58 +-- lib/framework/APSettingsService.cpp | 145 +++--- lib/framework/APSettingsService.h | 168 +++--- lib/framework/APStatus.cpp | 31 +- lib/framework/APStatus.h | 15 +- lib/framework/ArduinoJsonJWT.cpp | 228 +++++---- lib/framework/ArduinoJsonJWT.h | 29 +- lib/framework/AuthenticationService.cpp | 62 +-- lib/framework/AuthenticationService.h | 27 +- lib/framework/ESP8266React.cpp | 129 ++--- lib/framework/ESP8266React.h | 121 +++-- lib/framework/FSPersistence.h | 203 ++++---- lib/framework/FactoryResetService.cpp | 53 +- lib/framework/FactoryResetService.h | 17 +- lib/framework/Features.h | 1 - lib/framework/FeaturesService.cpp | 40 +- lib/framework/FeaturesService.h | 11 +- lib/framework/HttpEndpoint.h | 289 ++++++----- lib/framework/IPUtils.h | 21 +- lib/framework/JsonUtils.h | 41 +- lib/framework/MqttPubSub.h | 323 ++++++------ lib/framework/MqttSettingsService.cpp | 260 +++++----- lib/framework/MqttSettingsService.h | 168 +++--- lib/framework/MqttStatus.cpp | 35 +- lib/framework/MqttStatus.h | 15 +- lib/framework/NTPSettingsService.cpp | 136 ++--- lib/framework/NTPSettingsService.h | 80 +-- lib/framework/NTPStatus.cpp | 65 +-- lib/framework/NTPStatus.h | 13 +- lib/framework/OTASettingsService.cpp | 93 ++-- lib/framework/OTASettingsService.h | 64 +-- lib/framework/RestartService.cpp | 18 +- lib/framework/RestartService.h | 24 +- lib/framework/SecurityManager.h | 145 +++--- lib/framework/SecuritySettingsService.cpp | 224 ++++---- lib/framework/SecuritySettingsService.h | 160 +++--- lib/framework/SettingValue.cpp | 87 ++-- lib/framework/SettingValue.h | 7 +- lib/framework/StatefulService.h | 222 ++++---- lib/framework/SystemStatus.cpp | 62 +-- lib/framework/SystemStatus.h | 13 +- lib/framework/UploadFirmwareService.cpp | 145 +++--- lib/framework/UploadFirmwareService.h | 31 +- lib/framework/WebSocketTxRx.h | 479 +++++++++--------- lib/framework/WiFiScanner.cpp | 102 ++-- lib/framework/WiFiScanner.h | 17 +- lib/framework/WiFiSettingsService.cpp | 154 +++--- lib/framework/WiFiSettingsService.h | 150 +++--- lib/framework/WiFiStatus.cpp | 115 +++-- lib/framework/WiFiStatus.h | 37 +- platformio.ini | 3 +- src/LightMqttSettingsService.cpp | 23 +- src/LightMqttSettingsService.h | 56 +- src/LightStateService.cpp | 114 +++-- src/LightStateService.h | 103 ++-- src/main.cpp | 30 +- 76 files changed, 3052 insertions(+), 2578 deletions(-) delete mode 100644 interface/src/lib/SettingsCard.svelte rename interface/src/lib/{ => components}/ConfirmDialog.svelte (100%) rename interface/src/lib/{ => components}/InputPassword.svelte (100%) create mode 100644 interface/src/lib/components/SettingsCard.svelte create mode 100644 interface/src/lib/components/spinner.svelte delete mode 100644 interface/src/lib/spinner.svelte create mode 100644 interface/src/lib/stores/features.ts create mode 100644 interface/src/routes/demo/Demo.svelte diff --git a/README.md b/README.md index e1512cef..a03ec1f7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A word of warning, this repository is heavily been worked on. It is not yet prod This project aims to port the fabulous [rjwats/esp8266-react](https://github.com/rjwats/esp8266-react) project to Sveltekit and to add some more useful features. -A simple, secure and extensible framework for IoT projects built on ESP32 platforms with responsive [Sveltekit](https://kit.svelte.dev/) front-end built with [TailwindCSS](https://tailwindcss.com/) and [DaisyUI](https://daisyui.com/). +A simple, secure and extensible framework for IoT projects for ESP32 platforms with responsive [Sveltekit](https://kit.svelte.dev/) front-end built with [TailwindCSS](https://tailwindcss.com/) and [DaisyUI](https://daisyui.com/). First Step - recreate the Front End with SvelteKit: @@ -13,7 +13,7 @@ First Step - recreate the Front End with SvelteKit: - [x] System-API - [x] OTA-API - [x] Firmware Upload API -- [ ] MQTT-API +- [x] MQTT-API - [x] NTP-API - [ ] Feature Selector Front End - [ ] Demo Project diff --git a/factory_settings.ini b/factory_settings.ini index 6153675e..4db8010e 100644 --- a/factory_settings.ini +++ b/factory_settings.ini @@ -13,7 +13,7 @@ build_flags = ; Access point settings -D FACTORY_AP_PROVISION_MODE=AP_MODE_DISCONNECTED - -D FACTORY_AP_SSID=\"ESP32-Sveltekit-#{unique_id}\" ; 1-64 characters, supports placeholders + -D FACTORY_AP_SSID=\"ESP32-SvelteKit-#{unique_id}\" ; 1-64 characters, supports placeholders -D FACTORY_AP_PASSWORD=\"esp-sveltekit\" ; 8-64 characters -D FACTORY_AP_CHANNEL=1 -D FACTORY_AP_SSID_HIDDEN=false diff --git a/interface/src/lib/SettingsCard.svelte b/interface/src/lib/SettingsCard.svelte deleted file mode 100644 index d6425f1d..00000000 --- a/interface/src/lib/SettingsCard.svelte +++ /dev/null @@ -1,18 +0,0 @@ - - -
Loading...
+Loading...
-