ui: Improve interface

This commit is contained in:
nemunaire 2024-03-18 18:33:17 +01:00
parent 26c282138e
commit 989dce2aed
4 changed files with 11 additions and 7 deletions

View File

@ -30,6 +30,7 @@ p img {
max-height: 100vh;
}
p:has(img) {
text-indent: 0 !important;
text-align: center;
}
@ -44,3 +45,6 @@ p:has(img) {
font-size: 1.3rem;
font-weight: bolder;
}
label {
margin-bottom: 0.25rem;
}

View File

@ -15,17 +15,17 @@
</script>
{#if files.length}
<Card class="mb-4">
<Card class="mb-4 border-secondary">
<CardHeader class="text-light">
<Icon name="download" />
Téléchargements
</CardHeader>
<CardBody class="text-indent">
<CardBody>
<CardText class="text-danger text-justify">
<strong>Attention&nbsp;:</strong> puisqu'il s'agit de captures effectuées dans le but de découvrir si des actes malveillants ont été commis, les contenus qui sont téléchargeables <em>peuvent</em> contenir du contenu malveillant&nbsp;!
</CardText>
</CardBody>
<ListGroup class="border-dark">
<ListGroup flush class="border-secondary">
{#each files as file, index}
<ListGroupItem tag="a" href={file.path} target={(file.name.endsWith(".txt") || file.name.endsWith(".jpg") || file.name.endsWith(".png") || file.name.endsWith(".pdf"))?"_blank":"_self"} class="d-flex">
<h1 class="me-3">

View File

@ -46,7 +46,7 @@
}
async function openHint(hint) {
if (!confirm("Êtes-vous sûr de vouloir utiliser " + (hint.cost * $settings.hintCurrentCoefficient) + " points pour dévoiler cet indice ?")) {
if (hint.cost * $settings.hintCurrentCoefficient > 0 && !confirm("Êtes-vous sûr de vouloir utiliser " + (hint.cost * $settings.hintCurrentCoefficient) + " points pour dévoiler cet indice ?")) {
return;
}
@ -83,7 +83,7 @@
</script>
{#if hints.length}
<Card class="mb-2">
<Card class="mb-2 border-info">
<CardHeader class="bg-info text-light">
<Icon name="lightbulb-fill" />
Indices
@ -95,7 +95,7 @@
</CardText>
</CardBody>
{/if}
<ListGroup>
<ListGroup flush class="border-secondary">
{#each hints as hint (hint.id)}
<ListGroupItem tag="a" href="{hint.file}" target="_self" class="d-flex align-items-center">
{#if hint.file}

View File

@ -29,7 +29,7 @@
<Icon name="flag-fill" />
Défi réussi&nbsp;!
</CardHeader>
<CardBody class="text-indent">
<CardBody>
<CardText>
{#if exercice.solved_rank}
Vous êtes la {exercice.solved_rank}<sup>{exercice.solved_rank==1?"re":"e"}</sup> équipe à avoir résolu ce défi à <DateFormat date={exercice.solved_time} />.