From 485b89194576e5baca6499962c3e3a488762acca Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 1 Aug 2019 17:43:02 +0200 Subject: [PATCH] Rename Video to Media --- CHANGELOG.md | 7 +- .../piecemaker/partials/ConversionJobs.vue | 4 +- .../SwimLane/MarkerDetailsSelected.vue | 2 +- .../piecemaker/partials/SwimLane/SwimLane.vue | 4 +- .../piecemaker/partials/sessions/Stream.vue | 2 +- .../partials/sessions/StreamDiagram.vue | 12 +- .../partials/sessions/StreamVideo.vue | 2 +- src/i18n/en/index.js | 56 +++--- src/pages/mosys/grids/create.vue | 2 +- src/pages/mosys/grids/edit.vue | 2 +- src/pages/piecemaker/dashboard.vue | 58 ------ src/pages/piecemaker/index.js | 10 +- .../piecemaker/{videos => media}/annotate.vue | 74 ++++---- .../piecemaker/{videos => media}/create.vue | 8 +- .../piecemaker/{videos => media}/edit.vue | 25 +-- .../piecemaker/{videos => media}/index.js | 0 .../piecemaker/{videos => media}/list.vue | 14 +- .../piecemaker/{videos => media}/sync.vue | 168 +++++++++--------- src/pages/piecemaker/timelines/edit.vue | 2 +- src/pages/piecemaker/timelines/index.js | 4 +- src/pages/piecemaker/timelines/list.vue | 10 +- src/pages/piecemaker/timelines/search.vue | 22 +-- src/pages/piecemaker/timelines/sessions.vue | 40 ++--- src/pages/piecemaker/timelines/user.vue | 67 ------- src/plugins/components.js | 8 +- src/router/routes/piecemaker.js | 42 ++--- 26 files changed, 252 insertions(+), 393 deletions(-) delete mode 100644 src/pages/piecemaker/dashboard.vue rename src/pages/piecemaker/{videos => media}/annotate.vue (90%) rename src/pages/piecemaker/{videos => media}/create.vue (92%) rename src/pages/piecemaker/{videos => media}/edit.vue (92%) rename src/pages/piecemaker/{videos => media}/index.js (100%) rename src/pages/piecemaker/{videos => media}/list.vue (93%) rename src/pages/piecemaker/{videos => media}/sync.vue (61%) delete mode 100644 src/pages/piecemaker/timelines/user.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index c3bfbf3c..a9d53d2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ app, including a local metadata service as store module `metadata-ffprobe` - Buttons now support right-click + open in new tab (still suffers from [#253](https://gitlab.rlp.net/motionbank/applications/systems-frontend/issues/253)) - Audio annotations (supported types: `.m4a` and `.mp3`) can be added -under `videos/create` (playback possible using forked +under `media/create` (playback possible using forked [vue-video-player](https://github.com/dasantonym/vue-video-player)) - Export timelines as CSV @@ -37,12 +37,13 @@ under `videos/create` (playback possible using forked - VideoPlayer uses [privacy-enhanced mode](https://support.google.com/youtube/answer/171780) for YouTube sources to be GDPR compliant - VideoPlayer uses [dnt](https://github.com/vimeo/player.js/#embed-options) -(do not track) option for showing Vimeo videos for GDPR compliance +(do not track) option for showing Vimeo media for GDPR compliance - Basic colors, look & feel - New post annotator layout - Vocabulary menu layout and functionality - Navigation redesign - MoSys redesign +- Renamed `Video` to `Media` throughout project ### Updated @@ -60,7 +61,7 @@ for YouTube sources to be GDPR compliant ### Removed - Unused store modules `forms`, `conversions` and `timecodes` -- Routes `videos/ingest` and `timelines/timecode` +- Routes `media/ingest` and `timelines/timecode` ## [1.3.1] - 2019-04-06 diff --git a/src/components/piecemaker/partials/ConversionJobs.vue b/src/components/piecemaker/partials/ConversionJobs.vue index 6320216f..7e4f2d7d 100644 --- a/src/components/piecemaker/partials/ConversionJobs.vue +++ b/src/components/piecemaker/partials/ConversionJobs.vue @@ -68,7 +68,7 @@ id: job.result.video, type: 'video/mp4' }, - type: 'Video', + type: 'Media', purpose: detail.purpose || 'linking' }, target @@ -81,7 +81,7 @@ await this.$store.dispatch('acl/set', {id: annotation.id, role: 'public', permissions: ['get']}) } this.$store.commit('conversions/removeJobDetail', jobId) - this.$root.$emit('updateVideos') + this.$root.$emit('updateMedia') this.$root.$emit('jobResult', { annotation, jobId, detail }) this.$store.commit('notifications/addMessage', { body: 'messages.conversion_successful', diff --git a/src/components/piecemaker/partials/SwimLane/MarkerDetailsSelected.vue b/src/components/piecemaker/partials/SwimLane/MarkerDetailsSelected.vue index 58f5bbc0..32abb26d 100644 --- a/src/components/piecemaker/partials/SwimLane/MarkerDetailsSelected.vue +++ b/src/components/piecemaker/partials/SwimLane/MarkerDetailsSelected.vue @@ -80,7 +80,7 @@ } }, pushToVideo (val) { - this.$router.push({name: 'piecemaker.videos.annotate', params: {id: val}}) + this.$router.push({name: 'piecemaker.media.annotate', params: {id: val}}) }, onMarkerUnselect () { this.annotationData = null diff --git a/src/components/piecemaker/partials/SwimLane/SwimLane.vue b/src/components/piecemaker/partials/SwimLane/SwimLane.vue index c479f8e7..7fe13782 100644 --- a/src/components/piecemaker/partials/SwimLane/SwimLane.vue +++ b/src/components/piecemaker/partials/SwimLane/SwimLane.vue @@ -182,7 +182,7 @@ 'start', 'duration', 'annotations', - 'video', + 'media', 'map', 'selectedMillis' ], @@ -406,7 +406,7 @@ this.jumpToMarker(this.selectedAnnotation.target.selector, useDuration) }, getVideoDate () { - return DateTime.fromMillis(this.video.target.selector._valueMillis) + return DateTime.fromMillis(this.media.target.selector._valueMillis) }, setupScreen () { console.log(this.dimensions.details, 'details dimen') diff --git a/src/components/piecemaker/partials/sessions/Stream.vue b/src/components/piecemaker/partials/sessions/Stream.vue index f0a71fea..06d12e8e 100644 --- a/src/components/piecemaker/partials/sessions/Stream.vue +++ b/src/components/piecemaker/partials/sessions/Stream.vue @@ -160,7 +160,7 @@ const _this = this switch (type) { case 'annotate': - return _this.$router.push(`/piecemaker/videos/${data.row._uuid}/annotate`) + return _this.$router.push(`/piecemaker/media/${data.row._uuid}/annotate`) } } } diff --git a/src/components/piecemaker/partials/sessions/StreamDiagram.vue b/src/components/piecemaker/partials/sessions/StreamDiagram.vue index d3b54129..d75d4bf2 100644 --- a/src/components/piecemaker/partials/sessions/StreamDiagram.vue +++ b/src/components/piecemaker/partials/sessions/StreamDiagram.vue @@ -41,17 +41,17 @@ :y2="`${((sessionTime / duration) * 100).toFixed(3)}%`") // SWIMLANES - vertical - // vertical visualization of the videos + // vertical visualization of the media // svg // @click="onClickVideo(vid)", svg.shadow-6( - v-if="session.videos", - v-for="(vid, i) in session.videos", + v-if="session.media", + v-for="(vid, i) in session.media", :id="vid.annotation._uuid", :width="20", :height="(((vid.metadata.duration * 1000) / duration) * 100).toFixed(3) + '%'", - :x="(session.videos.length * 10 + 15) * i + 20", + :x="(session.media.length * 10 + 15) * i + 20", :y="getSwimlaneY(vid.annotation)") rect.moba-swimlane(width="100%", height="100%", x="0", y="0", :title="vid.annotation._uuid") @@ -95,8 +95,8 @@ // VIDEO TIME // displays the actual time of the selected video // - svg(v-for="(vid, i) in session.videos") - svg(v-if="currentVideo === vid.annotation._uuid", :y="(sessionTime - 10)", :x="(session.videos.length * 10) + ((session.videos.length * 10 + 15) * i + 20) + 5") + svg(v-for="(vid, i) in session.media") + svg(v-if="currentVideo === vid.annotation._uuid", :y="(sessionTime - 10)", :x="(session.media.length * 10) + ((session.media.length * 10 + 15) * i + 20) + 5") polygon(points="10 0 0 10 10 20 60 20 60 0 10 0", fill="#749DFC") // rect(width="50", height="20", x="10", fill="#749DFC") text.q-caption(x="20", y="15", fill="white") {{ Math.floor(sessionTime / 60) }}:{{ Math.trunc(sessionTime - Math.floor(sessionTime / 60) * 60) }} diff --git a/src/components/piecemaker/partials/sessions/StreamVideo.vue b/src/components/piecemaker/partials/sessions/StreamVideo.vue index 0ceb0cce..1bb93684 100644 --- a/src/components/piecemaker/partials/sessions/StreamVideo.vue +++ b/src/components/piecemaker/partials/sessions/StreamVideo.vue @@ -11,7 +11,7 @@ // VIDEO PLAYER // div(:style="[fixDiagram ? styleActivePreview : styleActivePreviewDocked]") - video-player(v-if="video", :annotation="video.annotation", + media-player(v-if="video", :annotation="video.annotation", @ready="playerReady($event)", @time="onPlayerTime($event)") .absolute-top-left.q-mt-sm.q-ml-sm(@mousedown="resizeButtonDown") diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 0ad4f369..20b1cbd1 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -7,7 +7,7 @@ export default { apply_synchronisation: 'Apply Synchronisation', annotate: 'Annotate', add_term: 'Add Term', - add_video: 'Add Video', + add_media: 'Add Media', add_vocabulary: 'Add Vocabulary', add_and_go: 'Add & Go', back: 'Back', @@ -45,7 +45,7 @@ export default { search: 'Search', submit: 'Submit', synchronize: 'Sync', - videos: 'Videos', + media: 'Media', yes: 'Yes' }, checkboxes: { @@ -105,8 +105,8 @@ export default { access_control_add_group: 'Add to group', access_control_remove_group: 'Remove from group', associated_timeline: 'Associated timeline', - associated_timeline_warning: 'WARNING: If you already annotated this video, your annotations are linked to the original timeline. Changing the associated timeline will only reassign the video, not the existing annotations.', - recursive: 'Apply to all contained annotations and videos', + associated_timeline_warning: 'WARNING: If you already annotated this, your annotations are linked to the original timeline. Changing the associated timeline will only reassign this reference time, not the existing annotations.', + recursive: 'Apply to all contained annotations and media', add_group: 'Add Group', add_term: 'Add Term', annotations: 'Annotations', @@ -160,10 +160,10 @@ export default { title_unknown: 'Unknown Title', timeline: 'Timeline', type: 'Type', - video_duration: 'Video duration', - video_title: 'Video title', - video_url: 'Video URL', - video: 'Videos', + media_duration: 'Media duration', + media_title: 'Media title', + media_url: 'Media URL', + media: 'Media', vocabulary_entry: 'Vocabularies' }, links: { @@ -192,14 +192,14 @@ export default { confirm_delete: 'Delete this item?', updated_annotation: 'Updated annotation', url_copied: 'URL copied to clipboard', - caution_video_time_override: 'Caution: Changing a video\'s time does not update existing annotations!', + caution_media_time_override: 'Caution: Changing media reference time does not update associated annotations!', browser_unsupported_warning: 'Unsupported browser: For optimal performance please use ' + 'Google Chrome or ' + 'Chromium.
' + 'While the site might work on your browser, more or less subtle problems can occur. You have been warned!' }, navigation: { - annotate_video: 'Annotate Video', + annotate_media: 'Annotate Media', maps: 'Maps', contact: 'Contact', imprint: 'Imprint', @@ -212,10 +212,10 @@ export default { label: 'Piecemaker', piecemaker_timelines_list: 'Timelines', piecemaker_timelines_annotate: 'Live annotate', - piecemaker_videos_list: 'Videos', - piecemaker_videos_annotate: 'Annotate', - piecemaker_videos_edit: 'Edit', - piecemaker_videos_sync: 'Sync', + piecemaker_media_list: 'Media', + piecemaker_media_annotate: 'Annotate', + piecemaker_media_edit: 'Edit', + piecemaker_media_sync: 'Sync', piecemaker_timelines_search: 'Search', piecemaker_timelines_edit: 'Edit', piecemaker_timelines_create: 'Create timeline' @@ -254,9 +254,9 @@ export default { } }, annotate: { - video: { - title: 'Annotate Video', - caption: 'Select a map and enter a video URL to start annotating.' + media: { + title: 'Annotate Media', + caption: 'Select a map and enter a media URL to start annotating.' } }, errors: { @@ -367,27 +367,27 @@ export default { title: 'Users in this timeline', caption: '.' }, - videos: { - title: 'Videos', + media: { + title: 'Media', caption: '.' } }, - videos: { + media: { list: { - title: 'Videos', - caption: 'All your most wonderful videos are here.' + title: 'Media', + caption: 'All your most wonderful media are here.' }, edit: { - title: 'Edit Video', - caption: 'Edit video details.' + title: 'Edit media', + caption: 'Edit media details.' }, create: { - title: 'Add Video', - caption: 'Add a new video to your timeline.' + title: 'Add Media', + caption: 'Add a new media to your timeline.' }, sync: { - title: 'Sync Video', - caption: 'Synchronize a video with others.' + title: 'Sync Media', + caption: 'Synchronize media reference time.' } } }, diff --git a/src/pages/mosys/grids/create.vue b/src/pages/mosys/grids/create.vue index 884f1f04..1e6af619 100644 --- a/src/pages/mosys/grids/create.vue +++ b/src/pages/mosys/grids/create.vue @@ -53,7 +53,7 @@ Authorization: `Bearer ${localStorage.getItem('access_token')}` }, type: constants.mapTypes.MAP_TYPE_2DGRID, - payload: undefined, + payload: {}, schema: { fields: { title: { diff --git a/src/pages/mosys/grids/edit.vue b/src/pages/mosys/grids/edit.vue index 30870e9f..d187b972 100644 --- a/src/pages/mosys/grids/edit.vue +++ b/src/pages/mosys/grids/edit.vue @@ -34,7 +34,7 @@ q-select(v-model="acl.group_remove", :clearable="true", :clear-value="undefined", :float-label="$t('labels.access_control_remove_group')", :options="availableRoles", dark) - // apply to all contained annotations and videos + // apply to all contained annotations and media content-paragraph q-checkbox(v-model="acl.recursive", :label="$t('labels.recursive')", dark) diff --git a/src/pages/piecemaker/dashboard.vue b/src/pages/piecemaker/dashboard.vue deleted file mode 100644 index a78255b5..00000000 --- a/src/pages/piecemaker/dashboard.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/src/pages/piecemaker/index.js b/src/pages/piecemaker/index.js index f4ab7988..ac490e81 100644 --- a/src/pages/piecemaker/index.js +++ b/src/pages/piecemaker/index.js @@ -1,13 +1,7 @@ -import dashboard from './dashboard' import * as timelines from './timelines' -import * as videos from './videos' -import * as codarts from './codarts' -import * as users from './users' +import * as media from './media' export { - dashboard, timelines, - videos, - codarts, - users + media } diff --git a/src/pages/piecemaker/videos/annotate.vue b/src/pages/piecemaker/media/annotate.vue similarity index 90% rename from src/pages/piecemaker/videos/annotate.vue rename to src/pages/piecemaker/media/annotate.vue index dbdc2f1f..0c37b0d2 100644 --- a/src/pages/piecemaker/videos/annotate.vue +++ b/src/pages/piecemaker/media/annotate.vue @@ -11,11 +11,11 @@ .bg-dark.relative-position(style="height: calc(100vh - 52px);") - // video player + // meta player div.relative(:style="{height: videoHeight + 'px', maxHeight: viewport.height - 52 - 250 + 'px'}", :class="[!visibilitySwimlanes ? 'fit' : '']") - video-player.full-height.relative-position(v-if="video", :annotation="video", :fine-controls="true", + media-player.full-height.relative-position(v-if="media", :annotation="media", :fine-controls="true", @ready="playerReady($event)", @time="onPlayerTime($event)") // swimlane content @@ -32,10 +32,10 @@ :timelineUuid="timeline._uuid", :markerDetails="false", :resizable="true", - :start="getVideoDate().toMillis()", - :duration="getVideoDuration()", + :start="getMediaDate().toMillis()", + :duration="getMediaDuration()", :annotations="annotations", - :video="video", + :media="media", :key="componentKey", :selectedMillis="selectedMillis", :focusedAnnotation="focusedAnnotation", @@ -88,7 +88,7 @@ timecode-label( @click.native="gotoSelector(annotation.target.selector, false, annotation)", :millis="annotation.target.selector._valueMillis", - :videoDate="getVideoDate()" + :videoDate="getMediaDate()" ) // annotation has duration template(v-if="annotation.target.selector._valueDuration") @@ -96,7 +96,7 @@ timecode-label( @click.native="gotoSelector(annotation.target.selector, true, annotation)", :millis="getAnnotationEndMillis(annotation)", - :videoDate="getVideoDate()" + :videoDate="getMediaDate()" ) // add timecode button template(v-else) @@ -147,8 +147,6 @@ import TimecodeLabel from '../../../components/piecemaker/partials/TimecodeLabel' import AnnotationIcon from '../../../components/piecemaker/partials/AnnotationIcon' - // import { EventHub } from '../../../components/piecemaker/partials/SwimLane/EventHub' - const { getScrollTarget, setScrollPosition } = scroll export default { @@ -161,7 +159,7 @@ async mounted () { if (this.$route.params.uuid) { this.$q.loading.show() - await this.getVideo() + await this.getMedia() await this.getAnnotations() this.$q.loading.hide() } @@ -187,7 +185,7 @@ staging: process.env.IS_STAGING, timelineUuid: undefined, timeline: undefined, - video: undefined, + media: undefined, // detailsSize: 300, editAnnotationIndex: undefined, editAnnotationBuffer: undefined, @@ -234,15 +232,15 @@ return idx }, baseSelector () { - if (!this.video) return DateTime.local().toISO() + if (!this.media) return DateTime.local().toISO() const - parsed = this.video.target.selector.parse(), + parsed = this.media.target.selector.parse(), start = Array.isArray(parsed['date-time:t']) ? parsed['date-time:t'][0] : parsed['date-time:t'] return start.plus(this.playerTime * 1000).toISO() }, baseMillis () { - if (!this.video) return DateTime.local().toMillis() - return this.video.target.selector._valueMillis + this.playerTime * 1000 + if (!this.media) return DateTime.local().toMillis() + return this.media.target.selector._valueMillis + this.playerTime * 1000 }, isEditingAnnotations () { return typeof this.editAnnotationIndex === 'number' @@ -254,7 +252,7 @@ }, watch: { storeCursorTop (val) { - this.videoHeight = val - this.headerHeight + this.mediaHeight = val - this.headerHeight this.swimlanesHeight = (this.viewport.height - val) }, visibilityDrawer (val) { @@ -274,11 +272,11 @@ setupScreen () { this.$store.commit('swimLane/setSelectedAnnotation', null) if (this.$store.state.swimLane.cursorTop) { - this.videoHeight = this.$store.state.swimLane.cursorTop - this.headerHeight + this.mediaHeight = this.$store.state.swimLane.cursorTop - this.headerHeight this.swimlanesHeight = (this.viewport.height - this.$store.state.swimLane.cursorTop) } else { - this.videoHeight = this.viewport.height / 2 - this.headerHeight + this.mediaHeight = this.viewport.height / 2 - this.headerHeight this.swimlanesHeight = this.viewport.height / 2 } }, @@ -293,14 +291,14 @@ onEmitResize (val) { if (this.swimlanes) { this.swimlanesHeight = (this.viewport.height + this.headerHeight - val) - this.videoHeight = this.viewport.height - 52 - this.swimlanesHeight + this.mediaHeight = this.viewport.height - 52 - this.swimlanesHeight } }, */ onViewportResize (size) { this.viewport.height = size.height this.viewport.width = size.width - this.videoHeight = this.viewport.height - 52 - this.swimlanesHeight + this.mediaHeight = this.viewport.height - 52 - this.swimlanesHeight }, handlerToggle (val) { switch (val) { @@ -321,12 +319,12 @@ AppFullscreen.toggle() this.fullscreen = !this.fullscreen }, - async getVideo () { - this.video = await this.$store.dispatch('annotations/get', this.$route.params.uuid) - this.timeline = await this.$store.dispatch('maps/get', parseURI(this.video.target.id).uuid) - this.$root.$emit('setBackButton', '/piecemaker/timelines/' + parseURI(this.video.target.id).uuid + '/videos') - if (this.video) { - this.metadata = await this.$store.dispatch('metadata/getLocal', this.video) + async getMedia () { + this.media = await this.$store.dispatch('annotations/get', this.$route.params.uuid) + this.timeline = await this.$store.dispatch('maps/get', parseURI(this.media.target.id).uuid) + this.$root.$emit('setBackButton', '/piecemaker/timelines/' + parseURI(this.media.target.id).uuid + '/media') + if (this.media) { + this.metadata = await this.$store.dispatch('metadata/getLocal', this.media) } }, async getAnnotations () { @@ -335,12 +333,12 @@ query = { 'target.id': this.timeline.id, 'target.type': constants.mapTypes.MAP_TYPE_TIMELINE, - 'target.selector._valueMillis': { $gte: this.video.target.selector._valueMillis }, + 'target.selector._valueMillis': { $gte: this.media.target.selector._valueMillis }, 'body.type': { $in: ['TextualBody', 'VocabularyEntry'] } } - if (this.video.target.selector._valueDuration) { - query['target.selector._valueMillis']['$lte'] = this.video.target.selector._valueMillis + - this.video.target.selector._valueDuration + if (this.media.target.selector._valueDuration) { + query['target.selector._valueMillis']['$lte'] = this.media.target.selector._valueMillis + + this.media.target.selector._valueDuration } const results = await this.$store.dispatch('annotations/find', query) for (let item of results.items) { @@ -430,7 +428,7 @@ parsed = selector.parse(), start = Array.isArray(parsed['date-time:t']) ? parsed['date-time:t'][0] : parsed['date-time:t'] this.$router.push({ query: { datetime: start } }) - let millis = selector._valueMillis - this.video.target.selector._valueMillis + let millis = selector._valueMillis - this.media.target.selector._valueMillis if (useDuration) { millis += selector._valueDuration this.selectedMillis = selector._valueMillis + selector._valueDuration @@ -460,7 +458,7 @@ }, formatSelectorForList (val) { const annotationDate = DateTime.fromMillis(val._valueMillis) - const videoDate = DateTime.fromMillis(this.video.target.selector._valueMillis) + const videoDate = DateTime.fromMillis(this.media.target.selector._valueMillis) return Interval.fromDateTimes(videoDate, annotationDate) .toDuration() .toFormat(constants.config.TIMECODE_FORMAT) @@ -473,11 +471,11 @@ this.editAnnotationIndex = i this.editAnnotationBuffer = this.annotations[i].body.value }, - getVideoDate () { - return DateTime.fromMillis(this.video.target.selector._valueMillis) + getMediaDate () { + return DateTime.fromMillis(this.media.target.selector._valueMillis) }, - getVideoDuration () { - const duration = this.video.target.selector.getDuration() + getMediaDuration () { + const duration = this.media.target.selector.getDuration() if (duration) { return duration.as('milliseconds') } @@ -491,7 +489,7 @@ addDurationToAnnotation (annotation) { if (annotation.target.selector) { const currentStart = annotation.target.selector._valueMillis - const newTimecode = Math.round(this.playerTime * 1000) + this.video.target.selector._valueMillis + const newTimecode = Math.round(this.playerTime * 1000) + this.media.target.selector._valueMillis if (newTimecode !== currentStart) { const d0 = DateTime.fromMillis(currentStart) @@ -509,7 +507,7 @@ selectAnnotation (annotation) { // this.selectedMillis = annotation.target.selector._valueMillis this.gotoSelector(annotation.target.selector) - // this.gotoMillis(annotation.target.selector._valueMillis - this.video.target.selector._valueMillis) + // this.gotoMillis(annotation.target.selector._valueMillis - this.media.target.selector._valueMillis) this.$store.commit('swimLane/setSelectedAnnotation', annotation) } } diff --git a/src/pages/piecemaker/videos/create.vue b/src/pages/piecemaker/media/create.vue similarity index 92% rename from src/pages/piecemaker/videos/create.vue rename to src/pages/piecemaker/media/create.vue index 5dd9e654..23883f2f 100644 --- a/src/pages/piecemaker/videos/create.vue +++ b/src/pages/piecemaker/media/create.vue @@ -2,13 +2,13 @@ full-screen content-block(:position="'first'") - headline(:content="$t('routes.piecemaker.videos.create.title')") + headline(:content="$t('routes.piecemaker.media.create.title')") content-paragraph(:position="'first'") calendar-time-main(@update="onCalendarUpdate") content-paragraph(:position="'last'") - form-main(v-model="payload", :schema="schema", ref="videoForm") + form-main(v-model="payload", :schema="schema", ref="mediaForm") q-btn(label="Cancel", @click.native="$router.push({name: 'piecemaker.timelines.show', params: {uuid: $route.params.timelineUuid} })") @@ -51,7 +51,7 @@ url: { fullWidth: true, type: 'text', - label: 'labels.video_url', + label: 'labels.media_url', errorLabel: 'errors.field_required', validators: { required @@ -92,7 +92,7 @@ if (metadata) { await titleHelper.create(_this.$store, annotation.id, metadata.title) } - _this.$router.push(`/piecemaker/videos/${annotation._uuid}/edit`) + _this.$router.push(`/piecemaker/media/${annotation._uuid}/edit`) } } } diff --git a/src/pages/piecemaker/videos/edit.vue b/src/pages/piecemaker/media/edit.vue similarity index 92% rename from src/pages/piecemaker/videos/edit.vue rename to src/pages/piecemaker/media/edit.vue index a958e5fb..cc96d135 100644 --- a/src/pages/piecemaker/videos/edit.vue +++ b/src/pages/piecemaker/media/edit.vue @@ -2,18 +2,18 @@ full-screen content-block(:position="'first'") - headline(:content="$t('routes.piecemaker.videos.edit.title') + ':'") + headline(:content="$t('routes.piecemaker.media.edit.title') + ':'") | {{ payload.title }} ({{ duration }}) content-paragraph(:position="'first'") calendar-time-main(:datetime="selectorValue", @update="onCalendarUpdate") content-paragraph - // p.q-mt-md {{ $t('labels.video_duration') }}: {{ duration }} - p(v-if="selectorOverride !== selectorValue") {{ $t('messages.caution_video_time_override') }} + // p.q-mt-md {{ $t('labels.media_duration') }}: {{ duration }} + p(v-if="selectorOverride !== selectorValue") {{ $t('messages.caution_media_time_override') }} content-paragraph - form-main(v-model.lazy="payload", :schema="schema", ref="videoForm") + form-main(v-model.lazy="payload", :schema="schema", ref="mediaForm") content-paragraph(:position="'last'") access-control @@ -50,10 +50,10 @@ onCalendarUpdate (val) { this.selectorOverride = val }, - async getVideo () { - this.video = await this.$store.dispatch('annotations/get', this.$route.params.uuid) - this.timeline = await this.$store.dispatch('maps/get', parseURI(this.video.target.id).uuid) - this.$root.$emit('setBackButton', '/piecemaker/timelines/' + parseURI(this.video.target.id).uuid + '/videos') + async getMedia () { + this.media = await this.$store.dispatch('annotations/get', this.$route.params.uuid) + this.timeline = await this.$store.dispatch('maps/get', parseURI(this.media.target.id).uuid) + this.$root.$emit('setBackButton', '/piecemaker/timelines/' + parseURI(this.media.target.id).uuid + '/media') } }, computed: { @@ -95,7 +95,7 @@ label: item.title } }).sort((a, b) => (a.label || '').localeCompare(b.label || '')) - await this.getVideo() + await this.getMedia() this.$q.loading.hide() }, data () { @@ -104,6 +104,7 @@ apiPayload: undefined, selectorOverride: undefined, titlePayload: undefined, + media: undefined, meta: undefined, map: undefined, annotation: undefined, @@ -135,7 +136,7 @@ url: { fullWidth: true, type: 'text', - label: 'labels.video_url', + label: 'labels.media_url', errorLabel: 'errors.field_required', validators: { required @@ -144,7 +145,7 @@ title: { fullWidth: true, type: 'text', - label: 'labels.video_title' + label: 'labels.media_title' }, tags: { fullWidth: true, @@ -197,7 +198,7 @@ await context.$store.dispatch('tags/set', [context.payload, context.payload.tags]) context.$router.push({ - name: 'piecemaker.videos.list', + name: 'piecemaker.media.list', params: { timelineUuid: parseURI(context.payload.gid).uuid } }) } diff --git a/src/pages/piecemaker/videos/index.js b/src/pages/piecemaker/media/index.js similarity index 100% rename from src/pages/piecemaker/videos/index.js rename to src/pages/piecemaker/media/index.js diff --git a/src/pages/piecemaker/videos/list.vue b/src/pages/piecemaker/media/list.vue similarity index 93% rename from src/pages/piecemaker/videos/list.vue rename to src/pages/piecemaker/media/list.vue index ea798f56..861aa6f1 100644 --- a/src/pages/piecemaker/videos/list.vue +++ b/src/pages/piecemaker/media/list.vue @@ -3,13 +3,13 @@ confirm-modal(ref="confirmModal", @confirm="handleConfirmModal") content-block(:position="'first'") - headline(v-if="timeline", :content="$t('routes.piecemaker.videos.list.title')") + headline(v-if="timeline", :content="$t('routes.piecemaker.media.list.title')") | {{ timeline.title }} content-paragraph(:position="'first'") - data-table(v-if="query", ref="listTable", :config="config", :title="'routes.piecemaker.videos.list.title'", - path="annotations", :query="query", base-path="videos", :request-transform="requestTransform", - :customTitleLink="'piecemaker.videos.annotate'") + data-table(v-if="query", ref="listTable", :config="config", :title="'routes.piecemaker.media.list.title'", + path="annotations", :query="query", base-path="media", :request-transform="requestTransform", + :customTitleLink="'piecemaker.media.annotate'") - - diff --git a/src/plugins/components.js b/src/plugins/components.js index 462bad88..69297b3f 100644 --- a/src/plugins/components.js +++ b/src/plugins/components.js @@ -7,8 +7,8 @@ import { MarkdownDisplay, Uploader, Username, - VideoPlayer, - VideoTitle + MediaPlayer, + MediaTitle } from '../components/shared' export default ({ Vue }) => { @@ -18,8 +18,8 @@ export default ({ Vue }) => { Vue.component('full-screen', FullScreen) Vue.component('uploader', Uploader) Vue.component('username', Username) - Vue.component('video-player', VideoPlayer) - Vue.component('video-title', VideoTitle) + Vue.component('media-player', MediaPlayer) + Vue.component('media-title', MediaTitle) Vue.component('browser-warning', BrowserWarning) Vue.component('markdown-display', MarkdownDisplay) } diff --git a/src/router/routes/piecemaker.js b/src/router/routes/piecemaker.js index e9e37a76..37f1400d 100644 --- a/src/router/routes/piecemaker.js +++ b/src/router/routes/piecemaker.js @@ -4,9 +4,7 @@ export default { children: [ { path: '/piecemaker', - component: () => import('pages/piecemaker/dashboard'), - name: 'piecemaker.dashboard', - meta: {private: true} + redirect: {name: 'piecemaker.timelines.list'} }, { @@ -21,12 +19,6 @@ export default { name: 'piecemaker.timelines.create', meta: {private: true} }, - { - path: '/piecemaker/timelines/user', - component: () => import('pages/piecemaker/timelines/user'), - name: 'piecemaker.timelines.user', - meta: {private: true} - }, { path: '/piecemaker/timelines/:uuid/sessions', component: () => import('pages/piecemaker/timelines/sessions'), @@ -53,18 +45,18 @@ export default { }, { path: '/piecemaker/timelines/:timelineUuid', - redirect: { name: 'piecemaker.videos.list' } + redirect: { name: 'piecemaker.media.list' } }, { - path: '/piecemaker/timelines/:timelineUuid/videos', - component: () => import('pages/piecemaker/videos/list'), - name: 'piecemaker.videos.list', + path: '/piecemaker/timelines/:timelineUuid/media', + component: () => import('pages/piecemaker/media/list'), + name: 'piecemaker.media.list', meta: {private: true} }, { - path: '/piecemaker/timelines/:timelineUuid/videos/create', - component: () => import('pages/piecemaker/videos/create'), - name: 'piecemaker.videos.create', + path: '/piecemaker/timelines/:timelineUuid/media/create', + component: () => import('pages/piecemaker/media/create'), + name: 'piecemaker.media.create', meta: {private: true} }, { @@ -75,21 +67,21 @@ export default { }, { - path: '/piecemaker/videos/:uuid/annotate', - component: () => import('pages/piecemaker/videos/annotate'), - name: 'piecemaker.videos.annotate', + path: '/piecemaker/media/:uuid/annotate', + component: () => import('pages/piecemaker/media/annotate'), + name: 'piecemaker.media.annotate', meta: {private: true} }, { - path: '/piecemaker/videos/:uuid/edit', - component: () => import('pages/piecemaker/videos/edit'), - name: 'piecemaker.videos.edit', + path: '/piecemaker/media/:uuid/edit', + component: () => import('pages/piecemaker/media/edit'), + name: 'piecemaker.media.edit', meta: {private: true} }, { - path: '/piecemaker/videos/:uuid/sync', - component: () => import('pages/piecemaker/videos/sync'), - name: 'piecemaker.videos.sync', + path: '/piecemaker/media/:uuid/sync', + component: () => import('pages/piecemaker/media/sync'), + name: 'piecemaker.media.sync', meta: {private: true} } ] -- GitLab