ui: Update to sveltekit 1.0 + fix warnings

This commit is contained in:
Pierre-Olivier Mercier 2022-12-15 15:34:28 +01:00
parent ef194d2cf3
commit cad2bc09e4
11 changed files with 276 additions and 324 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. ."
},
"devDependencies": {
"@sveltejs/kit": "^1.0.0-next.324",
"@sveltejs/kit": "^1.0.0",
"eslint": "^8.4.2",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte3": "^4.0.0",
@ -23,7 +23,7 @@
"type": "module",
"dependencies": {
"@popperjs/core": "^2.11.5",
"@sveltejs/adapter-static": "^1.0.0-next.29",
"@sveltejs/adapter-static": "^1.0.0",
"bootstrap": "^5.1.3",
"bootstrap-icons": "^1.8.1",
"bootswatch": "^5.1.3",

View File

@ -200,7 +200,7 @@
{#each flags as flag ((flag.type?flag.type:"i") + flag.id)}
{#if !flag.type && !flag.id}
<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>
{:else if flag.type == "mcq"}
<FlagMCQ

View File

@ -11,6 +11,7 @@
<CardBody class="text-indent ratio ratio-16x9">
{#if uri.length > 0 && uri[0] === '/'}
<!-- svelte-ignore a11y-media-has-caption -->
<video controls src={uri} />
{:else}
<iframe type="text/html" src="{uri.replace('$RFILES$', base+'/resolution')}" class="embed-responsive-item" title="Vidéo de résolution">

View File

@ -17,7 +17,7 @@
{#each $challengeInfo.partners as partner, index}
<CarouselItem bind:activeIndex={activePartner} itemIndex={index} class="h-100 text-end">
{#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}>
</a>
{:else}

View File

@ -61,6 +61,7 @@
<label for="teamName" class="col col-form-label">Nom d'équipe</label>
<div class="col-sm-10">
<div class="input-group">
<!-- svelte-ignore a11y-autofocus -->
<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>
<div class="invalid-feedback">

View File

@ -15,6 +15,7 @@
<Row class="form-group my-3">
<div class="col-sm">
<!-- svelte-ignore a11y-autofocus -->
<input type="text" class="form-control" bind:value={member.lastname} placeholder="Nom" autofocus>
</div>
<div class="col-sm">

View File

@ -28,7 +28,7 @@
</CardBody>
{:then 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">
<DateFormat date={new Date(row.time)} />
</Column>

View File

@ -2,6 +2,7 @@
import {
Alert,
Container,
Icon,
Spinner,
} from 'sveltestrap';

View File

@ -28,7 +28,7 @@
<Col md="2" lg="3" class="d-none d-md-block">
<Card class="pt-3 px-3">
{#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 $current_theme.partner_txt || $current_theme.partner_href}
<CardBody class="p-0 mt-3">
@ -55,6 +55,7 @@
class="list-group-item"
class:list-group-item-action={$my && $my.exercices[k]}
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="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'}">

View File

@ -1,6 +1,7 @@
<script>
import {
Alert,
Icon,
Spinner,
} from 'sveltestrap';