Skip to content

Commit

Permalink
Merge pull request #1255 from frankrousseau/master
Browse files Browse the repository at this point in the history
[todos] Display the episodes where assets are casted
  • Loading branch information
frankrousseau authored Dec 4, 2023
2 parents e866a13 + 3999682 commit bb77749
Show file tree
Hide file tree
Showing 24 changed files with 138 additions and 73 deletions.
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@ h2 {
border: 1px solid $blue;
border-radius: 5px;
color: $blue;
cursor: pointer;
font-size: 0.9em;
padding: 3px 4px;
Expand Down
Binary file removed src/assets/500.gif
Binary file not shown.
Binary file modified src/assets/illustrations/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/illustrations/500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/illustrations/empty_asset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/illustrations/empty_edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/illustrations/empty_production.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/illustrations/empty_shot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/illustrations/empty_todo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/components/lists/TaskList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,10 @@ td.retake-count {
}
}
.error {
color: $red;
}
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
-webkit-appearance: none;
Expand Down
47 changes: 47 additions & 0 deletions src/components/lists/TodosList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
>
{{ $t('tasks.fields.entity') }}
</th>
<th scope="col" class="episode" v-if="isEpisodeVisible">
{{ $t('assets.fields.episode') }}
</th>

<th class="assignees" ref="th-assignees" v-if="isToCheck">
{{ $t('tasks.fields.assignees') }}
</th>
Expand Down Expand Up @@ -114,6 +118,13 @@
</router-link>
</div>
</td>

<td class="episode" v-if="isEpisodeVisible">
<div class="flexrow" :title="assetEpisodes(entry, true)">
{{ assetEpisodes(entry, false) }}
</div>
</td>

<description-cell
class="description"
:entry="{ description: entry.entity_description }"
Expand Down Expand Up @@ -410,12 +421,42 @@ export default {
return (
Math.floor((this.timeEstimated ? this.timeEstimated : 0) / 60 / 8) <= 1
)
},
isEpisodeVisible() {
return this.displayedTasks.some(
task => task.source_id || task.episode_names?.length > 0
)
}
},
methods: {
...mapActions([]),
assetEpisodes(entry, full) {
if (
['Episode', 'Sequence', 'Shot', 'Edit'].includes(entry.entity_type_name)
)
return ''
const mainEpisodeName = entry.episode_name || 'MP'
const episodeNames = (entry.episode_names || []).filter(
name => name !== mainEpisodeName
)
let episodeNameString = ''
if (episodeNames.length > 2) {
if (full) {
episodeNameString = episodeNames.join(', ')
} else {
episodeNameString = episodeNames.slice(0, 2).join(', ') + ', ...'
}
} else if (episodeNames.length > 0) {
episodeNameString = episodeNames.join(', ')
}
return episodeNames.length > 0
? mainEpisodeName + ', ' + episodeNameString
: mainEpisodeName
},
setScrollPosition(scrollPosition) {
if (this.$refs.body) {
this.$refs.body.scrollTop = scrollPosition
Expand Down Expand Up @@ -760,10 +801,16 @@ td.end-date {
.empty-list img {
max-width: 80vh;
-webkit-filter: brightness(103%);
}
.entity-name {
color: var(--text);
font-weight: bold;
}
.episode {
min-width: 130px;
width: 130px;
}
</style>
17 changes: 3 additions & 14 deletions src/components/mixins/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1295,26 +1295,15 @@ export const playerMixin = {
return false
},

onTimeCodeClicked({
versionRevision,
minutes,
seconds,
milliseconds,
frame
}) {
onTimeCodeClicked({ versionRevision, frame }) {
const previews = this.currentEntity.preview_files[this.task.task_type_id]
const previewFile = previews.find(
p => p.revision === parseInt(versionRevision)
)
this.onPreviewChanged(this.currentEntity, previewFile)
const time =
parseInt(minutes) * 60 +
parseInt(seconds) +
parseInt(milliseconds) / 1000
setTimeout(() => {
const frameNumber = time / this.frameDuration
this.rawPlayer.setCurrentFrame(frameNumber)
this.onFrameUpdate(frameNumber)
this.rawPlayer.setCurrentFrame(frame)
this.onFrameUpdate(frame)
this.syncComparisonPlayer()
}, 20)
},
Expand Down
19 changes: 10 additions & 9 deletions src/components/modals/EditCommentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ export default {
type: Boolean,
default: false
},
frame: {
type: Number,
default: 0
},
commentToEdit: {
type: Object,
default: () => {}
},
isLoading: {
type: Boolean,
default: false
Expand All @@ -188,10 +196,6 @@ export default {
type: Boolean,
default: false
},
commentToEdit: {
type: Object,
default: () => {}
},
team: {
type: Array,
default: () => []
Expand All @@ -203,10 +207,6 @@ export default {
revision: {
type: Number,
default: 1
},
time: {
type: Number,
default: 0
}
},
Expand Down Expand Up @@ -302,10 +302,11 @@ export default {
onAtTextChanged(input) {
if (input.includes('@frame')) {
const time = this.frame / this.fps
this.form.text = replaceTimeWithTimecode(
input,
this.revision,
this.time,
time,
this.fps
)
}
Expand Down
8 changes: 8 additions & 0 deletions src/components/pages/Breakdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ export default {
if (!this.isLoading) {
this.reset()
}
this.resetSequenceOption()
this.setLastProductionScreen('breakdown')
this.isTextMode = localStorage.getItem('breakdown:text-mode') === 'true'
window.addEventListener('keydown', this.onKeyDown, false)
Expand Down Expand Up @@ -702,6 +703,7 @@ export default {
} else {
this.setCastingSequence(this.sequenceId || 'all')
}
this.resetSequenceOption()
this.resetSelection()
if (
(this.currentEpisode && this.currentEpisode.id === 'main') ||
Expand All @@ -713,6 +715,12 @@ export default {
})
},
resetSequenceOption() {
if (this.currentProduction.production_style === 'nft') {
this.sequenceId = this.castingSequencesOptions[1].value
}
},
resetSelection() {
const selection = {}
if (this.isEpisodeCasting) {
Expand Down
7 changes: 7 additions & 0 deletions src/components/pages/NotFound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,18 @@ export default {
}
p {
color: var(--text);
font-size: 1.3em;
padding-bottom: 1em;
a {
text-decoration: underline;
}
}
.title {
color: var(--text);
font-weight: bold;
font-size: 2.6em;
}
</style>
8 changes: 6 additions & 2 deletions src/components/pages/ServerDown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ export default {

<style lang="scss" scoped>
.page {
background-color: var(--background);
}
.illustration {
max-width: 1000px;
margin: auto;
img {
border-radius: 3rem;
box-shadow: 0 0 2rem rgba(0, 0, 0, 0.1);
margin-bottom: 2rem;
}
}
Expand All @@ -53,4 +51,10 @@ p {
text-decoration: underline;
}
}
.title {
color: var(--text);
font-weight: bold;
font-size: 2.4em;
}
</style>
22 changes: 11 additions & 11 deletions src/components/pages/Task.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
@change-current-preview="changeCurrentPreview"
@remove-extra-preview="onRemoveExtraPreviewClicked"
@previews-order-changed="onPreviewsOrderChanged"
@time-updated="onTimeUpdated"
@frame-updated="onFrameUpdated"
v-if="currentPreview"
/>
</div>
Expand Down Expand Up @@ -174,6 +174,7 @@
<div>
<add-comment
ref="add-comment"
:frame="currentFrame"
:is-error="errors.addComment"
:is-max-retakes-error="errors.addCommentMaxRetakes"
:is-loading="loading.addComment"
Expand All @@ -184,7 +185,6 @@
:task-status="taskStatusForCurrentUser"
:preview-forms="previewForms"
:fps="parseInt(currentFps)"
:time="currentTime"
:revision="currentRevision"
@add-comment="addComment"
@add-preview="onAddPreviewClicked"
Expand All @@ -205,20 +205,20 @@
<comment
:key="comment.id"
:comment="comment"
:team="currentTeam"
:task="task"
:highlighted="false"
:current-user="user"
:frame="currentFrame"
:editable="
(comment.person && user.id === comment.person.id) ||
isCurrentUserAdmin
"
:fps="parseInt(currentFps)"
:time="currentTime"
:revision="currentRevision"
:highlighted="false"
:is-first="index === 0"
:is-last="index === pinnedCount"
:is-change="isStatusChange(index)"
:revision="currentRevision"
:team="currentTeam"
:task="task"
@ack-comment="ackComment"
@duplicate-comment="onDuplicateComment"
@pin-comment="onPinComment"
Expand Down Expand Up @@ -276,12 +276,12 @@

<edit-comment-modal
:active="modals.editComment"
:frame="currentFrame"
:is-loading="loading.editComment"
:is-error="errors.editComment"
:comment-to-edit="commentToEdit"
:team="currentTeam"
:fps="parseInt(currentFps)"
:time="currentTime"
:revision="currentRevision"
@confirm="confirmEditTaskComment"
@cancel="onCancelEditComment"
Expand Down Expand Up @@ -359,7 +359,7 @@ export default {
data() {
return {
previewForms: [],
currentTime: 0,
currentFrame: 0,
selectedTab: 'validation',
taskLoading: {
isLoading: true,
Expand Down Expand Up @@ -1191,8 +1191,8 @@ export default {
this.modals.deleteComment = false
},
onTimeUpdated(time) {
this.currentTime = time
onFrameUpdated(frame) {
this.currentFrame = frame
},
onPreviewFormRemoved(previewForm) {
Expand Down
7 changes: 4 additions & 3 deletions src/components/pages/playlists/PlaylistPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,12 @@
<task-info
ref="task-info"
class="flexrow-item task-info-column"
:task="task"
:current-frame="parseInt(currentFrame)"
:current-parent-preview="currentPreview"
:fps="fps"
:is-preview="false"
:silent="isCommentsHidden"
:current-time-raw="currentTimeRaw"
:current-parent-preview="currentPreview"
:task="task"
@time-code-clicked="onTimeCodeClicked"
v-show="!isCommentsHidden"
/>
Expand Down
3 changes: 2 additions & 1 deletion src/components/previews/PreviewPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
:task="task"
:is-preview="false"
:silent="isCommentsHidden"
:current-time-raw="currentTimeRaw"
:current-frame="currentFrame"
:current-parent-preview="currentPreview"
@comment-added="$emit('comment-added')"
@time-code-clicked="timeCodeClicked"
Expand Down Expand Up @@ -992,6 +992,7 @@ export default {
this.currentTimeRaw = time
this.currentTime = this.formatTime(time)
this.progress.updateProgressBar(frame)
this.$emit('frame-updated', frame)
if (!this.isPlaying) {
this.syncComparisonViewer()
Expand Down
Loading

0 comments on commit bb77749

Please sign in to comment.