Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ update instructions and example photo for upload #394

Merged
merged 4 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added frontend/src/assets/new-good-photo-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 44 additions & 52 deletions frontend/src/views/InstructionsPage.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts" setup>
import GoodExamplePhoto from '@/assets/good-photo-example.jpg'
import BadExamplePhoto from '@/assets/bad-photo-example.jpg'
import GoodExamplePhoto from '@/assets/new-good-photo-example.png'

import { ref } from 'vue'
import axios from 'axios'
Expand Down Expand Up @@ -105,67 +104,60 @@ function onFileSelected (event: InputEvent & { target: InputEvent['target'] & {
<div
class="lg:absolute lg:inset-y-1\/3 lg:inset-x-0 fr-col-lg-6 fr-col-sm-9 mx-auto"
>
<div class="fr-notice fr-notice--info">
<div class="fr-container">
<div class="fr-notice__body">
<h3 class="fr-notice__title">
Pour un résultat optimal
</h3>
<p>1 - Présenter le <span class="font-bold">canon vers la droite</span>.</p>
<p>2 - Ne photographier qu'<span class="font-bold">une seule</span> arme.</p>
<p>3 - Placer l'arme <span class="font-bold">en entier</span> et <span class="font-bold">au centre de la photo</span>.</p>
</div>
</div>
<div class="fr-alert fr-alert--info mt-15 mr-5 ml-5">
<h3 class="fr-alert__title mb-8">
<span class="font-bold">Pour un résultat optimal :</span>
</h3>
<p>1 - Présenter le <span class="font-bold">canon vers la droite</span>.</p>
<p>2 - Ne photographier qu'<span class="font-bold">une seule</span> arme.</p>
<p>3 - Placer l'arme <span class="font-bold">en entier</span> et <span class="font-bold">au centre de la photo</span>.</p>
<p>4 - Placer <span class="font-bold">une carte à côté de l'arme</span> (n'importe quelle carte au format standard).</p>
<br>
<p>En présence d'une crosse rétractable ou pliable sur l'arme : <span class="font-bold">mettre la crosse dans sa configuration la plus courte.</span></p>
thomashbrnrd marked this conversation as resolved.
Show resolved Hide resolved
</div>

<div class="text-center lg:flex">
<div class="mt-5 text-center lg:flex">
<DsfrPicture
title="title"
:src="GoodExamplePhoto"
alt="photo d'une arme tournée vers la droite et centrée"
legend="Exemple d'une bonne photo"
/>
<DsfrPicture
:src="BadExamplePhoto"
alt="photo d'une arme tournée vers la gauche et partiellement coupée"
legend="Exemple d'une mauvaise photo"
alt="photo d'une carte posée au sol et arme tournée vers la droite et centrée"
/>
</div>
</div>
<div class="big-blank" />
<div class="footer">
<div
v-if="!loading"
class="btn-read-instruction text-center"
>
<div class="big-blank" />
<div class="footer">
<div
class="fr-col-11 fr-col-lg-6 mx-auto"
v-if="!loading"
class="btn-read-instruction text-center"
>
<input
ref="fileInput"
data-testid="select-file"
type="file"
style="width: 0; height: 1px"
:accept="handledImageTypes"
@change="onFileSelected($event)"
<div
class="fr-col-11 fr-col-lg-6 mx-auto"
>
<DsfrButton
class="flex justify-center"
data-testid="take-a-picture"
label="Prendre la photo"
icon="ri-camera-fill"
:icon-right="true"
@click="$refs.fileInput.click()"
/>
<input
ref="fileInput"
data-testid="select-file"
type="file"
style="width: 0; height: 1px"
:accept="handledImageTypes"
@change="onFileSelected($event)"
>
<DsfrButton
class="flex justify-center"
data-testid="take-a-picture"
label="Prendre la photo"
icon="ri-camera-fill"
:icon-right="true"
@click="$refs.fileInput.click()"
/>
</div>
</div>
<div
v-else
class="text-center bold"
>
<p class="loading font-bold">
Analyse en cours
</p>
</div>
</div>
<div
v-else
class="text-center bold"
>
<p class="loading font-bold">
Analyse en cours
</p>
</div>
</div>
</template>
Expand Down
Loading