💄 (record) hide recycle button when there is no record yet
This commit is contained in:
@@ -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(() => {
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<button class="button is-warning" @click="recordStore.reset(taskId)">
|
||||
<button
|
||||
v-if="hasStarted"
|
||||
class="button is-warning"
|
||||
@click="recordStore.reset(taskId)"
|
||||
>
|
||||
<img src="/icons/recycle.svg" alt="reset" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user