Files
dmxconnect/frontend/src/App.svelte

52 lines
1.3 KiB
Svelte
Raw Normal View History

2023-08-25 20:33:11 +00:00
<script>
2023-08-26 09:33:05 +00:00
import { _ } from 'svelte-i18n'
import NavigationBar from './components/General/NavigationBar.svelte';
import Clock from './components/General/Clock.svelte'
import Preparation from './components/Preparation/Preparation.svelte';
import Animation from './components/Animation/Animation.svelte';
import Settings from './components/Settings/Settings.svelte';
import Devices from './components/Devices/Devices.svelte';
import Show from './components/Show/Show.svelte';
import GeneralConsole from './components/Console/GeneralConsole.svelte';
2023-08-26 09:33:05 +00:00
let selectedMenu = "settings"
2023-08-26 09:33:05 +00:00
// When the navigation menu changed, update the selected menu
function onNavigationChanged(event){
selectedMenu = event.detail.menu;
}
2023-08-25 20:33:11 +00:00
</script>
2023-08-26 09:33:05 +00:00
<header>
<NavigationBar on:navigationChanged="{onNavigationChanged}"/>
<Clock/>
</header>
2023-08-25 20:33:11 +00:00
<main>
{#if selectedMenu === "settings"}
2023-08-26 09:33:05 +00:00
<Settings />
{:else if selectedMenu === "devices"}
<Devices />
{:else if selectedMenu === "preparation"}
<Preparation />
{:else if selectedMenu === "animation"}
<Animation />
{:else if selectedMenu === "show"}
<Show />
{:else if selectedMenu === "console"}
<GeneralConsole />
2023-08-26 09:33:05 +00:00
{/if}
2023-08-25 20:33:11 +00:00
</main>
<style>
2023-08-26 09:33:05 +00:00
main {
text-align: left;
padding: 1em;
max-width: 240px;
margin: 0 auto;
}
@media (min-width: 640px) {
main {
max-width: none;
}
}
</style>