Client - minor fixes
This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <Error
 | 
					  <Error
 | 
				
			||||||
 | 
					    v-if="errorDisplayed"
 | 
				
			||||||
    title="404"
 | 
					    title="404"
 | 
				
			||||||
    :message="$t(`error.NOT_FOUND.${target}`)"
 | 
					    :message="$t(`error.NOT_FOUND.${target}`)"
 | 
				
			||||||
    :button-text="$t('common.HOME')"
 | 
					    :button-text="$t('common.HOME')"
 | 
				
			||||||
@@ -7,7 +8,7 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script setup lang="ts">
 | 
					<script setup lang="ts">
 | 
				
			||||||
  import { toRefs, withDefaults } from 'vue'
 | 
					  import { Ref, onMounted, ref, toRefs, withDefaults, onUnmounted } from 'vue'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  import Error from '@/components/Common/Error.vue'
 | 
					  import Error from '@/components/Common/Error.vue'
 | 
				
			||||||
  interface Props {
 | 
					  interface Props {
 | 
				
			||||||
@@ -17,4 +18,20 @@
 | 
				
			|||||||
    target: 'PAGE',
 | 
					    target: 'PAGE',
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
  const { target } = toRefs(props)
 | 
					  const { target } = toRefs(props)
 | 
				
			||||||
 | 
					  const timer = ref<number | undefined>()
 | 
				
			||||||
 | 
					  const errorDisplayed: Ref<boolean> = ref(false)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  onMounted(() => displayError())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  function displayError() {
 | 
				
			||||||
 | 
					    timer.value = setTimeout(() => {
 | 
				
			||||||
 | 
					      errorDisplayed.value = true
 | 
				
			||||||
 | 
					    }, 500)
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  onUnmounted(() => {
 | 
				
			||||||
 | 
					    if (timer.value) {
 | 
				
			||||||
 | 
					      clearTimeout(timer.value)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -145,6 +145,7 @@
 | 
				
			|||||||
  import {
 | 
					  import {
 | 
				
			||||||
    ComputedRef,
 | 
					    ComputedRef,
 | 
				
			||||||
    computed,
 | 
					    computed,
 | 
				
			||||||
 | 
					    onUnmounted,
 | 
				
			||||||
    reactive,
 | 
					    reactive,
 | 
				
			||||||
    ref,
 | 
					    ref,
 | 
				
			||||||
    toRefs,
 | 
					    toRefs,
 | 
				
			||||||
@@ -262,6 +263,8 @@
 | 
				
			|||||||
    formData.password = ''
 | 
					    formData.password = ''
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  onUnmounted(() => store.commit(ROOT_STORE.MUTATIONS.EMPTY_ERROR_MESSAGES))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  watch(
 | 
					  watch(
 | 
				
			||||||
    () => route.path,
 | 
					    () => route.path,
 | 
				
			||||||
    async () => {
 | 
					    async () => {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user