From 8cebc36ed9deb502c29b21779543ba96dae40ce8 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Sun, 29 Dec 2024 00:29:09 +0100 Subject: [PATCH] Implement fetching brightness from api --- frontend/src/App.svelte | 1 - frontend/src/lib/components/Lamp.svelte | 47 ++++++++-------------- frontend/src/lib/router/routes/Home.svelte | 17 +++++++- frontend/wailsjs/go/main/App.d.ts | 4 ++ frontend/wailsjs/go/main/App.js | 8 ++++ 5 files changed, 44 insertions(+), 33 deletions(-) diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index bb86bd0..59e40c6 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -1,5 +1,4 @@
-
- - - -
- -
\ No newline at end of file +
+ + + +
+ + diff --git a/frontend/src/lib/router/routes/Home.svelte b/frontend/src/lib/router/routes/Home.svelte index 33749e4..52600be 100644 --- a/frontend/src/lib/router/routes/Home.svelte +++ b/frontend/src/lib/router/routes/Home.svelte @@ -1,10 +1,23 @@ \ No newline at end of file diff --git a/frontend/wailsjs/go/main/App.d.ts b/frontend/wailsjs/go/main/App.d.ts index 7e3d876..17a1abd 100644 --- a/frontend/wailsjs/go/main/App.d.ts +++ b/frontend/wailsjs/go/main/App.d.ts @@ -2,3 +2,7 @@ // This file is automatically generated. DO NOT EDIT export function Close():Promise; + +export function GetLamps():Promise>; + +export function SetLampBrightness(arg1:number,arg2:number):Promise; diff --git a/frontend/wailsjs/go/main/App.js b/frontend/wailsjs/go/main/App.js index abd085d..b9aee50 100644 --- a/frontend/wailsjs/go/main/App.js +++ b/frontend/wailsjs/go/main/App.js @@ -5,3 +5,11 @@ export function Close() { return window['go']['main']['App']['Close'](); } + +export function GetLamps() { + return window['go']['main']['App']['GetLamps'](); +} + +export function SetLampBrightness(arg1, arg2) { + return window['go']['main']['App']['SetLampBrightness'](arg1, arg2); +}