-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
3,052 additions
and
2,578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script lang="ts"> | ||
export let open = true; | ||
export let collapsable = true; | ||
</script> | ||
|
||
{#if collapsable} | ||
<div | ||
class="collapse-arrow bg-base-200 rounded-box shadow-primary/50 collapse w-full max-w-2xl self-center shadow-lg" | ||
> | ||
<input type="checkbox" class="peer" checked={open} /> | ||
<div class="collapse-title text-xl font-medium"> | ||
<span class="inline-flex items-baseline"> | ||
<slot name="icon" /> | ||
<slot name="title" /> | ||
</span> | ||
</div> | ||
<div class="collapse-content flex flex-col gap-2"> | ||
<slot /> | ||
</div> | ||
</div> | ||
{:else} | ||
<div | ||
class="bg-base-200 rounded-box shadow-primary/50 relative grid w-full max-w-2xl self-center overflow-hidden shadow-lg" | ||
> | ||
<div class="min-h-16 w-full p-4 text-xl font-medium"> | ||
<span class="inline-flex items-baseline"> | ||
<slot name="icon" /> | ||
<slot name="title" /> | ||
</span> | ||
</div> | ||
<div class="flex flex-col gap-2 p-4 pt-0"> | ||
<slot /> | ||
</div> | ||
</div> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script lang="ts"> | ||
import Spinner from '~icons/tabler/loader-2'; | ||
</script> | ||
|
||
<div class=" bg-base-100 flex h-full w-full flex-col items-center justify-center p-6"> | ||
<Spinner class="text-primary h-14 w-auto animate-spin stroke-2" /> | ||
<p class="text-xl">Loading...</p> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { readable } from 'svelte/store'; | ||
|
||
type features = { | ||
project: boolean; | ||
security: boolean; | ||
mqtt: boolean; | ||
ntp: boolean; | ||
ota: boolean; | ||
upload_firmware: boolean; | ||
}; | ||
|
||
export const time = readable(new Date(), function start(set) { | ||
const interval = setInterval(() => { | ||
set(new Date()); | ||
}, 1000); | ||
|
||
return function stop() { | ||
clearInterval(interval); | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
<script lang="ts"> | ||
import type { PageData } from '../app/$types'; | ||
import Spinner from '$lib/spinner.svelte'; | ||
import type { PageData } from '../$types'; | ||
import Demo from './Demo.svelte'; | ||
export let data: PageData; | ||
</script> | ||
|
||
<div | ||
class="mx-8 my-8 flex | ||
flex-col gap-4" | ||
> | ||
<Demo lightState={data.lightState} /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import type { PageLoad } from './$types'; | ||
|
||
export const load = (async () => { | ||
export const load = (async ({ fetch }) => { | ||
const lightStatRes = await fetch('/rest/lightState'); | ||
const lightStatItem = await lightStatRes.json(); | ||
|
||
return { | ||
title: 'Demo App' | ||
lightState: lightStatItem, | ||
title: "Project Demo" | ||
}; | ||
}) satisfies PageLoad; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script lang="ts"> | ||
type LightState = { | ||
led_on: boolean; | ||
}; | ||
export let lightState: LightState; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<script lang="ts"> | ||
import type { PageData } from './$types'; | ||
import Spinner from '$lib/spinner.svelte'; | ||
export let data: PageData; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.