diff --git a/package-lock.json b/package-lock.json index 3ab2ad6b2c..e2dd0957f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,8 +66,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", @@ -562,9 +562,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.0.tgz", - "integrity": "sha512-zJmuCWj2VLBt4c25CfBIbMZLGLyhkvs7LznyVX5HfpzeocThgIj5XQK4L+g3U36mMcx8bPMhGyPpwCATamC4jQ==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz", + "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -831,9 +831,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.8.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.0.tgz", - "integrity": "sha512-LzcWltT83s1bthcvjBmiBvGJiiUe84NWRHkw+ZV6Fr41z2FbIzvc815dk2nQ3RAKMuN2fkenM/z3Xv2QzEpYxQ==", + "version": "20.8.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", + "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==", "dev": true }, "node_modules/@types/trusted-types": { @@ -1416,9 +1416,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001542", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001542.tgz", - "integrity": "sha512-UrtAXVcj1mvPBFQ4sKd38daP8dEcXXr5sQe6QNNinaPd0iA/cxg9/l3VrSdL73jgw5sKyuQ6jNgiKO12W3SsVA==", + "version": "1.0.30001546", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001546.tgz", + "integrity": "sha512-zvtSJwuQFpewSyRrI3AsftF6rM0X80mZkChIt1spBGEvRglCrjTniXvinc8JKRoqTwXAgvqTImaN9igfSMtUBw==", "dev": true, "funding": [ { @@ -2129,9 +2129,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.537", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.537.tgz", - "integrity": "sha512-W1+g9qs9hviII0HAwOdehGYkr+zt7KKdmCcJcjH0mYg6oL8+ioT3Skjmt7BLoAQqXhjf40AXd+HlR4oAWMlXjA==", + "version": "1.4.543", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.543.tgz", + "integrity": "sha512-t2ZP4AcGE0iKCCQCBx/K2426crYdxD3YU6l0uK2EO3FZH0pbC4pFz/sZm2ruZsND6hQBTcDWWlo/MLpiOdif5g==", "dev": true }, "node_modules/emoji-regex": { @@ -3086,9 +3086,9 @@ } }, "node_modules/globals": { - "version": "13.22.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", - "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dependencies": { "type-fest": "^0.20.2" }, @@ -3117,12 +3117,9 @@ "dev": true }, "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", "engines": { "node": ">= 0.4.0" } @@ -5162,9 +5159,9 @@ } }, "node_modules/sass": { - "version": "1.68.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.68.0.tgz", - "integrity": "sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==", + "version": "1.69.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.0.tgz", + "integrity": "sha512-l3bbFpfTOGgQZCLU/gvm1lbsQ5mC/WnLz3djL2v4WCJBDrWm58PO+jgngcGRNnKUh6wSsdm50YaovTqskZ0xDQ==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -5689,9 +5686,9 @@ } }, "node_modules/tinyspy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.1.1.tgz", - "integrity": "sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.0.tgz", + "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==", "dev": true, "engines": { "node": ">=14.0.0" @@ -5886,9 +5883,9 @@ "integrity": "sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==" }, "node_modules/vite": { - "version": "4.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", - "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "version": "4.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz", + "integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==", "dev": true, "dependencies": { "esbuild": "^0.18.10", diff --git a/package.json b/package.json index 5f14e44baf..de50e8c135 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/App.vue b/src/App.vue index 51f57448f7..71cce46825 100644 --- a/src/App.vue +++ b/src/App.vue @@ -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) } @@ -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) } @@ -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) } @@ -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(() => { @@ -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) @@ -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) } }, @@ -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) { diff --git a/src/components/mixins/search.js b/src/components/mixins/search.js index f74469735f..a2d720387c 100644 --- a/src/components/mixins/search.js +++ b/src/components/mixins/search.js @@ -3,14 +3,6 @@ * list. */ export const searchMixin = { - created() {}, - - mounted() {}, - - beforeDestroy() {}, - - computed: {}, - methods: { changeSearch(searchQuery) { this.searchField.setValue(searchQuery.search_query) diff --git a/src/components/pages/Assets.vue b/src/components/pages/Assets.vue index e40affa0bc..4f361df143 100644 --- a/src/components/pages/Assets.vue +++ b/src/components/pages/Assets.vue @@ -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() { @@ -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 }) }, diff --git a/src/components/pages/Playlist.vue b/src/components/pages/Playlist.vue index 37466dcd46..47fb6fccb2 100644 --- a/src/components/pages/Playlist.vue +++ b/src/components/pages/Playlist.vue @@ -1348,7 +1348,7 @@ export default { }, isListToggled() { - this.playlistPlayer.onWindowResize() + this.playlistPlayer?.onWindowResize() }, taskTypeId() { diff --git a/src/components/pages/Profile.vue b/src/components/pages/Profile.vue index d3402c3ec6..5bbc1a60b5 100644 --- a/src/components/pages/Profile.vue +++ b/src/components/pages/Profile.vue @@ -288,7 +288,6 @@ /> diff --git a/src/components/previews/PreviewPlayer.vue b/src/components/previews/PreviewPlayer.vue index 90be7abade..fcb1b80275 100644 --- a/src/components/previews/PreviewPlayer.vue +++ b/src/components/previews/PreviewPlayer.vue @@ -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" diff --git a/src/components/previews/VideoProgress.vue b/src/components/previews/VideoProgress.vue index b9b1d1f233..a39743cda1 100644 --- a/src/components/previews/VideoProgress.vue +++ b/src/components/previews/VideoProgress.vue @@ -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 diff --git a/src/components/tops/Topbar.vue b/src/components/tops/Topbar.vue index 6d979d4385..aee8030ed7 100644 --- a/src/components/tops/Topbar.vue +++ b/src/components/tops/Topbar.vue @@ -112,12 +112,8 @@