Commit 23a7ea47 authored by anton's avatar anton

Use TimecodeLabel in CellAnnotationList.vue

parent 8dc0d5ea
Pipeline #50994 passed with stage
in 5 minutes and 48 seconds
......@@ -17,7 +17,11 @@
.annotation-content-container
q-item.annotation(v-for="(annotation, index) in annotations", v-show="index === activeTabIdx", :key="`annotation-${index}`")
div
.date {{formatSelectorForList(annotation)}}
timecode-label(
@click.native="gotoSelector(annotation.target.selector, false, annotation)",
:millis="annotation.target.selector._valueMillis",
:videoDate="getMediaDate()")
// .date {{formatSelectorForList(annotation)}}
markdown-display.content(:content="annotation.body.value")
//-------------------------------------------------------------------------------------------------- annotations
......@@ -45,7 +49,10 @@
q-item-main
//----- time
q-item-tile(:class="[index === currentIndex ? 'text-grey-5': 'text-grey-8']")
| {{formatSelectorForList(annotation)}}
timecode-label(
@click.native="gotoSelector(annotation.target.selector, false, annotation)",
:millis="annotation.target.selector._valueMillis",
:videoDate="getMediaDate()")
//----- annotation
q-item-tile.q-mt-sm(:class="[index === currentIndex ? 'text-dark': 'text-grey-3']")
......@@ -68,12 +75,14 @@ import constants from 'mbjs-data-models/src/constants'
import CellInfo from '../CellInfo'
import Username from '../../../shared/elements/Username'
import MarkdownDisplay from '../../../shared/elements/MarkdownDisplay'
import TimecodeLabel from '../../../piecemaker/partials/TimecodeLabel'
export default {
components: {
CellInfo,
Username,
MarkdownDisplay
MarkdownDisplay,
TimecodeLabel
},
props: ['cell', 'display', 'preview', 'visible'],
data () {
......@@ -257,6 +266,9 @@ export default {
this.annotationTimes = []
this.annotations.forEach(a => this.annotationTimes.push(DateTime.fromMillis(a.target.selector._valueMillis)))
} // TODO: else, show not found?
},
getMediaDate () {
return DateTime.fromMillis(this.video.target.selector._valueMillis)
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment