From 5656c2a99caea569ec805cae5773af22b7e35764 Mon Sep 17 00:00:00 2001 From: NicolasRichel Date: Thu, 5 Dec 2024 14:29:56 +0100 Subject: [PATCH] fix(photosphere): restore 'Images' tab in models manager --- package-lock.json | 24 +++++++++---------- package.json | 6 ++--- .../file-actions-cell/FileActionsCell.vue | 18 +++++++------- .../models/models-manager/ModelsManager.vue | 13 +++++++--- .../model-name-cell/ModelNameCell.vue | 2 +- src/config/models.js | 2 +- 6 files changed, 35 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9f08900c..a35bcd30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,10 @@ "version": "1.0.0", "dependencies": { "@bimdata/bcf-components": "6.4.4", - "@bimdata/components": "1.7.1", - "@bimdata/design-system": "2.2.1-beta.7", + "@bimdata/components": "1.7.2", + "@bimdata/design-system": "2.2.1-beta.8", "@bimdata/typescript-fetch-api-client": "10.17.2", - "@bimdata/viewer": "2.7.0-alpha-photosphere.1", + "@bimdata/viewer": "2.7.0-alpha.photosphere.2", "@paddle/paddle-js": "^1.3.2", "async": "^3.2.6", "dms-conversion": "^3.1.3", @@ -1825,9 +1825,9 @@ } }, "node_modules/@bimdata/components": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@bimdata/components/-/components-1.7.1.tgz", - "integrity": "sha512-NZxivpbHw3jkj4PUwtJPRr52clLK8C2OyjjQUiAaTv3PiXZleN0ycz04elSUFyH9zeNwe9bAySV5/4uy+153bQ==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@bimdata/components/-/components-1.7.2.tgz", + "integrity": "sha512-TnZavQvt7I5lMCIGmvuDUay0UBo9e0kBE5PrV+zhnsphsMMN3kmttrPS+IIUTl+wXqUWCjS/AUagktX0GiaxDA==", "peerDependencies": { "@bimdata/design-system": "*", "@bimdata/typescript-fetch-api-client": "*", @@ -1836,9 +1836,9 @@ } }, "node_modules/@bimdata/design-system": { - "version": "2.2.1-beta.7", - "resolved": "https://registry.npmjs.org/@bimdata/design-system/-/design-system-2.2.1-beta.7.tgz", - "integrity": "sha512-m+UdLu9JjyIMYhcyU5ZKPFz0oK0C0o7VDDsIBESR5/+hPY9yWsttf5mRtc37LZF1InmWGwM+6RsKovcrdYYsQQ==" + "version": "2.2.1-beta.8", + "resolved": "https://registry.npmjs.org/@bimdata/design-system/-/design-system-2.2.1-beta.8.tgz", + "integrity": "sha512-xnJ+SiQHbzeu4FGb/2yzFcFQzXqn32tQurk7zyWP+O21a+h7MIBsX3f2fMhmFI/VtKgEPP9v/G/jJZi76+KD5w==" }, "node_modules/@bimdata/typescript-fetch-api-client": { "version": "10.17.2", @@ -1846,9 +1846,9 @@ "integrity": "sha512-S21wylV4ZKbgmkPwus8zZOWn5F2cSE395urrdMd/KWUXZC9S9JRJ0fbaufhgizsWfI//tkudbLrbdfXhwb4ZMA==" }, "node_modules/@bimdata/viewer": { - "version": "2.7.0-alpha-photosphere.1", - "resolved": "https://registry.npmjs.org/@bimdata/viewer/-/viewer-2.7.0-alpha-photosphere.1.tgz", - "integrity": "sha512-9nz0n0Blte7gO8cu70vraDeuqFWnDAn1xb03cZGPe0R3lZAbqWQigiKeUg2aRmVfSOOQWDzlEbx7ErMqUOxHAw==" + "version": "2.7.0-alpha.photosphere.2", + "resolved": "https://registry.npmjs.org/@bimdata/viewer/-/viewer-2.7.0-alpha.photosphere.2.tgz", + "integrity": "sha512-i9ypD6GYRW9rNVIHkkqV2Ia2mbBkfAAU4128TiXad2gryYL6cs5HP8zdFRWn8loBtEQI4m46cUmdGwoZi0gFKg==" }, "node_modules/@bufbuild/protobuf": { "version": "2.2.2", diff --git a/package.json b/package.json index 98f7c5ff..406bcbc5 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,10 @@ }, "dependencies": { "@bimdata/bcf-components": "6.4.4", - "@bimdata/components": "1.7.1", - "@bimdata/design-system": "2.2.1-beta.7", + "@bimdata/components": "1.7.2", + "@bimdata/design-system": "2.2.1-beta.8", "@bimdata/typescript-fetch-api-client": "10.17.2", - "@bimdata/viewer": "2.7.0-alpha-photosphere.1", + "@bimdata/viewer": "2.7.0-alpha.photosphere.2", "@paddle/paddle-js": "^1.3.2", "async": "^3.2.6", "dms-conversion": "^3.1.3", diff --git a/src/components/specific/files/files-table/file-actions-cell/FileActionsCell.vue b/src/components/specific/files/files-table/file-actions-cell/FileActionsCell.vue index bda1d33f..05473554 100644 --- a/src/components/specific/files/files-table/file-actions-cell/FileActionsCell.vue +++ b/src/components/specific/files/files-table/file-actions-cell/FileActionsCell.vue @@ -141,16 +141,14 @@ export default { } } - if (!isFolder(props.file) && isConvertibleToPhotosphere(props.file)) { - if (!isModel(props.file)) { - menuItems.value.push({ - key: 3, - iconComponent: SetAsModelIcon, - text: "FileActionsCell.createPhotosphereButtonText", - disabled: !hasAdminPerm(props.project, props.file), - action: () => onClick("create-photosphere") - }); - } + if (!isFolder(props.file) && isConvertibleToPhotosphere(props.file) && !isModel(props.file)) { + menuItems.value.push({ + key: 3, + iconComponent: SetAsModelIcon, + text: "FileActionsCell.createPhotosphereButtonText", + disabled: !hasAdminPerm(props.project, props.file), + action: () => onClick("create-photosphere") + }); } menuItems.value.push({ diff --git a/src/components/specific/models/models-manager/ModelsManager.vue b/src/components/specific/models/models-manager/ModelsManager.vue index 4c8650c3..80f6b5da 100644 --- a/src/components/specific/models/models-manager/ModelsManager.vue +++ b/src/components/specific/models/models-manager/ModelsManager.vue @@ -87,7 +87,7 @@ import PDFManager from "./pdf-manager/PDFManager.vue"; import PhotosphereManager from "./photosphere-manager/PhotosphereManager.vue"; import PointCloudManager from "./point-cloud-manager/PointCloudManager.vue"; -const { DWG, DXF, IFC, META_BUILDING, PDF, PHOTOSPHERE, PHOTOSPHERE_BUILDING, POINT_CLOUD } = +const { DWG, DXF, IFC, JPEG, META_BUILDING, PDF, PHOTOSPHERE, PHOTOSPHERE_BUILDING, PNG, POINT_CLOUD } = MODEL_TYPE; const tabsDef = [ @@ -130,9 +130,16 @@ const tabsDef = [ beta: true }, { - id: "photos", - text: "Photos", + id: "images", + text: "Images", icon: "fileImagePolychrome", + modelTypes: [JPEG, PNG], + component: "DWGManager" + }, + { + id: "photosphere", + text: "Photosphere", + icon: "filePhotospherePolychrome", modelTypes: [PHOTOSPHERE, PHOTOSPHERE_BUILDING], component: "PhotosphereManager" } diff --git a/src/components/specific/models/models-table/model-name-cell/ModelNameCell.vue b/src/components/specific/models/models-table/model-name-cell/ModelNameCell.vue index b0a09828..fc57a4e4 100644 --- a/src/components/specific/models/models-table/model-name-cell/ModelNameCell.vue +++ b/src/components/specific/models/models-table/model-name-cell/ModelNameCell.vue @@ -40,7 +40,7 @@
diff --git a/src/config/models.js b/src/config/models.js index 1171291e..a91a6149 100644 --- a/src/config/models.js +++ b/src/config/models.js @@ -121,7 +121,7 @@ const MODEL_CONFIG = Object.freeze({ [MODEL_TYPE.PHOTOSPHERE]: { ext: [MODEL_EXTENSIONS.JPEG, MODEL_EXTENSIONS.JPG], window: WINDOWS.PHOTOSPHERE, - icon: "fileImagePolychrome", + icon: "filePhotospherePolychrome", }, [MODEL_TYPE.PHOTOSPHERE_BUILDING]: { ext: [],