Crate pispas_configurator_html

Crate pispas_configurator_html 

Source
Expand description

§pispas_configurator_html — one-shot config UI

Small GUI binary launched from the tray or the installer. It loads an embedded HTML page (bundled in binaries/configurator_html/dist/), shows it in a native webview window, and wires two JS-to-Rust commands:

  • loadConfig — reads the current ConfigEnv from the .env under config_file_path() and returns it as JSON.
  • saveConfig — writes the edited JSON back to the .env and then triggers a restart of the pispas-modules service so the new config takes effect.

When the user saves, the configurator sends a BASE/RESTART Action to the service via a plain TCP socket (not WS — this is the installer-internal control channel, not the public API).

§How it fits in

  tray-app  --"open configurator"-->  configurator_html.exe
                                            |
                                            | read/write .env
                                            v
                                      sharing::ConfigEnv
                                            |
                                            | RESTART
                                            v
                                     pispas-modules service

When you add a new configurable field, keep three places in sync (see CLAUDE.md §5): ConfigEnv, this file’s save_config, and dist/index.html.

Structs§

PispasConfigurator

Constants§

MAIN_LOG_FILE 🔒

Functions§

download_tools 🔒
get_initial_config 🔒
main 🔒
open_folder_tauri 🔒
save_config 🔒
send_action 🔒