From 5e475fb516f94e3ccacad8cc9b7d9773ff4d3a17 Mon Sep 17 00:00:00 2001 From: David Mendy Date: Tue, 6 Feb 2024 15:05:38 +0100 Subject: [PATCH] chore: :label: improve typescript --- frontend/.eslintrc-auto-import.json | 5 ++++- frontend/src/auto-imports.d.ts | 3 +++ frontend/src/components/AskingExpert.vue | 2 +- frontend/src/components/ContactExpert.vue | 3 +-- frontend/src/components/FooterMES.vue | 11 ++--------- frontend/src/router/index.ts | 8 ++++---- frontend/src/stores/steps.ts | 3 +++ frontend/src/utils/storage-utils.ts | 4 ++-- .../GuideIdentificationFirearm.vue | 2 +- .../IdentificationSelectAmmo.vue | 9 ++++++++- .../GuideSecuringFirearm/GuideSecuringFirearm.vue | 1 + .../GuideSecuringFirearm/SecuringRecommendations.vue | 2 +- .../SecuringSelectOptionContent.vue | 6 +----- frontend/src/views/StartPage.vue | 2 -- 14 files changed, 32 insertions(+), 29 deletions(-) diff --git a/frontend/.eslintrc-auto-import.json b/frontend/.eslintrc-auto-import.json index 2d3c828ec..4fbb702cb 100644 --- a/frontend/.eslintrc-auto-import.json +++ b/frontend/.eslintrc-auto-import.json @@ -290,6 +290,9 @@ "watchThrottled": true, "watchTriggerable": true, "watchWithFilter": true, - "whenever": true + "whenever": true, + "injectLocal": true, + "provideLocal": true, + "useClipboardItems": true } } diff --git a/frontend/src/auto-imports.d.ts b/frontend/src/auto-imports.d.ts index 8b0cdcd4e..940cbdf6d 100644 --- a/frontend/src/auto-imports.d.ts +++ b/frontend/src/auto-imports.d.ts @@ -37,6 +37,7 @@ declare global { const h: typeof import('vue')['h'] const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch'] const inject: typeof import('vue')['inject'] + const injectLocal: typeof import('@vueuse/core')['injectLocal'] const isDefined: typeof import('@vueuse/core')['isDefined'] const isProxy: typeof import('vue')['isProxy'] const isReactive: typeof import('vue')['isReactive'] @@ -66,6 +67,7 @@ declare global { const onUpdated: typeof import('vue')['onUpdated'] const pausableWatch: typeof import('@vueuse/core')['pausableWatch'] const provide: typeof import('vue')['provide'] + const provideLocal: typeof import('@vueuse/core')['provideLocal'] const reactify: typeof import('@vueuse/core')['reactify'] const reactifyObject: typeof import('@vueuse/core')['reactifyObject'] const reactive: typeof import('vue')['reactive'] @@ -129,6 +131,7 @@ declare global { const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation'] const useCached: typeof import('@vueuse/core')['useCached'] const useClipboard: typeof import('@vueuse/core')['useClipboard'] + const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems'] const useCloned: typeof import('@vueuse/core')['useCloned'] const useColorMode: typeof import('@vueuse/core')['useColorMode'] const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog'] diff --git a/frontend/src/components/AskingExpert.vue b/frontend/src/components/AskingExpert.vue index 220e73c44..de8a8fd13 100644 --- a/frontend/src/components/AskingExpert.vue +++ b/frontend/src/components/AskingExpert.vue @@ -46,7 +46,7 @@ async function sendTutorialFeedback () { setMessage({ type: 'error', message: 'Une erreur a eu lieu en enregistrant de votre message.' }) }) .finally(() => setTimeout(() => { - stepsStore.setCurrentStep(undefined) + stepsStore.setCurrentStep(1) stepsStore.tutorialFeedback = '' router.push({ name: 'ResultPage' }) }, 3000)) diff --git a/frontend/src/components/ContactExpert.vue b/frontend/src/components/ContactExpert.vue index cd3dfbe30..ad04eefe9 100644 --- a/frontend/src/components/ContactExpert.vue +++ b/frontend/src/components/ContactExpert.vue @@ -1,5 +1,4 @@ +