diff --git a/interface/src/lib/types/models.ts b/interface/src/lib/types/models.ts index 11ac54af..a6b75708 100644 --- a/interface/src/lib/types/models.ts +++ b/interface/src/lib/types/models.ts @@ -111,3 +111,20 @@ export type StaticSystemInformation = { }; export type SystemInformation = Analytics & StaticSystemInformation; + +export type MQTTStatus = { + enabled: boolean; + connected: boolean; + client_id: string; + last_error: string; +}; + +export type MQTTSettings = { + enabled: boolean; + uri: string; + username: string; + password: string; + client_id: string; + keep_alive: number; + clean_session: boolean; +}; \ No newline at end of file diff --git a/interface/src/routes/connections/mqtt/MQTT.svelte b/interface/src/routes/connections/mqtt/MQTT.svelte index 30b66eff..8ee55d07 100644 --- a/interface/src/routes/connections/mqtt/MQTT.svelte +++ b/interface/src/routes/connections/mqtt/MQTT.svelte @@ -11,23 +11,7 @@ import Collapsible from '$lib/components/Collapsible.svelte'; import MQTT from '~icons/tabler/topology-star-3'; import Client from '~icons/tabler/robot'; - - type MQTTStatus = { - enabled: boolean; - connected: boolean; - client_id: string; - last_error: string; - }; - - type MQTTSettings = { - enabled: boolean; - uri: string; - username: string; - password: string; - client_id: string; - keep_alive: number; - clean_session: boolean; - }; + import type { MQTTSettings, MQTTStatus } from '$lib/types/models'; let mqttSettings: MQTTSettings; let mqttStatus: MQTTStatus; diff --git a/interface/src/routes/wifi/sta/Wifi.svelte b/interface/src/routes/wifi/sta/Wifi.svelte index 2eb2916f..34864975 100644 --- a/interface/src/routes/wifi/sta/Wifi.svelte +++ b/interface/src/routes/wifi/sta/Wifi.svelte @@ -107,12 +107,6 @@ onDestroy(() => clearInterval(interval)); - onMount(() => { - if (!$page.data.features.security || $user.admin) { - getWifiSettings(); - } - }); - async function postWiFiSettings(data: WifiSettings) { try { const response = await fetch('/rest/wifiSettings', { diff --git a/lib/framework/ESP32SvelteKit.cpp b/lib/framework/ESP32SvelteKit.cpp index 7c780a8c..1648455c 100644 --- a/lib/framework/ESP32SvelteKit.cpp +++ b/lib/framework/ESP32SvelteKit.cpp @@ -110,9 +110,6 @@ void ESP32SvelteKit::begin() // request->redirect(url.c_str()); } }); #endif -#ifdef SERVE_CONFIG_FILES - _server->serveStatic("/config/", ESPFS, "/config/"); -#endif // Serve static resources from /config/ if set by platformio.ini #if SERVE_CONFIG_FILES