Skip to content

Commit 7f9198c

Browse files
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWeb-Front into test/integration_add_more_tests
2 parents 3aa1331 + a1240c1 commit 7f9198c

File tree

21 files changed

+626
-328
lines changed

21 files changed

+626
-328
lines changed

.github/workflows/schedule.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Schedule
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
type: string
8+
default: "next"
9+
schedule:
10+
- cron: 0 23 * * *
11+
12+
jobs:
13+
schedule:
14+
uses: Geode-solutions/actions/.github/workflows/js-schedule.yml@master
15+
with:
16+
repos: ${{ vars.REPOS }}
17+
branch: ${{ inputs.branch || 'next' }}
18+
secrets: inherit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ venv
2727
.pytest_cache
2828
__snapshots__
2929
coverage
30+
*.db
3031
# package-lock.json

.oxlintrc.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,29 @@
77
"style": "error",
88
"restriction": "error"
99
},
10-
"plugins": ["import", "node", "oxc", "promise", "unicorn", "vitest"]
10+
"plugins": ["import", "node", "oxc", "promise", "unicorn", "vitest"],
11+
"rules": {
12+
"unicorn/filename-case": [
13+
"error",
14+
{
15+
"case": "snakeCase"
16+
}
17+
],
18+
"eslint/func-style": [
19+
"error",
20+
{
21+
"style:": "declaration"
22+
}
23+
],
24+
"eslint/sort-keys": "off",
25+
"eslint/no-ternary": "off"
26+
},
27+
"overrides": [
28+
{
29+
"files": ["**/components/*"],
30+
"rules": {
31+
"unicorn/filename-case": "PascalCase"
32+
}
33+
}
34+
]
1135
}

components/Viewer/Options/TextureItem.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@
4242
4343
const props = defineProps({
4444
id: { type: String, required: true },
45+
texture_id: { type: String, required: true },
4546
texture_name: { type: String, required: true },
46-
texture_file_name: { type: String, required: true },
4747
})
4848
4949
const texture_name = ref("")
5050
texture_name.value = props.texture_name
5151
52-
const texture_file_name = ref("")
53-
texture_file_name.value = props.texture_file_name
52+
const texture_id = ref("")
53+
texture_id.value = props.texture_id
5454
5555
const texture_coordinates = ref([])
5656
@@ -86,7 +86,7 @@
8686
},
8787
{
8888
response_function: async (response) => {
89-
texture_file_name.value = response._data.viewable_file_name
89+
texture_id.value = response._data.id
9090
},
9191
},
9292
)
@@ -97,8 +97,8 @@
9797
emit("update_value", { key: "texture_name", value })
9898
})
9999
100-
watch(texture_file_name, (value) => {
101-
emit("update_value", { key: "texture_file_name", value })
100+
watch(texture_id, (value) => {
101+
emit("update_value", { key: "id", value })
102102
})
103103
</script>
104104

components/Viewer/Options/TexturesSelector.vue

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<ViewerOptionsTextureItem
1919
:id="id"
2020
:texture_name="internal_textures[index].texture_name"
21-
:texture_file_name="internal_textures[index].texture_file_name"
21+
:texture_id="internal_textures[index].id"
2222
@update_value="update_value_event($event, index)"
2323
/>
2424
</v-row>
@@ -30,9 +30,7 @@
3030
icon="mdi-plus"
3131
v-tooltip:bottom="'Add a texture'"
3232
size="20"
33-
@click="
34-
internal_textures.push({ texture_name: '', texture_file_name: '' })
35-
"
33+
@click="internal_textures.push({ texture_name: '', id: '' })"
3634
/>
3735
</v-col>
3836
</v-row>
@@ -51,16 +49,16 @@
5149
if (textures.value != null) {
5250
internal_textures.value = textures.value
5351
} else {
54-
internal_textures.value = [{ texture_name: "", texture_file_name: "" }]
52+
internal_textures.value = [{ id: "", texture_name: "" }]
5553
}
5654
})
5755
5856
function update_value_event($event, index) {
5957
internal_textures.value[index][$event.key] = $event.value
6058
const filtered = internal_textures.value.filter((texture) => {
61-
return texture.texture_name != "" && texture.texture_file_name != ""
59+
return texture.texture_name !== "" && texture.id !== ""
6260
})
63-
if (filtered.length != 0) {
61+
if (filtered.length !== 0) {
6462
textures.value = filtered
6563
}
6664
}

composables/viewer_call.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export function viewer_call(
1313
console.log("schema", schema)
1414
console.log("params", params)
1515
}
16-
feedback_store.add_error(400, schema.route, "Bad request", error)
17-
throw new Error(schema.route.concat(": ", error))
16+
feedback_store.add_error(400, schema.$id, "Bad request", error)
17+
throw new Error(schema.$id.concat(": "))
1818
}
1919

2020
const client = viewer_store.client
@@ -45,7 +45,7 @@ export function viewer_call(
4545
.catch((error) => {
4646
feedback_store.add_error(
4747
error.code,
48-
schema.route,
48+
schema.$id,
4949
error.message,
5050
error.message,
5151
)

internal_stores/mesh/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ export default function useMeshStyle() {
1515
const meshPolyhedraStyleStore = useMeshPolyhedraStyle()
1616
const hybridViewerStore = useHybridViewerStore()
1717

18+
function meshVisibility(id) {
19+
return dataStyleStore.styles[id].visibility
20+
}
1821
function setMeshVisibility(id, visibility) {
1922
return viewer_call(
2023
{
@@ -25,7 +28,7 @@ export default function useMeshStyle() {
2528
response_function: () => {
2629
hybridViewerStore.setVisibility(id, visibility)
2730
dataStyleStore.styles[id].visibility = visibility
28-
console.log(`${setMeshVisibility.name} ${id} ${visibility}`)
31+
console.log(`${setMeshVisibility.name} ${id} ${meshVisibility(id)}`)
2932
},
3033
},
3134
)
@@ -55,6 +58,7 @@ export default function useMeshStyle() {
5558
}
5659

5760
return {
61+
meshVisibility,
5862
setMeshVisibility,
5963
applyMeshDefaultStyle,
6064
...useMeshPointsStyle(),

package-lock.json

Lines changed: 18 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"vue-recaptcha": "2.0.3",
6464
"vue3-carousel": "0.3.4",
6565
"vuetify": "3.8.12",
66+
"ws": "8.18.3",
6667
"wslink": "1.12.4"
6768
},
6869
"repository": {

plugins/autoStoreRegister.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const autoStoreRegister = ({ store }) => {
2+
if (store.$id === "app") {
3+
return
4+
}
5+
6+
const appStore = useAppStore()
7+
appStore.registerStore(store)
8+
console.log(`[AutoRegister] Store "${store.$id}" processed`)
9+
}
10+
11+
export default defineNuxtPlugin((nuxtApp) => {
12+
nuxtApp.$pinia.use(autoStoreRegister)
13+
console.log(
14+
"[AUTOREGISTER PLUGIN] Loaded automatically from OpenGeodeWeb-Front",
15+
)
16+
})

0 commit comments

Comments
 (0)