Skip to content

Commit

Permalink
Merge pull request #1544 from frankrousseau/master
Browse files Browse the repository at this point in the history
Various fixes
  • Loading branch information
frankrousseau authored Sep 24, 2024
2 parents c18c573 + 6abf126 commit ee29a8c
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 22 deletions.
1 change: 1 addition & 0 deletions src/components/mixins/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ export const playerMixin = {
nextFrameTime = nextFrame / this.fps
this.setFullPlayerTime(nextFrameTime)
} else {
if (!this.rawPlayer) return
const nextFrameTime =
this.rawPlayer.getCurrentTimeRaw() + this.frameDuration + 0.0001
const nextFrame = Math.round(nextFrameTime * this.fps)
Expand Down
28 changes: 17 additions & 11 deletions src/components/modals/AddAttachmentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,27 @@
>
<div class="modal-background" @click="$emit('cancel')"></div>

<div class="modal-content">
<div class="box content">
<!--div
<div
class="modal-content"
@dragover="onFileDragover"
@dragleave="onFileDragLeave"
>
<div class="box content attachment-modal-box">
<div
ref="dropMask"
id="drop-mask"
class="drop-mask"
@drop="onDrop"
v-if="isDraggingFile"
>
{{ $t('main.drop_files_here') }}
</div-->
</div>
<h2 class="subtitle">{{ title }}</h2>
<h1 class="title">
{{ $t('tasks.comment_image') }}
</h1>

<div class="flexrow buttons">
<div class="flexrow buttons attachment-modal-buttons">
<file-upload
ref="file-field"
class="flexrow-item"
Expand Down Expand Up @@ -219,12 +223,6 @@ export default {
this.forms = this.forms.filter(f => f !== form)
},
onDrop(event) {
this.isDraggingFile = false
this.fileField.onDrop(event)
event.preventDefault()
},
onFileDragover(event) {
event.preventDefault()
event.stopPropagation()
Expand All @@ -237,6 +235,14 @@ export default {
if (event.target.id === 'drop-mask') {
this.isDraggingFile = false
}
},
onDrag(event) {},
onDrop(event) {
this.fileField.onDrop(event)
this.isDraggingFile = false
event.preventDefault()
}
},
Expand Down
6 changes: 1 addition & 5 deletions src/components/pages/Assets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@
class="flexrow-item"
icon="assets"
:is-on="showSharedAssets"
:title="
showSharedAssets
? $t('breakdown.hide_library')
: $t('breakdown.show_library')
"
:title="$t('breakdown.show_library')"
@click="showSharedAssets = !showSharedAssets"
/>
<div class="flexrow-item filler"></div>
Expand Down
22 changes: 18 additions & 4 deletions src/components/widgets/AddComment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -618,10 +618,24 @@ export default {
onDrop(event) {
if (event.target.id === 'drop-mask') return
/*
if (event.target.parentElement?.className?.indexOf('box')) return
if (event.target.parentElement?.className?.indexOf('buttons')) return
*/
if (
event.target.parentElement?.className?.indexOf('add-attachment-box') >=
0
)
return
if (
event.target.parentElement?.className?.indexOf(
'add-attachment-buttons'
) >= 0
)
return
if (
event.target.parentElement?.className?.indexOf(
'attachment-modal-box'
) >= 0
)
return
const forms = []
for (let i = 0; i < event.dataTransfer.files.length; i++) {
const form = new FormData()
Expand Down
4 changes: 3 additions & 1 deletion src/components/widgets/FileUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ export default {
this.isSaving = false
this.isInitial = true
this.uploadedFiles = []
this.$refs.uploadInput.value = ''
if (this.$refs.uploadInput) {
this.$refs.uploadInput.value = ''
}
},
onDragover() {
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/shots.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ const actions = {
const userFilters = rootGetters.userFilters
const userFilterGroups = rootGetters.userFilterGroups
const taskTypeMap = rootGetters.taskTypeMap
const taskMap = rootGetters.taskMap
const episodeMap = rootGetters.episodeMap
const personMap = rootGetters.personMap
const isTVShow = rootGetters.isTVShow
Expand Down Expand Up @@ -425,6 +424,7 @@ const actions = {
})
.then(shots => {
const sequenceMap = rootGetters.sequenceMap
const taskMap = rootGetters.taskMap
commit(LOAD_SHOTS_END, {
production,
shots,
Expand Down

0 comments on commit ee29a8c

Please sign in to comment.