From 58879ad8eb3353f52dab34d518573c37dfbe9462 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Fri, 31 May 2024 20:04:51 +0200 Subject: [PATCH] Standardize securing footer --- frontend/src/components/FooterMES.vue | 28 ------- .../get-next-route-after-result.ts | 2 +- .../GuideSecuringFirearm.vue | 24 ++---- .../SecuringAchievement.vue | 43 ++++------- .../GuideSecuringFirearm/SecuringFooter.vue | 76 +++++-------------- .../SecuringSelectOptionContent.vue | 36 +++------ .../SecuringTutorialContent.vue | 28 ++----- frontend/src/views/InstructionsPage.vue | 19 ++--- 8 files changed, 69 insertions(+), 187 deletions(-) delete mode 100644 frontend/src/components/FooterMES.vue diff --git a/frontend/src/components/FooterMES.vue b/frontend/src/components/FooterMES.vue deleted file mode 100644 index 4b261ff91..000000000 --- a/frontend/src/components/FooterMES.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/frontend/src/utils/firearms-utils/get-next-route-after-result.ts b/frontend/src/utils/firearms-utils/get-next-route-after-result.ts index 51e5d259f..8aae4bc5c 100644 --- a/frontend/src/utils/firearms-utils/get-next-route-after-result.ts +++ b/frontend/src/utils/firearms-utils/get-next-route-after-result.ts @@ -1,6 +1,6 @@ import { TYPOLOGIES, MEASURED_GUNS_TYPOLOGIES } from '@/utils/firearms-utils/index' -export const getNextRouteAfterResult = ({ securingTutorial, confidenceLevel, typology, gunLength, gunBarrelLength }) => { +export const getNextRouteAfterResult = (securingTutorial: boolean, confidenceLevel: string, typology: string, gunLength: number, gunBarrelLength: number) => { const isCardDetected = gunLength !== null && gunBarrelLength !== null const isMeasuredGun = MEASURED_GUNS_TYPOLOGIES.includes(typology) diff --git a/frontend/src/views/GuideSecuringFirearm/GuideSecuringFirearm.vue b/frontend/src/views/GuideSecuringFirearm/GuideSecuringFirearm.vue index c54a3e23c..09b55df7a 100644 --- a/frontend/src/views/GuideSecuringFirearm/GuideSecuringFirearm.vue +++ b/frontend/src/views/GuideSecuringFirearm/GuideSecuringFirearm.vue @@ -2,6 +2,7 @@ import { isUserUsingCrosscall } from '@/utils/isUserUsingCrosscall' import StepsGuide from '@/components/StepsGuide.vue' +import SecuringFooter from './SecuringFooter.vue' const steps = ['Mise en garde', 'Consignes de sécurité', 'Photo'] const currentStep = ref(0) @@ -79,24 +80,9 @@ const currentStep = ref(0) - + diff --git a/frontend/src/views/GuideSecuringFirearm/SecuringAchievement.vue b/frontend/src/views/GuideSecuringFirearm/SecuringAchievement.vue index b4b065630..6f07cebfe 100644 --- a/frontend/src/views/GuideSecuringFirearm/SecuringAchievement.vue +++ b/frontend/src/views/GuideSecuringFirearm/SecuringAchievement.vue @@ -66,33 +66,22 @@ function goToMissingCardPageIfMissing () { diff --git a/frontend/src/views/GuideSecuringFirearm/SecuringFooter.vue b/frontend/src/views/GuideSecuringFirearm/SecuringFooter.vue index beac20c25..a7586fdb3 100644 --- a/frontend/src/views/GuideSecuringFirearm/SecuringFooter.vue +++ b/frontend/src/views/GuideSecuringFirearm/SecuringFooter.vue @@ -1,66 +1,32 @@ - - diff --git a/frontend/src/views/GuideSecuringFirearm/SecuringSelectOptionContent.vue b/frontend/src/views/GuideSecuringFirearm/SecuringSelectOptionContent.vue index 06da03574..cf8a0af33 100644 --- a/frontend/src/views/GuideSecuringFirearm/SecuringSelectOptionContent.vue +++ b/frontend/src/views/GuideSecuringFirearm/SecuringSelectOptionContent.vue @@ -1,6 +1,8 @@ @@ -173,10 +162,9 @@ const backTo = computed(() => {
@@ -187,10 +175,6 @@ const backTo = computed(() => { margin-bottom: 1rem; } -.fr-content-media { - margin-block: 0.5rem; -} - .video-container { margin: 0 !important; padding: 0 !important; @@ -234,6 +218,6 @@ const backTo = computed(() => { } .footer button { -width: 50%; + width: 50%; } diff --git a/frontend/src/views/GuideSecuringFirearm/SecuringTutorialContent.vue b/frontend/src/views/GuideSecuringFirearm/SecuringTutorialContent.vue index d9821135a..aec4e1f60 100644 --- a/frontend/src/views/GuideSecuringFirearm/SecuringTutorialContent.vue +++ b/frontend/src/views/GuideSecuringFirearm/SecuringTutorialContent.vue @@ -1,15 +1,14 @@