From 325acd6ca8154a39e1c61a49ac635b03e6cb7767 Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Thu, 21 Sep 2023 15:16:22 +0200 Subject: [PATCH 1/4] [ux] Fix word wrap in breakdown listing --- src/components/pages/Asset.vue | 4 ++-- src/components/pages/Episode.vue | 2 +- src/components/pages/Sequence.vue | 2 +- src/components/pages/Shot.vue | 2 +- src/components/pages/breakdown/AssetBlock.vue | 4 ++++ 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/pages/Asset.vue b/src/components/pages/Asset.vue index 8dc74f4925..b3405bdacc 100644 --- a/src/components/pages/Asset.vue +++ b/src/components/pages/Asset.vue @@ -176,7 +176,7 @@ :with-link="false" />
- {{ shot.shot_name }} + {{ shot.shot_name }} ({{ shot.nb_occurences }}) @@ -244,7 +244,7 @@ :with-link="false" />
- {{ asset.asset_name }} + {{ asset.asset_name }} ({{ asset.nb_occurences }}) diff --git a/src/components/pages/Episode.vue b/src/components/pages/Episode.vue index 37dba787ea..864e35f04b 100644 --- a/src/components/pages/Episode.vue +++ b/src/components/pages/Episode.vue @@ -148,7 +148,7 @@ :with-link="false" :no-cache="true" /> -
+
{{ asset.asset_name }} ({{ asset.nb_occurences }}) diff --git a/src/components/pages/Sequence.vue b/src/components/pages/Sequence.vue index d3dc281a9f..131716d843 100644 --- a/src/components/pages/Sequence.vue +++ b/src/components/pages/Sequence.vue @@ -150,7 +150,7 @@ :with-link="false" :no-cache="true" /> -
+
{{ asset.asset_name }} ({{ asset.nb_occurences }}) diff --git a/src/components/pages/Shot.vue b/src/components/pages/Shot.vue index 807179bb78..685fc88bb1 100644 --- a/src/components/pages/Shot.vue +++ b/src/components/pages/Shot.vue @@ -231,7 +231,7 @@ :with-link="false" :no-cache="true" /> -
+
{{ asset.asset_name }} ({{ asset.nb_occurences }}) diff --git a/src/components/pages/breakdown/AssetBlock.vue b/src/components/pages/breakdown/AssetBlock.vue index 09731e4305..3e8156c4c7 100644 --- a/src/components/pages/breakdown/AssetBlock.vue +++ b/src/components/pages/breakdown/AssetBlock.vue @@ -279,4 +279,8 @@ export default { .modify-asset { min-width: 20px; } + +.asset-text-name { + word-wrap: anywhere; +} From a931b798cc0035d70bc5879e847005017648854e Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Thu, 21 Sep 2023 15:19:53 +0200 Subject: [PATCH 2/4] [playlists] Allow to insert an element in the middle of a playlist. --- src/components/pages/Playlist.vue | 88 +++++++++++++------ .../pages/playlists/PlaylistPlayer.vue | 30 +++++-- 2 files changed, 80 insertions(+), 38 deletions(-) diff --git a/src/components/pages/Playlist.vue b/src/components/pages/Playlist.vue index 1475e353dc..37466dcd46 100644 --- a/src/components/pages/Playlist.vue +++ b/src/components/pages/Playlist.vue @@ -191,6 +191,7 @@ @annotation-changed="onAnnotationChanged" @for-client-changed="onForClientChanged" @annotations-refreshed="onAnnotationsRefreshed" + @new-entity-dropped="onNewEntityDropped" />
-
- -
- - • - - {{ shot.name }} +
+ +
+ + • + + {{ + shot.name + }} +
-
+
@@ -906,12 +914,14 @@ export default { } }, - addEntity(entity) { + addEntity(entity, scrollRight = true) { return this.loadEntityPreviewFiles(entity) .then(previewFiles => { return this.addToStorePlaylistAndSave(previewFiles, entity) }) - .then(this.addToPlayerPlaylist) + .then(entity => { + this.addToPlayerPlaylist(entity, scrollRight) + }) .catch(err => console.error(err)) }, @@ -923,13 +933,15 @@ export default { }) }, - addToPlayerPlaylist(entity) { + addToPlayerPlaylist(entity, scrollRight = true) { const playlistEntity = this.convertEntityToPlaylistFormat(entity) Vue.set(this.currentEntities, playlistEntity.id, playlistEntity) this.playlistPlayer.entityList.push(playlistEntity) - this.$nextTick(() => { - this.playlistPlayer.scrollToRight() - }) + if (scrollRight) { + this.$nextTick(() => { + this.playlistPlayer.scrollToRight() + }) + } }, addEntityToPlaylist(entity) { @@ -938,6 +950,24 @@ export default { } }, + onNewEntityDropped(info) { + let entity = null + if (this.isAssetPlaylist) { + entity = this.assetMap.get(info.after) + } else if (this.isSequencePlaylist) { + entity = this.sequenceMap.get(info.after) + } else { + entity = this.shotMap.get(info.after) + } + + if (entity && !this.currentEntities[entity.id]) { + const notScrollRight = false + this.addEntity(entity, notScrollRight).then(() => { + this.playlistPlayer.onEntityDropped(info) + }) + } + }, + removeEntity(entity) { this.removeEntityPreviewFromPlaylist({ playlist: this.currentPlaylist, diff --git a/src/components/pages/playlists/PlaylistPlayer.vue b/src/components/pages/playlists/PlaylistPlayer.vue index bc3c5e0a7f..79c945b663 100644 --- a/src/components/pages/playlists/PlaylistPlayer.vue +++ b/src/components/pages/playlists/PlaylistPlayer.vue @@ -798,6 +798,7 @@ @play-click="entityListClicked" @remove-entity="removeEntity" @preview-changed="onPreviewChanged" + @entity-to-add="$emit('entity-to-add', $event)" @entity-dropped="onEntityDropped" />
@@ -1350,19 +1351,30 @@ export default { this.updateTaskPanel() }, + /* + * Called when an entity is dropped in the playlist. The entity is moved + * to the new position and the order of the entities is updated. + * @param {Object} info - { + * before: where entity is dropped (id of the entity before), + * after: the id of the entity dropped. + * } + */ onEntityDropped(info) { const playlistEl = this.$refs['playlisted-entities'] const scrollLeft = playlistEl.scrollLeft - const entityToMove = this.entityList.find(s => s.id === info.after) - const toMoveIndex = this.entityList.findIndex(s => s.id === info.after) - let targetIndex = this.entityList.findIndex(s => s.id === info.before) - if (toMoveIndex > targetIndex) targetIndex += 1 - this.moveSelectedEntity(entityToMove, toMoveIndex, targetIndex) - this.$nextTick(() => { - playlistEl.scrollLeft = scrollLeft - }) - this.$emit('order-change', info) + if (!entityToMove) { + this.$emit('new-entity-dropped', info) + } else { + const toMoveIndex = this.entityList.findIndex(s => s.id === info.after) + let targetIndex = this.entityList.findIndex(s => s.id === info.before) + if (toMoveIndex > targetIndex) targetIndex += 1 + this.moveSelectedEntity(entityToMove, toMoveIndex, targetIndex) + this.$nextTick(() => { + playlistEl.scrollLeft = scrollLeft + }) + this.$emit('order-change', info) + } }, moveSelectedEntityToLeft() { From 98f8697b8a722b80c1ddc865177be14b567adc3b Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Thu, 21 Sep 2023 15:51:44 +0200 Subject: [PATCH 3/4] [automations] Fix ready for status edition --- .../modals/EditStatusAutomationModal.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/components/modals/EditStatusAutomationModal.vue b/src/components/modals/EditStatusAutomationModal.vue index 299d89b365..f55ef49572 100644 --- a/src/components/modals/EditStatusAutomationModal.vue +++ b/src/components/modals/EditStatusAutomationModal.vue @@ -17,7 +17,7 @@
-

{{ $t('status_automations.entity_title') }}

+

{{ $t('status_automations.entity_title') }}

- {{ form.entityType }} + {{ form.entityType }}

{{ $t('status_automations.in_title') }}

@@ -197,7 +197,11 @@ export default { setTaskTypes(fieldType) { if (fieldType === 'asset') { this.form.inEntityTaskTypes = this.assetTaskTypes - this.form.outEntityTaskTypes = this.assetTaskTypes + if (this.mode === 'status') { + this.form.outEntityTaskTypes = this.assetTaskTypes + } else { + this.form.outEntityTaskTypes = this.shotTaskTypes + } } else if (fieldType === 'shot') { this.form.inEntityTaskTypes = this.shotTaskTypes this.form.outEntityTaskTypes = this.shotTaskTypes @@ -272,7 +276,12 @@ export default { } .subtitle { font-size: 1.4em; - margin-top: 1.5em; + margin-top: 2em; margin-bottom: 0.5em; + text-transform: none; +} +.entity-type-name { + font-size: 1.2em; + text-transform: capitalize; } From d96828b953e614f127f95888d69b32b2b58a632f Mon Sep 17 00:00:00 2001 From: Frank Rousseau Date: Fri, 22 Sep 2023 17:43:41 +0200 Subject: [PATCH 4/4] [comments] Fix frame seeking with checklist frame tags --- src/components/widgets/AddComment.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/widgets/AddComment.vue b/src/components/widgets/AddComment.vue index d29f8fee0f..33dfb37ecb 100644 --- a/src/components/widgets/AddComment.vue +++ b/src/components/widgets/AddComment.vue @@ -108,7 +108,7 @@