Skip to content

Commit

Permalink
Moves models
Browse files Browse the repository at this point in the history
  • Loading branch information
runeharlyk committed Apr 23, 2024
1 parent 1622a40 commit ffcd9b7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 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

0 comments on commit ffcd9b7

Please sign in to comment.