From 9247053af601880f602d4a1df78f1ec430f2a9a4 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sun, 21 Apr 2024 00:29:34 +0200 Subject: [PATCH] with left and right --- src/views/task/TaskHistory.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/task/TaskHistory.vue b/src/views/task/TaskHistory.vue index ca41d24..5ef1e5f 100644 --- a/src/views/task/TaskHistory.vue +++ b/src/views/task/TaskHistory.vue @@ -2,6 +2,7 @@ import EstimationTimeArrival from '@/components/EstimationTimeArrival.vue' import { adaptStepsToTextarea } from '@/modules/task/infra/adaptStepsToTextarea' import { useTaskStore } from '@/modules/task/stores/useTask.store' +import { logicOr } from '@vueuse/math' import { useMagicKeys, whenever } from '@vueuse/core' import { computed, ref } from 'vue' import { useRouter } from 'vue-router' @@ -43,13 +44,13 @@ const isNextDisabled = computed( currentIndex.value === task.value?.stepHistory.length - 2 ) -const { n, p } = useMagicKeys() +const { n, p, right, left } = useMagicKeys() -whenever(p, () => { +whenever(logicOr(p, left), () => { goToPrev() }) -whenever(n, () => { +whenever(logicOr(n, right), () => { goToNext() })