-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRecordingInfoDialog.vue
More file actions
49 lines (45 loc) · 1.18 KB
/
RecordingInfoDialog.vue
File metadata and controls
49 lines (45 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<script lang="ts">
import { defineComponent, onMounted, ref, Ref, watch, PropType } from 'vue';
import { getRecording, Recording } from '../api/api';
import useState from '@use/useState';
import RecordingInfoDisplay from './RecordingInfoDisplay.vue';
export default defineComponent({
components: {
RecordingInfoDisplay
},
props: {
id: {
type: String,
required: true,
},
displayMode: {
type: String as PropType<'both' | 'metadata' | 'map'>,
default: 'both',
}
},
emits: ['close'],
setup(props) {
const recordingInfo: Ref<Recording | null> = ref(null);
const { configuration } = useState();
const loadData = async () => {
const recording = getRecording(props.id);
recordingInfo.value = (await recording).data;
};
watch(() => props.id, () => loadData());
onMounted(() => loadData());
return {
recordingInfo,
configuration,
};
},
});
</script>
<template>
<recording-info-display
v-if="recordingInfo"
:recording-info="recordingInfo"
:minimal-metadata="configuration.mark_annotations_completed_enabled"
:display-mode="displayMode"
@close="$emit('close')"
/>
</template>