From 2c49f5abf8c1b4ff255705c9ee0b637a8e234435 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Mon, 8 May 2023 15:02:12 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20(record)=20hide=20recycle=20butt?= =?UTF-8?q?on=20when=20there=20is=20no=20record=20yet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/record/components/RecordControls.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/modules/record/components/RecordControls.vue b/src/modules/record/components/RecordControls.vue index da7435a..e0f5c38 100644 --- a/src/modules/record/components/RecordControls.vue +++ b/src/modules/record/components/RecordControls.vue @@ -42,12 +42,12 @@ const getNextStepId = () => { return null } -const canStart = computed( - () => - !recordStore.currentStepId && - Object.values(record.value?.stepRecords ?? {}).length === 0 +const hasStarted = computed( + () => Object.values(record.value?.stepRecords ?? {}).length > 0 ) +const canStart = computed(() => !recordStore.currentStepId && !hasStarted.value) + const startRecording = () => { if (!canStart.value || !task.value) { return @@ -142,7 +142,11 @@ onUnmounted(() => { -