43 lines
1.2 KiB
Svelte
43 lines
1.2 KiB
Svelte
<script>
|
|
import { page } from '$app/stores';
|
|
|
|
import {
|
|
Container,
|
|
} from '@sveltestrap/sveltestrap';
|
|
|
|
import AlarmSingleList from '$lib/components/AlarmSingleList.svelte';
|
|
import AlarmRepeatedList from '$lib/components/AlarmRepeatedList.svelte';
|
|
import AlarmExceptionList from '$lib/components/AlarmExceptionList.svelte';
|
|
|
|
function slugToComponent(slug) {
|
|
switch(slug) {
|
|
case "single":
|
|
return AlarmSingleList;
|
|
case "repeated":
|
|
return AlarmRepeatedList;
|
|
case "exceptions":
|
|
return AlarmExceptionList;
|
|
}
|
|
}
|
|
|
|
function slugToText(slug) {
|
|
switch(slug) {
|
|
case "single":
|
|
return "un réveil manuel";
|
|
case "repeated":
|
|
return "un réveil habituel";
|
|
case "exceptions":
|
|
return "une exception";
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<Container fluid class="py-2 d-none d-md-flex flex-column justify-content-center align-items-center">
|
|
<p class="fst-italic text-muted">
|
|
Choisissez {slugToText($page.params.kind)} dans la liste.
|
|
</p>
|
|
</Container>
|
|
<Container fluid class="d-block d-md-none">
|
|
<svelte:component this={slugToComponent($page.params.kind)} />
|
|
</Container>
|