From 8451d8121f2cb2e246569d8d14fb4d6470db016c Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Tue, 21 Jan 2025 17:50:39 +0100 Subject: [PATCH 1/6] [tasks] Add missing difficulty field to task export --- src/components/lists/TaskList.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/lists/TaskList.vue b/src/components/lists/TaskList.vue index 6e1fc6955..7c6c69e86 100644 --- a/src/components/lists/TaskList.vue +++ b/src/components/lists/TaskList.vue @@ -873,6 +873,7 @@ export default { this.$t('tasks.fields.entity_name'), this.$t('tasks.fields.task_status'), this.$t('tasks.fields.assignees'), + this.$t('tasks.fields.difficulty'), this.$t('tasks.fields.estimation'), this.$t('tasks.fields.duration'), this.$t('tasks.fields.retake_count'), @@ -904,6 +905,7 @@ export default { this.getEntity(task.entity.id).name, task.task_status_short_name, assignees, + task.difficulty, this.formatDuration(task.estimation), this.formatDuration(task.duration), task.retake_count, From 566cedc9f494a01e78ec89fa89b440d774ab453a Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Tue, 21 Jan 2025 18:08:27 +0100 Subject: [PATCH 2/6] [previews] Always save annotations before clearing the canvas --- src/components/mixins/annotation.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/mixins/annotation.js b/src/components/mixins/annotation.js index 65fac9175..3307546d1 100644 --- a/src/components/mixins/annotation.js +++ b/src/components/mixins/annotation.js @@ -1291,6 +1291,7 @@ export const annotationMixin = { * Remove all drawing objects from the fabric canvas */ clearCanvas() { + this.endAnnotationSaving() if (this.fabricCanvas) { this.fabricCanvas.clear() } From 880470c019d27fbca4bda2ea08e2048e3e9bbf40 Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Tue, 21 Jan 2025 22:33:48 +0100 Subject: [PATCH 3/6] [playlist] Fix annotation loading - Reload annotations locally to avoid weird effects when the current frame is changed - Load first frame annotation on video loading --- src/components/mixins/player.js | 1 + src/components/pages/playlists/PlaylistPlayer.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/mixins/player.js b/src/components/mixins/player.js index 77848f986..80eca039b 100644 --- a/src/components/mixins/player.js +++ b/src/components/mixins/player.js @@ -739,6 +739,7 @@ export const playerMixin = { onProgressChanged(frameNumber, updatePlaylistProgress = true) { this.clearCanvas() + this.reloadAnnotations() if (this.isCurrentPreviewPicture) { this.framesSeenOfPicture = frameNumber + 1 diff --git a/src/components/pages/playlists/PlaylistPlayer.vue b/src/components/pages/playlists/PlaylistPlayer.vue index 26f4afef6..82d64babc 100644 --- a/src/components/pages/playlists/PlaylistPlayer.vue +++ b/src/components/pages/playlists/PlaylistPlayer.vue @@ -1563,6 +1563,7 @@ export default { width: this.currentPreview.width, height: this.currentPreview.height } + this.loadAnnotation(this.getAnnotation(0)) } }, From bff6ab0837a4dd7a0a4f0fb39fb472670a76a4b5 Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Tue, 21 Jan 2025 22:35:59 +0100 Subject: [PATCH 4/6] [previews] Fix wrong video positioning --- src/components/previews/VideoViewer.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/previews/VideoViewer.vue b/src/components/previews/VideoViewer.vue index b504aaa13..0c72b7b6b 100644 --- a/src/components/previews/VideoViewer.vue +++ b/src/components/previews/VideoViewer.vue @@ -520,6 +520,9 @@ export default { this.resetPanZoom() this.maxDuration = '00:00.000' this.pause() + this.$nextTick(() => { + this.resetPanZoom() + }) }, light() { From 1d49900e39af3b0057cb992c854f8a14733face7 Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Tue, 21 Jan 2025 22:36:23 +0100 Subject: [PATCH 5/6] [previews] Avoid applying annotation undo to comment box --- src/components/mixins/player.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/mixins/player.js b/src/components/mixins/player.js index 80eca039b..4594d68ef 100644 --- a/src/components/mixins/player.js +++ b/src/components/mixins/player.js @@ -962,6 +962,7 @@ export const playerMixin = { ) { this.onAnnotateClicked() } else if ((event.ctrlKey || event.metaKey) && event.keyCode === 90) { + event.preventDefault() this.undoLastAction() } else if (event.altKey && event.keyCode === 82) { this.redoLastAction() From ed4407ecd193b0716977cc8f25437cd28174eafb Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Wed, 22 Jan 2025 10:15:47 +0100 Subject: [PATCH 6/6] [playlists] Set ID on temp playlist to avoid side effects --- src/components/mixins/previewRoom.js | 4 ++++ src/components/modals/ViewPlaylistModal.vue | 2 +- src/components/pages/Edit.vue | 2 +- src/components/pages/playlists/PlaylistPlayer.vue | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/mixins/previewRoom.js b/src/components/mixins/previewRoom.js index e4bce5658..33f89804d 100644 --- a/src/components/mixins/previewRoom.js +++ b/src/components/mixins/previewRoom.js @@ -8,6 +8,10 @@ export const previewRoomMixin = { }, methods: { + isValidRoomId(value) { + return value && value !== 'temp' + }, + openRoom() { this.$socket.emit('preview-room:open-playlist', { playlist_id: this.room.id diff --git a/src/components/modals/ViewPlaylistModal.vue b/src/components/modals/ViewPlaylistModal.vue index 8de5b541d..2e91d876b 100644 --- a/src/components/modals/ViewPlaylistModal.vue +++ b/src/components/modals/ViewPlaylistModal.vue @@ -82,7 +82,7 @@ export default { previewFileEntityMap: new Map(), currentEntities: {}, currentPlaylist: { - id: '', + id: 'temp', name: 'Temporary playlist', shots: [], for_entity: 'shot' diff --git a/src/components/pages/Edit.vue b/src/components/pages/Edit.vue index a30ae6599..ac014974a 100644 --- a/src/components/pages/Edit.vue +++ b/src/components/pages/Edit.vue @@ -43,7 +43,7 @@ @open-room="openRoom" @join-room="joinRoom" @leave-room="leaveRoom" - v-if="currentEdit?.id && currentPreview?.id" + v-if="isValidRoomId(currentEdit?.id) && currentPreview?.id" /> diff --git a/src/components/pages/playlists/PlaylistPlayer.vue b/src/components/pages/playlists/PlaylistPlayer.vue index 82d64babc..8ae7aeedf 100644 --- a/src/components/pages/playlists/PlaylistPlayer.vue +++ b/src/components/pages/playlists/PlaylistPlayer.vue @@ -60,7 +60,7 @@ @open-room="openRoom" @join-room="joinRoom" @leave-room="leaveRoom" - v-if="playlist.id && !isFullMode" + v-if="isValidRoomId(playlist.id) && !isFullMode" />