Adds actuator service to sync angles

This commit is contained in:
Rune Harlyk
2024-03-29 21:15:38 +01:00
committed by Rune Harlyk
parent f67071fd74
commit 259bc0b5eb
10 changed files with 207 additions and 115 deletions
+3 -10
View File
@@ -17,11 +17,10 @@
export let data: LayoutData;
onMount(() => {
onMount(async () => {
if ($user.bearer_token !== '') {
validateUser($user);
}
menuOpen = false;
connectToEventSource();
});
@@ -29,10 +28,6 @@
NotificationSource?.close();
});
onDestroy(() => {
NotificationSource.close();
});
async function validateUser(userdata: userProfile) {
try {
const response = await fetch('/rest/verifyAuthorization', {
@@ -186,15 +181,13 @@
<Statusbar />
<!-- Main page content here -->
<slot />
<slot />
</div>
<!-- Side Navigation -->
<div class="drawer-side z-30 shadow-lg">
<label for="main-menu" class="drawer-overlay" />
<Menu
on:menuClicked={() => {
menuOpen = false;
}}
on:menuClicked={() => menuOpen = false}
/>
</div>
</div>