Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…to main
  • Loading branch information
theelims committed Apr 24, 2024
2 parents c93db7a + 9b9984e commit e4307e3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 26 deletions.
17 changes: 17 additions & 0 deletions interface/src/lib/types/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
18 changes: 1 addition & 17 deletions interface/src/routes/connections/mqtt/MQTT.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions interface/src/routes/wifi/sta/Wifi.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
3 changes: 0 additions & 3 deletions lib/framework/ESP32SvelteKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4307e3

Please sign in to comment.