Sveltekit
Pull-Requests
MoonLight has made a number of commits which are general purpose and could be added to upstream ESP32 SvelteKit. Pending changes are ready to add in pull-requests as they are branched from the upstream repo. Below lists are ordered in terms of likelyhood to be accepted:
Pending - Ready to PR
- 🐛 bug-metadata-parent-wifi: avoid console.log errors
- ⚠️ components-small-fixes: avoid console.log errors
- ⚠️ compile-warnings: role and tab index
- 💡 service-name-string: Allow service names to be non string literals (e.g. done in MoonBase-Modules)
- ⚠️ no-emit-no-clients
- 💡 system-status-metrics: use max instead of first
- 💡 help-to-docs: Help link to github.io docs e.g. Lights control
- 💡 System metrics
- Loops per second (performance)
- 💡 System status
- Loops per second (performance)
- 💡 menu-href-unique: Allow multiple modules using same Module.svelte
- 💡 measure-battery-pin
Pending - 🚧
Submitted
- None ATM
Merged into ESP32-Sveltekit
- Expands menu on selected subitem
- Add file.close in fileHandler handleRequest
- Refactor System Status and Metrics
- Add free_psram, used_psram and psram_size in Analytics (models.ts) and analytics_data (analytics.ts) and show in UI (SystemMetrics.svelte)
- Send psram data only if psramFound (SystemStatus.svelte, AnalyticsService.h, SystemStatus.cpp)
- Wifi: Multiple edits bug resolved
- ESPD_LOGx: replace first argument with TAG and define TAG as 🐼
Other improvements
- Add esp32-s3-devkitc-1-n16r8v and LOLIN_WIFI_FIX in pio.ini (including boards folder)
- Add Monitor
- socket.ts: add else listeners.get("monitor")?.forEach((listener) => listener(new Uint8Array(message.data)));
- EventSocket.cpp: add void EventSocket::emitEvent with char * argument
- Add MoonBase / MoonLight specific functionality
- ESP32SvelteKit.cpp:
- CPU load (and main.cpp)
- comment response.addHeader("Cache-Control", "public, immutable, max-age=31536000");
- interface/source/routes/+layout.svelte
- Show monitor only on moon functions (so captive portal on small screen looks fine): #if (page.data.features.monitor && page.url.pathname.includes("moon"))
- main.cpp: esp_log_set_vprintf(my_vprintf); 🚧
- ci pio
- run in loopTask to avoid stack size crashes in httpd
- updatedItems (to see what specifically has been updated)
Steps made to make Sveltekit ready for MoonLight
This is a checklist, More info on most of the items can be found in the ESP32-Sveltekit specific documentation ESP32 SvelteKit, Build Tools, Front end and Back End
-
{custom} = MoonLight or name of a forked repo
-
docs/media/
- add {custom}-logo.png (used in mkdocs.yml)
- replace favicon.png
- factory_settings.ini
- FACTORY_AP_SSID=\"{custom}-#{unique_id}\"
- FACTORY_AP_PASSWORD=\"\" (recommendation)
- FACTORY_NTP_TIME_ZONE_LABEL=\"Europe/Berlin\"
- package.json
- name = "{custom}"
- version: "0.5.9.3",
- intrerface/source/lib/assets/logo.png
- replace logo
- interface/source/routes/+layout.ts
- title: '{custom}'
- github:
- copyright
- appname: '{custom}'
- interface/source/routes/+page.svelte
- Welcome to {custom}
- Intro message
- href="/"
- Start {custom}
- interface/source/routes/menu.svelte
- const discord = { href: 'https://discord.gg/TC8NSUSCdV', active: true };
- interface/static/manifest.json
- name: "{custom}"
- interface/static/favicon.png
- replace favicon.png
- lib/framework/APSettingsService.h
- FACTORY_AP_SSID "{custom}-#{unique_id}"
- FACTORY_AP_PASSWORD ""
- mkdocs.yml
- site_name: {custom}
- nav: {custom}
- repo_name and repo_url
- theme logo: media/{custom}-logo.png
- analytics: provider: google property: G-R6QYDG0126
- Copyright
- platformio.ini
- description = {custom}
- add [custom] build_flags and lib_deps
- APP_NAME=\"{custom}\" ;
- APP_VERSION=\"0.x.0\"
- CORE_DEBUG_LEVEL=4
- README.md
- Custom intro
- vite.config.ts
- Set target: 'http://192.168.1.xxx'
- setup custom code
- src/custom
- interface/src/routes/moonbase
- interface/src/lib/components/moonbase
- interface/src/lib/types/moonbase_model.ts
- interface/src/lib/stores/moonbase_utilities.ts
- Github repo
- change license
- change description
- change webhook