⛹️‍♂️ Simplifies layout handling

This commit is contained in:
Rune Harlyk
2024-08-18 13:00:21 +02:00
committed by Rune Harlyk
parent 00c56a2d68
commit 296adfee51
13 changed files with 142 additions and 166 deletions
+5 -4
View File
@@ -1,13 +1,14 @@
<script lang="ts">
import Controls from './Controls.svelte';
import WidgetContainer from '$lib/components/layout/DynamicLayout.svelte';
import { controllerLayout, phoneControllerLayout} from '$lib/components/layout/LayoutManager';
import WidgetContainer from '$lib/components/layout/WidgetContainer.svelte';
import { selectedView, views } from '$lib/stores/application';
$: layout = $views.find(v => v.name === $selectedView)!
</script>
<div class="absolute top-0 select-none w-screen h-screen">
<Controls />
<!-- <button class="absolute z-20 btn" on:click={addWidget}>Add Widget</button> -->
<div class="absolute w-full h-screen top-0 overflow-hidden lg:pt-16 pt-12">
<WidgetContainer container={$controllerLayout} />
<WidgetContainer container={layout.content} />
</div>
</div>
@@ -1,19 +0,0 @@
<script lang="ts">
import { onDestroy } from 'svelte';
import { location } from '$lib/utilities';
let videoStream = `//${location}/api/stream`;
onDestroy(() => {
videoStream = '#';
});
</script>
<div class="w-full h-full">
<img
src={videoStream}
class="absolute object-cover blur-3xl w-full h-full -z-10"
alt="Live stream is down"
/>
<img src={videoStream} class="object-contain w-full h-full" alt="Live stream is down" />
</div>