Skip to content

Commit

Permalink
Merge pull request #1212 from NicoPennec/fix/various
Browse files Browse the repository at this point in the history
Fix/various
  • Loading branch information
NicoPennec authored Oct 6, 2023
2 parents 70c007a + 5e81414 commit 2e94b44
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 127 deletions.
61 changes: 29 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
"localStorage": "1.0.4",
"postcss": "8.4.31",
"prettier": "3.0.3",
"sass": "1.68.0",
"vite": "4.4.9",
"sass": "1.69.0",
"vite": "4.4.11",
"vite-plugin-eslint": "1.8.1",
"vitest": "0.34.6",
"vitest-localstorage-mock": "0.0.1",
Expand Down
24 changes: 11 additions & 13 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ export default {
'sequence:new'(eventData) {
if (
!this.sequenceMap.get(eventData.sequence_id) &&
this.currentProduction &&
this.currentProduction.id === eventData.project_id
this.currentProduction?.id === eventData.project_id
) {
this.loadSequence(eventData.sequence_id)
}
Expand All @@ -188,8 +187,7 @@ export default {
'edit:new'(eventData) {
if (
!this.editMap.get(eventData.edit_id) &&
this.currentProduction &&
this.currentProduction.id === eventData.project_id
this.currentProduction?.id === eventData.project_id
) {
this.loadEdit(eventData.edit_id)
}
Expand All @@ -210,8 +208,7 @@ export default {
'episode:new'(eventData) {
if (
!this.episodeMap.get(eventData.episode_id) &&
this.currentProduction &&
this.currentProduction.id === eventData.project_id
this.currentProduction?.id === eventData.project_id
) {
this.loadEpisode(eventData.episode_id)
}
Expand All @@ -232,8 +229,7 @@ export default {
'shot:new'(eventData) {
if (
!this.shotMap.get(eventData.shot_id) &&
this.currentProduction &&
this.currentProduction.id === eventData.project_id &&
this.currentProduction?.id === eventData.project_id &&
(!this.isTVShow || this.currentEpisode.id === eventData.episode_id)
) {
setTimeout(() => {
Expand All @@ -257,8 +253,7 @@ export default {
'asset:new'(eventData) {
if (
!this.assetMap.get(eventData.asset_id) &&
this.currentProduction &&
this.currentProduction.id === eventData.project_id
this.currentProduction?.id === eventData.project_id
) {
setTimeout(() => {
this.loadAsset(eventData.asset_id)
Expand Down Expand Up @@ -358,7 +353,6 @@ export default {
'person:delete'(eventData) {
const person = this.personMap.get(eventData.person_id)
if (person) {
this.$store.commit('DELETE_PEOPLE_START', person)
this.$store.commit('DELETE_PEOPLE_END', person)
}
},
Expand Down Expand Up @@ -420,11 +414,15 @@ export default {
},
'metadata-descriptor:new'(eventData) {
this.refreshMetadataDescriptor(eventData.metadata_descriptor_id)
if (this.currentProduction?.id === eventData.project_id) {
this.refreshMetadataDescriptor(eventData.metadata_descriptor_id)
}
},
'metadata-descriptor:update'(eventData) {
this.refreshMetadataDescriptor(eventData.metadata_descriptor_id)
if (this.currentProduction?.id === eventData.project_id) {
this.refreshMetadataDescriptor(eventData.metadata_descriptor_id)
}
},
'metadata-descriptor:delete'(eventData) {
Expand Down
8 changes: 0 additions & 8 deletions src/components/mixins/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
* list.
*/
export const searchMixin = {
created() {},

mounted() {},

beforeDestroy() {},

computed: {},

methods: {
changeSearch(searchQuery) {
this.searchField.setValue(searchQuery.search_query)
Expand Down
8 changes: 5 additions & 3 deletions src/components/pages/Assets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -680,15 +680,16 @@ export default {
this.loading.deleteAllTasks = true
this.deleteAllAssetTasks({ projectId, taskTypeId, selectionOnly })
.then(() => {
this.loading.deleteAllTasks = false
if (!selectionOnly) this.loadAssets()
this.modals.isDeleteAllTasksDisplayed = false
})
.catch(err => {
console.error(err)
this.loading.deleteAllTasks = false
this.errors.deleteAllTasks = true
})
.finally(() => {
this.loading.deleteAllTasks = false
})
},
confirmDeleteMetadata() {
Expand All @@ -697,12 +698,13 @@ export default {
this.deleteMetadataDescriptor(this.descriptorIdToDelete)
.then(() => {
this.errors.deleteMetadata = false
this.loading.deleteMetadata = false
this.modals.isDeleteMetadataDisplayed = false
})
.catch(err => {
console.error(err)
this.errors.deleteMetadata = true
})
.finally(() => {
this.loading.deleteMetadata = false
})
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/Playlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ export default {
},
isListToggled() {
this.playlistPlayer.onWindowResize()
this.playlistPlayer?.onWindowResize()
},
taskTypeId() {
Expand Down
1 change: 0 additions & 1 deletion src/components/pages/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@
/>
<textarea
class="input recovery-codes"
ref="textField"
v-text="twoFA.OTPRecoveryCodes.join('\t')"
readonly
></textarea>
Expand Down
2 changes: 1 addition & 1 deletion src/components/previews/PreviewPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
:width="width"
:handle-in="-1"
:handle-out="-1"
:preview-id="currentPreview ? currentPreview.id : ''"
:preview-id="isMovie && currentPreview ? currentPreview.id : ''"
@start-scrub="$refs['button-bar'].classList.add('unselectable')"
@end-scrub="$refs['button-bar'].classList.remove('unselectable')"
@progress-changed="onProgressChanged"
Expand Down
2 changes: 1 addition & 1 deletion src/components/previews/VideoProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ export default {
},
previewId() {
if (this.movieDimensions.width) {
if (this.movieDimensions.width && this.previewId) {
const path = `/api/movies/tiles/preview-files/${this.previewId}.png`
const img = new Image()
this.isTileLoading = true
Expand Down
9 changes: 2 additions & 7 deletions src/components/tops/Topbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,8 @@
</a>
</div>
<div
:class="{
'nav-item': true,
'user-nav': true,
active: !isUserMenuHidden
}"
ref="user-name"
class="nav-item user-nav"
:class="{ active: !isUserMenuHidden }"
@click="toggleUserMenu"
>
<people-avatar
Expand All @@ -132,7 +128,6 @@

<nav
class="user-menu"
ref="user-menu"
:style="{
top: isUserMenuHidden ? '-480px' : '60px'
}"
Expand Down
5 changes: 1 addition & 4 deletions src/components/widgets/LightEntityThumbnail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
v-if="props.previewFileId"
/>
<span
:class="{
'thumbnail-picture': true,
'thumbnail-empty': true
}"
class="thumbnail-picture thumbnail-empty"
:style="{
width: props.width,
height: props.emptyHeight ? props.emptyHeight : props.height
Expand Down
Loading

0 comments on commit 2e94b44

Please sign in to comment.