ui: Update to sveltekit 1.0 + fix warnings
This commit is contained in:
parent
ef194d2cf3
commit
cad2bc09e4
11 changed files with 276 additions and 324 deletions
582
frontend/ui/package-lock.json
generated
582
frontend/ui/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,7 @@
|
||||||
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
|
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/kit": "^1.0.0-next.324",
|
"@sveltejs/kit": "^1.0.0",
|
||||||
"eslint": "^8.4.2",
|
"eslint": "^8.4.2",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-svelte3": "^4.0.0",
|
"eslint-plugin-svelte3": "^4.0.0",
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@popperjs/core": "^2.11.5",
|
"@popperjs/core": "^2.11.5",
|
||||||
"@sveltejs/adapter-static": "^1.0.0-next.29",
|
"@sveltejs/adapter-static": "^1.0.0",
|
||||||
"bootstrap": "^5.1.3",
|
"bootstrap": "^5.1.3",
|
||||||
"bootstrap-icons": "^1.8.1",
|
"bootstrap-icons": "^1.8.1",
|
||||||
"bootswatch": "^5.1.3",
|
"bootswatch": "^5.1.3",
|
||||||
|
|
|
@ -200,7 +200,7 @@
|
||||||
{#each flags as flag ((flag.type?flag.type:"i") + flag.id)}
|
{#each flags as flag ((flag.type?flag.type:"i") + flag.id)}
|
||||||
{#if !flag.type && !flag.id}
|
{#if !flag.type && !flag.id}
|
||||||
<div class="form-group mb-3">
|
<div class="form-group mb-3">
|
||||||
<label class="{flag.variant?('text-'+flag.variant):''}">{@html flag.label}</label>
|
<span class="{flag.variant?('text-'+flag.variant):''}">{@html flag.label}</span>
|
||||||
</div>
|
</div>
|
||||||
{:else if flag.type == "mcq"}
|
{:else if flag.type == "mcq"}
|
||||||
<FlagMCQ
|
<FlagMCQ
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
<CardBody class="text-indent ratio ratio-16x9">
|
<CardBody class="text-indent ratio ratio-16x9">
|
||||||
{#if uri.length > 0 && uri[0] === '/'}
|
{#if uri.length > 0 && uri[0] === '/'}
|
||||||
|
<!-- svelte-ignore a11y-media-has-caption -->
|
||||||
<video controls src={uri} />
|
<video controls src={uri} />
|
||||||
{:else}
|
{:else}
|
||||||
<iframe type="text/html" src="{uri.replace('$RFILES$', base+'/resolution')}" class="embed-responsive-item" title="Vidéo de résolution">
|
<iframe type="text/html" src="{uri.replace('$RFILES$', base+'/resolution')}" class="embed-responsive-item" title="Vidéo de résolution">
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
{#each $challengeInfo.partners as partner, index}
|
{#each $challengeInfo.partners as partner, index}
|
||||||
<CarouselItem bind:activeIndex={activePartner} itemIndex={index} class="h-100 text-end">
|
<CarouselItem bind:activeIndex={activePartner} itemIndex={index} class="h-100 text-end">
|
||||||
{#if partner.href}
|
{#if partner.href}
|
||||||
<a href="{partner.href}" target="_blank" class="h-100">
|
<a href="{partner.href}" target="_blank" rel="noreferrer" class="h-100">
|
||||||
<img src={partner.img.replace('$FILES$', base + '/files')} class="h-100" alt={partner.alt}>
|
<img src={partner.img.replace('$FILES$', base + '/files')} class="h-100" alt={partner.alt}>
|
||||||
</a>
|
</a>
|
||||||
{:else}
|
{:else}
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
<label for="teamName" class="col col-form-label">Nom d'équipe</label>
|
<label for="teamName" class="col col-form-label">Nom d'équipe</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
<!-- svelte-ignore a11y-autofocus -->
|
||||||
<input type="text" class="form-control" id="teamName" bind:value={value.teamName} placeholder="" autofocus required>
|
<input type="text" class="form-control" id="teamName" bind:value={value.teamName} placeholder="" autofocus required>
|
||||||
<Button color="info" type="button" on:click={validateTeamName} disabled={jTeam}>Valider</Button>
|
<Button color="info" type="button" on:click={validateTeamName} disabled={jTeam}>Valider</Button>
|
||||||
<div class="invalid-feedback">
|
<div class="invalid-feedback">
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
<Row class="form-group my-3">
|
<Row class="form-group my-3">
|
||||||
<div class="col-sm">
|
<div class="col-sm">
|
||||||
|
<!-- svelte-ignore a11y-autofocus -->
|
||||||
<input type="text" class="form-control" bind:value={member.lastname} placeholder="Nom" autofocus>
|
<input type="text" class="form-control" bind:value={member.lastname} placeholder="Nom" autofocus>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm">
|
<div class="col-sm">
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</CardBody>
|
</CardBody>
|
||||||
{:then scores}
|
{:then scores}
|
||||||
{#if scores}
|
{#if scores}
|
||||||
<Table class="mb-0" hover striped rows={scores} let:row>
|
<Table class="{className} mb-0" hover striped rows={scores} let:row>
|
||||||
<Column header="Heure">
|
<Column header="Heure">
|
||||||
<DateFormat date={new Date(row.time)} />
|
<DateFormat date={new Date(row.time)} />
|
||||||
</Column>
|
</Column>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
Container,
|
Container,
|
||||||
|
Icon,
|
||||||
Spinner,
|
Spinner,
|
||||||
} from 'sveltestrap';
|
} from 'sveltestrap';
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<Col md="2" lg="3" class="d-none d-md-block">
|
<Col md="2" lg="3" class="d-none d-md-block">
|
||||||
<Card class="pt-3 px-3">
|
<Card class="pt-3 px-3">
|
||||||
{#if $current_theme.partner_img}
|
{#if $current_theme.partner_img}
|
||||||
<img src="{$current_theme.partner_img}" class="card-img-top">
|
<img src="{$current_theme.partner_img}" alt="En-tête du scénario" class="card-img-top">
|
||||||
{/if}
|
{/if}
|
||||||
{#if $current_theme.partner_txt || $current_theme.partner_href}
|
{#if $current_theme.partner_txt || $current_theme.partner_href}
|
||||||
<CardBody class="p-0 mt-3">
|
<CardBody class="p-0 mt-3">
|
||||||
|
@ -55,6 +55,7 @@
|
||||||
class="list-group-item"
|
class="list-group-item"
|
||||||
class:list-group-item-action={$my && $my.exercices[k]}
|
class:list-group-item-action={$my && $my.exercices[k]}
|
||||||
on:click={goto(`${$current_theme.urlid}/${$current_theme.exercices[k].urlid}`)}
|
on:click={goto(`${$current_theme.urlid}/${$current_theme.exercices[k].urlid}`)}
|
||||||
|
on:keypress={goto(`${$current_theme.urlid}/${$current_theme.exercices[k].urlid}`)}
|
||||||
>
|
>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-1" style="margin-top: -0.5rem; margin-bottom: -0.5rem; text-align: right; border-right: 5px solid #{$my && $my.exercices[k] && $my.exercices[k].solved_rank ? '62c462' : 'bbb'}">
|
<div class="col-1" style="margin-top: -0.5rem; margin-bottom: -0.5rem; text-align: right; border-right: 5px solid #{$my && $my.exercices[k] && $my.exercices[k].solved_rank ? '62c462' : 'bbb'}">
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
|
Icon,
|
||||||
Spinner,
|
Spinner,
|
||||||
} from 'sveltestrap';
|
} from 'sveltestrap';
|
||||||
|
|
||||||
|
|
Reference in a new issue