From 52a30e7ee6906e7d8122974679d28e3d5d1c027c Mon Sep 17 00:00:00 2001 From: Bryon Lewis Date: Thu, 22 Feb 2024 12:33:43 -0500 Subject: [PATCH] initial annotation-recording list --- client/src/components/AnnotationList.vue | 52 +++-- client/src/components/RecordingList.vue | 286 +++++++++++++++++++++++ client/src/views/Spectrogram.vue | 5 +- 3 files changed, 328 insertions(+), 15 deletions(-) create mode 100644 client/src/components/RecordingList.vue diff --git a/client/src/components/AnnotationList.vue b/client/src/components/AnnotationList.vue index 88224ce..a814662 100644 --- a/client/src/components/AnnotationList.vue +++ b/client/src/components/AnnotationList.vue @@ -3,10 +3,12 @@ import { defineComponent, PropType } from "vue"; import { SpectroInfo } from './geoJS/geoJSUtils'; import useState from "../use/useState"; import { watch, ref } from "vue"; +import RecordingList from "./RecordingList.vue"; export default defineComponent({ name: "AnnotationList", components: { + RecordingList, }, props: { spectroInfo: { @@ -36,9 +38,13 @@ export default defineComponent({ // eslint-disable-next-line @typescript-eslint/no-explicit-any const tabSwitch = (event: any) => { // On tab switches we want to deselect the curret anntation - tab.value = event as 'sequence' | 'pulse'; - selectedType.value = event as 'sequence' | 'pulse'; - selectedId.value = null; + if (['sequence', 'pulse'].includes(event)) { + tab.value = event as 'sequence' | 'pulse'; + selectedType.value = event as 'sequence' | 'pulse'; + selectedId.value = null; + } else { + tab.value = 'recordings'; + } }; return { @@ -60,20 +66,38 @@ export default defineComponent({