Handle tracks
This commit is contained in:
parent
5799eb32ef
commit
5c7841fdc6
7 changed files with 343 additions and 52 deletions
|
|
@ -1,3 +1,39 @@
|
|||
<h2>
|
||||
Track
|
||||
</h2>
|
||||
<script>
|
||||
import { page } from '$app/stores';
|
||||
|
||||
import {
|
||||
Container,
|
||||
Input,
|
||||
ListGroup,
|
||||
ListGroupItem,
|
||||
Spinner,
|
||||
} from 'sveltestrap';
|
||||
|
||||
import { getTrack } from '../../../../lib/track';
|
||||
</script>
|
||||
|
||||
{#await getTrack($page.params.tid)}
|
||||
<div class="d-flex flex-fill justify-content-center align-items-center gap-2">
|
||||
<Spinner color="primary" /> Chargement en cours…
|
||||
</div>
|
||||
{:then track}
|
||||
<Container>
|
||||
<h2>
|
||||
{track.name}
|
||||
</h2>
|
||||
<ListGroup>
|
||||
<ListGroupItem>
|
||||
<strong>Chemin</strong>
|
||||
{track.path}
|
||||
</ListGroupItem>
|
||||
<ListGroupItem class="d-flex gap-2">
|
||||
<strong>Active ?</strong>
|
||||
<Input type="switch" on:change={() => track.toggleEnable()} checked={track.enabled} />
|
||||
</ListGroupItem>
|
||||
<ListGroupItem>
|
||||
<strong>ID</strong>
|
||||
<span class="text-muted">{track.id}</span>
|
||||
</ListGroupItem>
|
||||
</ListGroup>
|
||||
</Container>
|
||||
{/await}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue