Update to sveltekit 1.0 + fix warnings
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-12-15 15:15:38 +01:00
commit c692e34fdf
18 changed files with 446 additions and 355 deletions

View file

@ -20,7 +20,7 @@
{:else if state.status == "success"}
<i class="bi bi-check-circle-fill text-success mx-1" title="La récupération s'est bien passée"></i>
{:else if state.status == "failure" || state.status == "killed"}
<i class="bi bi-exclamation-circle-fill text-danger mx-1" title="La récupération ne s'est pas bien passée" style="cursor: pointer" on:click={() => dispatch('show_logs')}></i>
<i class="bi bi-exclamation-circle-fill text-danger mx-1" title="La récupération ne s'est pas bien passée" style="cursor: pointer" on:click={() => dispatch('show_logs')} on:keypress={() => dispatch('show_logs')}></i>
{:else}
{state.status}
{/if}

View file

@ -47,7 +47,7 @@
</span>
<div>
{#each res[rep] as user}
<a href="users/{user}" target="_blank" class="badge bg-dark rounded-pill">
<a href="users/{user}" target="_blank" rel="noreferrer" class="badge bg-dark rounded-pill">
{#if users && users[user]}
{users[user].login}
{:else}
@ -64,7 +64,7 @@
<span>
{rep}
</span>
<a href="users/{res[rep]}" target="_blank" class="badge bg-dark rounded-pill">
<a href="users/{res[rep]}" target="_blank" rel="noreferrer" class="badge bg-dark rounded-pill">
{#if users && users[res[rep]]}
{users[res[rep]].login}
{:else}

View file

@ -4,9 +4,6 @@
import DateFormat from '$lib/components/DateFormat.svelte';
import { getUserRendu } from '$lib/works';
let className = '';
export { className as class };
export let work = null;
export let user = null;

View file

@ -76,7 +76,12 @@
{/if}
{#if $user && (sid == 0 || surveys[sid-1].id_category != survey.id_category) && categories[survey.id_category]}
<tr class="bg-primary text-light">
<th colspan="5" class="fw-bold" on:click={() => categories[survey.id_category].expand = !categories[survey.id_category].expand}>
<th
colspan="5"
class="fw-bold"
on:click={() => categories[survey.id_category].expand = !categories[survey.id_category].expand}
on:keypress={() => categories[survey.id_category].expand = !categories[survey.id_category].expand}
>
{#if categories[survey.id_category].expand}
<i class="bi bi-chevron-down"></i>
{:else}
@ -85,14 +90,17 @@
{categories[survey.id_category].label}
{#if $user && $user.is_admin}
<a href="categories/{survey.id_category}" class="float-end btn btn-sm btn-light" style="margin: -6px;">
<i class="bi bi-pencil" on:click={() => categories[survey.id_category].expand = !categories[survey.id_category].expand}></i>
<i class="bi bi-pencil"></i>
</a>
{/if}
</th>
</tr>
{/if}
{#if categories[survey.id_category] && categories[survey.id_category].expand}
<tr on:click={e => gotoSurvey(survey)}>
<tr
on:click={e => gotoSurvey(survey)}
on:keypress={e => gotoSurvey(survey)}
>
<td>
{#if !survey.shown}<i class="bi bi-eye-slash-fill" title="Ce questionnaire n'est pas affiché aux étudiants"></i>{/if}
{survey.title}

View file

@ -159,12 +159,12 @@
<span>Récupération de vos dépôts GitLab &hellip;</span>
</div>
{:then rrepos}
<select class="form-select col" disabled={readonly} bind:value={repo_used.uri}>
<select id="repolist" class="form-select col" disabled={readonly} bind:value={repo_used.uri}>
{#each rrepos as r (r.Id)}
<option value={r.ssh_url_to_repo}>{r.path_with_namespace}</option>
{/each}
</select>
<label>Dépôt GitLab pour ce travail&nbsp;:</label>
<label for="repolist">Dépôt GitLab pour ce travail&nbsp;:</label>
<button
type="submit"
class="mt-2 btn btn-primary"
@ -214,6 +214,7 @@
</p>
<div class="form-group mb-3">
<label class="form-label" for="repo-address">Adresse du dépôt</label>
<!-- svelte-ignore a11y-autofocus -->
<input class="form-control" id="repo-address" autofocus placeholder="git@git.mydomain.net:path/to/repo.git" bind:value={repo_used.uri}>
</div>
<p>