diff --git a/app/components/DragAndDrop.vue b/app/components/DragAndDrop.vue new file mode 100644 index 00000000..0149445b --- /dev/null +++ b/app/components/DragAndDrop.vue @@ -0,0 +1,120 @@ + + + + + + + + + + {{ loading ? loadingText : isDragging ? dropText : idleText }} + + + + {{ accept ? `(${accept} files)` : "All files allowed" }} + + + + + + + + + + + diff --git a/app/components/FileSelector.vue b/app/components/FileSelector.vue index d3e206ff..985fb354 100644 --- a/app/components/FileSelector.vue +++ b/app/components/FileSelector.vue @@ -41,7 +41,8 @@ }, { deep: true }, ) - watch(props.auto_upload, (newVal) => { + const auto_upload_prop = toRef(props, "auto_upload") + watch(auto_upload_prop, (newVal) => { auto_upload.value = newVal }) diff --git a/app/components/FileUploader.vue b/app/components/FileUploader.vue index c51425bc..0ad3e7fe 100644 --- a/app/components/FileUploader.vue +++ b/app/components/FileUploader.vue @@ -1,31 +1,48 @@ - - - + + + + + Selected Files + + {{ internal_files.length }} + + + + - - - + variant="tonal" + class="font-weight-medium" + @click:close="removeFile(index)" + > + mdi-file-outline + {{ file.name }} + + + + + + mdi-upload Upload file(s) @@ -35,9 +52,11 @@ diff --git a/app/components/Launcher.vue b/app/components/Launcher.vue index f6f77858..67a319b4 100644 --- a/app/components/Launcher.vue +++ b/app/components/Launcher.vue @@ -8,7 +8,7 @@ align-self="center" style="z-index: 1000" > - + diff --git a/app/components/Recaptcha.vue b/app/components/Recaptcha.vue index 502d6917..58bd095e 100644 --- a/app/components/Recaptcha.vue +++ b/app/components/Recaptcha.vue @@ -31,7 +31,7 @@ @@ -53,11 +53,16 @@ required: false, default: "white", }, + color: { + type: String, + required: false, + }, }) const infraStore = useInfraStore() const name = ref("") const email = ref("") const launch = ref(false) + const valid = ref(false) const emailRules = [ (value) => { if (value) { diff --git a/app/components/Step.vue b/app/components/Step.vue index 70fa53c2..6e01c9b7 100644 --- a/app/components/Step.vue +++ b/app/components/Step.vue @@ -1,62 +1,57 @@ - - - - - - - - - + + + + {{ steps[step_index].step_title }} - - - - + - {{ truncate(chip, 50) }} - - - - - + + {{ truncate(chip, 30) }} + + + + + + + + + + + + diff --git a/app/components/Stepper.vue b/app/components/Stepper.vue index 0a0399d6..2dfa28e4 100644 --- a/app/components/Stepper.vue +++ b/app/components/Stepper.vue @@ -1,20 +1,17 @@ - - - - - + @@ -25,3 +22,28 @@ const stepper_tree = inject("stepper_tree") const { steps, current_step_index } = toRefs(stepper_tree) + + diff --git a/app/plugins/auto_store_register.js b/app/plugins/auto_store_register.js index fba19ebb..d023c45e 100644 --- a/app/plugins/auto_store_register.js +++ b/app/plugins/auto_store_register.js @@ -10,15 +10,19 @@ const autoStoreRegister = ({ store }) => { console.log(`[AutoRegister] Store "${store.$id}" processed`) } -export default defineNuxtPlugin((nuxtApp) => { - const { $pinia } = nuxtApp - if (!$pinia) { - console.warn("Pinia instance not available.") - return - } +export default defineNuxtPlugin({ + name: "auto-store-register", + dependsOn: ["pinia"], + setup(nuxtApp) { + const { $pinia } = nuxtApp + if (!$pinia) { + console.warn("Pinia instance not available.") + return + } - $pinia.use(autoStoreRegister) - console.log( - "[AUTOREGISTER PLUGIN] Loaded automatically from OpenGeodeWeb-Front", - ) + $pinia.use(autoStoreRegister) + console.log( + "[AUTOREGISTER PLUGIN] Loaded automatically from OpenGeodeWeb-Front", + ) + }, }) diff --git a/app/stores/data.js b/app/stores/data.js index de1f50bd..f1201818 100644 --- a/app/stores/data.js +++ b/app/stores/data.js @@ -103,7 +103,7 @@ export const useDataStore = defineStore("data", () => { async function addModelComponents(values) { if (!values || values.length === 0) { - console.warn("[addModelComponents] No mesh components to add") + console.debug("[addModelComponents] No mesh components to add") return } values.map((value) => { diff --git a/internal/database/tables/model_components.js b/internal/database/tables/model_components.js index a260bf5c..4bf4601f 100644 --- a/internal/database/tables/model_components.js +++ b/internal/database/tables/model_components.js @@ -1,4 +1,4 @@ export const modelComponentsTable = { name: "model_components", - schema: "[id+geode_id], viewer_id, type, name, created_at", + schema: "[id+geode_id], [id+type], viewer_id, type, name, created_at", } diff --git a/internal/stores/model/blocks.js b/internal/stores/model/blocks.js index 28ebee94..c5e8c731 100644 --- a/internal/stores/model/blocks.js +++ b/internal/stores/model/blocks.js @@ -32,6 +32,9 @@ export function useModelBlocksStyle() { modelBlockStyle(id, block_id).visibility = visibility } async function setModelBlocksVisibility(id, block_ids, visibility) { + if (!block_ids || block_ids.length === 0) { + return + } const blocks_viewer_ids = await dataStore.getMeshComponentsViewerIds( id, block_ids, @@ -70,6 +73,9 @@ export function useModelBlocksStyle() { } async function setModelBlocksColor(id, block_ids, color) { + if (!block_ids || block_ids.length === 0) { + return + } const blocks_viewer_ids = await dataStore.getMeshComponentsViewerIds( id, block_ids, diff --git a/internal/stores/model/corners.js b/internal/stores/model/corners.js index a8da3abf..fdbf7b3c 100644 --- a/internal/stores/model/corners.js +++ b/internal/stores/model/corners.js @@ -32,6 +32,9 @@ export function useModelCornersStyle() { modelCornerStyle(id, corner_id).visibility = visibility } async function setModelCornersVisibility(id, corner_ids, visibility) { + if (!corner_ids || corner_ids.length === 0) { + return + } const corner_viewer_ids = await dataStore.getMeshComponentsViewerIds( id, corner_ids, @@ -71,6 +74,9 @@ export function useModelCornersStyle() { } async function setModelCornersColor(id, corner_ids, color) { + if (!corner_ids || corner_ids.length === 0) { + return + } const corner_viewer_ids = await dataStore.getMeshComponentsViewerIds( id, corner_ids, diff --git a/internal/stores/model/lines.js b/internal/stores/model/lines.js index 9680d62b..da83d8e2 100644 --- a/internal/stores/model/lines.js +++ b/internal/stores/model/lines.js @@ -32,6 +32,9 @@ export function useModelLinesStyle() { modelLineStyle(id, line_id).visibility = visibility } async function setModelLinesVisibility(id, line_ids, visibility) { + if (!line_ids || line_ids.length === 0) { + return + } const line_viewer_ids = await dataStore.getMeshComponentsViewerIds( id, line_ids, @@ -69,6 +72,9 @@ export function useModelLinesStyle() { modelLineStyle(id, line_id).color = color } async function setModelLinesColor(id, line_ids, color) { + if (!line_ids || line_ids.length === 0) { + return + } const line_viewer_ids = await dataStore.getMeshComponentsViewerIds( id, line_ids, diff --git a/internal/stores/model/surfaces.js b/internal/stores/model/surfaces.js index 719628e1..5138f836 100644 --- a/internal/stores/model/surfaces.js +++ b/internal/stores/model/surfaces.js @@ -31,6 +31,9 @@ export function useModelSurfacesStyle() { modelSurfaceStyle(id, surface_id).visibility = visibility } async function setModelSurfacesVisibility(id, surface_ids, visibility) { + if (!surface_ids || surface_ids.length === 0) { + return + } const surface_viewer_ids = await dataStore.getMeshComponentsViewerIds( id, surface_ids, @@ -68,6 +71,9 @@ export function useModelSurfacesStyle() { } async function setModelSurfacesColor(id, surface_ids, color) { + if (!surface_ids || surface_ids.length === 0) { + return + } const surface_viewer_ids = await dataStore.getMeshComponentsViewerIds( id, surface_ids, diff --git a/tests/integration/microservices/back/requirements.txt b/tests/integration/microservices/back/requirements.txt index ecd51b9e..bd3a3ef5 100644 --- a/tests/integration/microservices/back/requirements.txt +++ b/tests/integration/microservices/back/requirements.txt @@ -5,4 +5,3 @@ # pip-compile --output-file=tests/integration/microservices/back/requirements.txt tests/integration/microservices/back/requirements.in # -opengeodeweb-back==6.*,>=6.0.0rc1 diff --git a/tests/integration/microservices/viewer/requirements.txt b/tests/integration/microservices/viewer/requirements.txt index 8293def3..4d097394 100644 --- a/tests/integration/microservices/viewer/requirements.txt +++ b/tests/integration/microservices/viewer/requirements.txt @@ -5,4 +5,3 @@ # pip-compile --output-file=tests/integration/microservices/viewer/requirements.txt tests/integration/microservices/viewer/requirements.in # -opengeodeweb-viewer==1.*,>=1.14.0
+ + + + {{ steps[step_index].step_title }} - - - - + - {{ truncate(chip, 50) }} - - - - - + + {{ truncate(chip, 30) }} + + + + + + + + + +