@geode/opengeodeweb-front 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/Branch-protection.yml +11 -0
- package/.github/workflows/CD.yml +23 -0
- package/.releaserc +11 -0
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/assets/geode_objects.js +110 -0
- package/assets/img/geode_objects/BRep.svg +102 -0
- package/assets/img/geode_objects/cross_section.svg +95 -0
- package/assets/img/geode_objects/edged_curve.svg +67 -0
- package/assets/img/geode_objects/edged_curve2d.svg +78 -0
- package/assets/img/geode_objects/edged_curve3d.svg +78 -0
- package/assets/img/geode_objects/hybrid_solid.svg +128 -0
- package/assets/img/geode_objects/point_set2d.svg +97 -0
- package/assets/img/geode_objects/point_set3d.svg +97 -0
- package/assets/img/geode_objects/polygonal_surface2d.svg +90 -0
- package/assets/img/geode_objects/polygonal_surface3d.svg +90 -0
- package/assets/img/geode_objects/polyhedral_solid.svg +148 -0
- package/assets/img/geode_objects/raster_image2d.svg +109 -0
- package/assets/img/geode_objects/raster_image3d.svg +108 -0
- package/assets/img/geode_objects/regular_grid.svg +107 -0
- package/assets/img/geode_objects/regular_grid2d.svg +107 -0
- package/assets/img/geode_objects/regular_grid3d.svg +193 -0
- package/assets/img/geode_objects/section.svg +87 -0
- package/assets/img/geode_objects/structural_model.svg +95 -0
- package/assets/img/geode_objects/tetrahedral_solid.svg +82 -0
- package/assets/img/geode_objects/triangulated_surface2d.svg +84 -0
- package/assets/img/geode_objects/triangulated_surface3d.svg +84 -0
- package/assets/img/geode_objects/vertex_set.svg +86 -0
- package/components/CrsSelector.vue +78 -0
- package/components/Errors/Banner.vue +48 -0
- package/components/Errors/Snackers.vue +49 -0
- package/components/ExtensionSelector.vue +53 -0
- package/components/FileSelector.vue +46 -0
- package/components/Header.vue +30 -0
- package/components/Launcher.vue +55 -0
- package/components/Loading.vue +24 -0
- package/components/ObjectSelector.vue +66 -0
- package/components/PackagesVersions.vue +54 -0
- package/components/RemoteRenderingView.client.vue +88 -0
- package/components/Step.vue +74 -0
- package/components/Stepper.vue +13 -0
- package/components/ViewToolbar.vue +30 -0
- package/components/Wrapper.vue +33 -0
- package/composables/api_fetch.js +32 -0
- package/nuxt.config.js +5 -0
- package/package.json +53 -0
- package/protocols/index.js +5 -0
- package/protocols/vtk.js +20 -0
- package/stores/cloud.js +89 -0
- package/stores/errors.js +20 -0
- package/stores/viewer.js +139 -0
- package/stores/websocket.js +94 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
6
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
7
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
8
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
11
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
12
|
+
width="18.141853mm"
|
|
13
|
+
height="18.141851mm"
|
|
14
|
+
viewBox="0 0 64.282157 64.282151"
|
|
15
|
+
id="svg2"
|
|
16
|
+
version="1.1"
|
|
17
|
+
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
|
18
|
+
sodipodi:docname="point_set.svg">
|
|
19
|
+
<defs
|
|
20
|
+
id="defs4" />
|
|
21
|
+
<sodipodi:namedview
|
|
22
|
+
id="base"
|
|
23
|
+
pagecolor="#ffffff"
|
|
24
|
+
bordercolor="#666666"
|
|
25
|
+
borderopacity="1.0"
|
|
26
|
+
inkscape:pageopacity="0.0"
|
|
27
|
+
inkscape:pageshadow="2"
|
|
28
|
+
inkscape:zoom="1.979899"
|
|
29
|
+
inkscape:cx="-4.0414477"
|
|
30
|
+
inkscape:cy="-80.536838"
|
|
31
|
+
inkscape:document-units="px"
|
|
32
|
+
inkscape:current-layer="layer1"
|
|
33
|
+
showgrid="false"
|
|
34
|
+
inkscape:window-width="1853"
|
|
35
|
+
inkscape:window-height="1025"
|
|
36
|
+
inkscape:window-x="67"
|
|
37
|
+
inkscape:window-y="27"
|
|
38
|
+
inkscape:window-maximized="1"
|
|
39
|
+
fit-margin-top="0"
|
|
40
|
+
fit-margin-left="0"
|
|
41
|
+
fit-margin-right="0"
|
|
42
|
+
fit-margin-bottom="0" />
|
|
43
|
+
<metadata
|
|
44
|
+
id="metadata7">
|
|
45
|
+
<rdf:RDF>
|
|
46
|
+
<cc:Work
|
|
47
|
+
rdf:about="">
|
|
48
|
+
<dc:format>image/svg+xml</dc:format>
|
|
49
|
+
<dc:type
|
|
50
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
51
|
+
<dc:title />
|
|
52
|
+
</cc:Work>
|
|
53
|
+
</rdf:RDF>
|
|
54
|
+
</metadata>
|
|
55
|
+
<g
|
|
56
|
+
inkscape:label="Calque 1"
|
|
57
|
+
inkscape:groupmode="layer"
|
|
58
|
+
id="layer1"
|
|
59
|
+
transform="translate(-152.78749,-88.72113)">
|
|
60
|
+
<g
|
|
61
|
+
id="g4185"
|
|
62
|
+
transform="translate(4.332859,-0.158041)">
|
|
63
|
+
<ellipse
|
|
64
|
+
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
|
65
|
+
id="ellipse4177"
|
|
66
|
+
cx="175.35263"
|
|
67
|
+
cy="105.60451"
|
|
68
|
+
rx="6.0185194"
|
|
69
|
+
ry="5.8035727" />
|
|
70
|
+
<ellipse
|
|
71
|
+
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
|
72
|
+
id="ellipse4179"
|
|
73
|
+
cx="197.1046"
|
|
74
|
+
cy="127.25306"
|
|
75
|
+
rx="6.0185194"
|
|
76
|
+
ry="5.8035727" />
|
|
77
|
+
<ellipse
|
|
78
|
+
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
|
79
|
+
id="ellipse4181"
|
|
80
|
+
cx="167.83682"
|
|
81
|
+
cy="132.68599"
|
|
82
|
+
rx="6.0185194"
|
|
83
|
+
ry="5.8035727" />
|
|
84
|
+
</g>
|
|
85
|
+
</g>
|
|
86
|
+
</svg>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-text-field v-model="search" append-icon="mdi-magnify" label="Search" single-line hide-details></v-text-field>
|
|
3
|
+
<v-data-table v-model="selected_crs" :v-model:items-per-page="10" :headers="headers" :items="crs_list" item-value="code"
|
|
4
|
+
class="elevation-1" density='compact' fixed-header select-strategy='single' show-select :search="search"
|
|
5
|
+
:loading="data_table_loading" loading-text="Loading... Please wait"></v-data-table>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup>
|
|
9
|
+
import { useToggle } from '@vueuse/core'
|
|
10
|
+
|
|
11
|
+
const stepper_tree = inject('stepper_tree')
|
|
12
|
+
const { geode_object, route_prefix } = stepper_tree
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
variable_to_update: { type: String, required: true },
|
|
16
|
+
variable_to_increment: { type: String, required: true },
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const { variable_to_update, variable_to_increment } = props
|
|
20
|
+
|
|
21
|
+
const search = ref('')
|
|
22
|
+
const data_table_loading = ref(false)
|
|
23
|
+
const crs_list = ref([])
|
|
24
|
+
const selected_crs = ref([])
|
|
25
|
+
const toggle_loading = useToggle(data_table_loading)
|
|
26
|
+
|
|
27
|
+
watch(selected_crs, (new_value) => {
|
|
28
|
+
const crs = get_selected_crs(new_value[0])
|
|
29
|
+
set_crs(crs)
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
function set_crs(crs_value) {
|
|
33
|
+
stepper_tree[variable_to_update] = crs_value
|
|
34
|
+
stepper_tree[variable_to_increment]++
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function get_selected_crs(crs_code) {
|
|
38
|
+
for (let i = 0; i <= crs_list.value.length; i++) {
|
|
39
|
+
if (crs_list.value[i]['code'] == crs_code) {
|
|
40
|
+
return crs_list.value[i]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async function get_crs_table() {
|
|
46
|
+
let params = new FormData()
|
|
47
|
+
params.append('geode_object', geode_object)
|
|
48
|
+
toggle_loading()
|
|
49
|
+
await api_fetch(`${route_prefix}/geographic_coordinate_systems`, { method: 'POST', body: params },
|
|
50
|
+
{
|
|
51
|
+
'request_error_function': () => { toggle_loading() },
|
|
52
|
+
'response_function': (response) => {
|
|
53
|
+
toggle_loading()
|
|
54
|
+
crs_list.value = response._data.crs_list
|
|
55
|
+
},
|
|
56
|
+
'response_error_function': () => { toggle_loading() }
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const headers = [
|
|
62
|
+
{
|
|
63
|
+
title: 'Authority',
|
|
64
|
+
align: 'start',
|
|
65
|
+
sortable: true,
|
|
66
|
+
key: 'authority',
|
|
67
|
+
|
|
68
|
+
},
|
|
69
|
+
{ title: 'Code', align: 'end', key: 'code' },
|
|
70
|
+
{ title: 'Name', align: 'end', key: 'name' }
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
onMounted(() => {
|
|
75
|
+
get_crs_table()
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
</script>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-banner v-if="server_error" elevation="2" style="background-color: grey; z-index:100;" position="fixed">
|
|
3
|
+
<v-row>
|
|
4
|
+
<v-col cols="auto" class="white--text text-center">
|
|
5
|
+
<v-tooltip location="end">
|
|
6
|
+
<span>
|
|
7
|
+
We turn off our server automatically after 5 minutes of inactivity
|
|
8
|
+
</span>
|
|
9
|
+
<template #activator="{ props }">
|
|
10
|
+
<v-icon v-bind="props" color="white" class="justify-right">
|
|
11
|
+
mdi-information-outline
|
|
12
|
+
</v-icon>
|
|
13
|
+
</template>
|
|
14
|
+
</v-tooltip>
|
|
15
|
+
</v-col>
|
|
16
|
+
<v-col cols="auto" class="text-white font-weight-bold">Server timed out due to inactivity,
|
|
17
|
+
please reload this page
|
|
18
|
+
or click here:
|
|
19
|
+
</v-col>
|
|
20
|
+
<v-col cols="auto" align-items="center">
|
|
21
|
+
<v-btn @click="reload()" color="grey" density='compact'>
|
|
22
|
+
Reload
|
|
23
|
+
</v-btn>
|
|
24
|
+
</v-col>
|
|
25
|
+
<v-spacer />
|
|
26
|
+
<v-col cols="auto">
|
|
27
|
+
<v-btn icon flat size="20" @click="errors_store.delete_server_error()" color="grey" class=".align-center">
|
|
28
|
+
<v-icon icon="mdi-close" size="20" color="white" />
|
|
29
|
+
</v-btn>
|
|
30
|
+
</v-col>
|
|
31
|
+
</v-row>
|
|
32
|
+
</v-banner>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script setup>
|
|
36
|
+
const errors_store = use_errors_store()
|
|
37
|
+
const { server_error } = storeToRefs(errors_store)
|
|
38
|
+
|
|
39
|
+
function reload () {
|
|
40
|
+
window.location.reload()
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style scoped>
|
|
45
|
+
.v-btn {
|
|
46
|
+
text-transform: unset !important;
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-snackbar :style="{ 'margin-bottom': calc_margin(index) }" v-for="(error, index) in errors" :key="index"
|
|
3
|
+
v-model="show" color="error" location="bottom right" transition="slide-x-reverse-transition" max-width="30%"
|
|
4
|
+
height="20px">
|
|
5
|
+
<v-row dense class="flex-nowrap">
|
|
6
|
+
<v-col cols="auto">
|
|
7
|
+
<v-tooltip location="left">
|
|
8
|
+
<span>
|
|
9
|
+
{{ error.code }}<br />
|
|
10
|
+
{{ error.route }}<br />
|
|
11
|
+
{{ error.description }}
|
|
12
|
+
<br>
|
|
13
|
+
</span>
|
|
14
|
+
<template #activator="{ props }">
|
|
15
|
+
<v-icon v-bind="props" color="white" class="justify-right">
|
|
16
|
+
mdi-information-outline
|
|
17
|
+
</v-icon>
|
|
18
|
+
</template>
|
|
19
|
+
</v-tooltip>
|
|
20
|
+
</v-col>
|
|
21
|
+
<v-col cols="9" class="text-no-wrap overflow-hidden">
|
|
22
|
+
{{ error.name }}
|
|
23
|
+
</v-col>
|
|
24
|
+
<v-spacer />
|
|
25
|
+
<v-col cols="auto">
|
|
26
|
+
<v-btn icon flat size="20" @click="errors_store.delete_error(index)" color="error">
|
|
27
|
+
<v-icon icon="mdi-close" size="20" color="white" />
|
|
28
|
+
</v-btn>
|
|
29
|
+
</v-col>
|
|
30
|
+
</v-row>
|
|
31
|
+
</v-snackbar>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup>
|
|
35
|
+
const errors_store = use_errors_store()
|
|
36
|
+
const { errors } = storeToRefs(errors_store)
|
|
37
|
+
|
|
38
|
+
const show = true
|
|
39
|
+
|
|
40
|
+
function calc_margin (index) {
|
|
41
|
+
return (index * 60) + 8 + 'px'
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<style scoped>
|
|
46
|
+
.v-snackbar :deep(.v-snackbar__content) {
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-row class="justify-left">
|
|
3
|
+
<v-col v-for="file_extension in file_extensions" :key="file_extension" cols="2">
|
|
4
|
+
<v-card class="card ma-2" hover elevation="5" @click="set_output_extension(file_extension)">
|
|
5
|
+
<v-card-title align="center">
|
|
6
|
+
{{ file_extension }}
|
|
7
|
+
</v-card-title>
|
|
8
|
+
</v-card>
|
|
9
|
+
</v-col>
|
|
10
|
+
</v-row>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
const stepper_tree = inject('stepper_tree')
|
|
15
|
+
const { geode_object, route_prefix } = stepper_tree
|
|
16
|
+
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
variable_to_update: { type: String, required: true },
|
|
19
|
+
variable_to_increment: { type: String, required: true },
|
|
20
|
+
})
|
|
21
|
+
const { variable_to_update, variable_to_increment } = props
|
|
22
|
+
|
|
23
|
+
const file_extensions = ref([])
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
async function get_output_file_extensions () {
|
|
27
|
+
const params = new FormData()
|
|
28
|
+
params.append('geode_object', geode_object)
|
|
29
|
+
await api_fetch(`${route_prefix}/output_file_extensions`, { method: 'POST', body: params },
|
|
30
|
+
{
|
|
31
|
+
'response_function': (response) => {
|
|
32
|
+
file_extensions.value = response._data.output_file_extensions
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function set_output_extension (extension) {
|
|
39
|
+
stepper_tree[variable_to_update] = extension
|
|
40
|
+
stepper_tree[variable_to_increment]++
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
onMounted(() => {
|
|
44
|
+
get_output_file_extensions()
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style scoped>
|
|
50
|
+
.card {
|
|
51
|
+
border-radius: 15px;
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-file-input v-model="files" :multiple="multiple" :label="label" :accept="accept"
|
|
3
|
+
:rules="[(value) => !!value || 'The file is mandatory']" color="primary" chips counter show-size
|
|
4
|
+
@click:clear="stepper_tree.files = []" />
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
const stepper_tree = inject('stepper_tree')
|
|
9
|
+
const { route_prefix } = stepper_tree
|
|
10
|
+
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
multiple: { type: Boolean, required: true },
|
|
13
|
+
label: { type: String, required: true },
|
|
14
|
+
variable_to_update: { type: String, required: true },
|
|
15
|
+
variable_to_increment: { type: String, required: true },
|
|
16
|
+
})
|
|
17
|
+
const { multiple, label, variable_to_update, variable_to_increment } = props
|
|
18
|
+
|
|
19
|
+
const accept = ref('')
|
|
20
|
+
const files = ref([])
|
|
21
|
+
|
|
22
|
+
watch(files, (value) => {
|
|
23
|
+
stepper_tree[variable_to_update] = value
|
|
24
|
+
stepper_tree[variable_to_increment]++
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
function fill_extensions (response) {
|
|
28
|
+
const extensions = response._data.extensions.map((extension) => '.' + extension).join(',')
|
|
29
|
+
accept.value = extensions
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function get_allowed_files () {
|
|
33
|
+
const route = `${route_prefix}/allowed_files`
|
|
34
|
+
await api_fetch(route, { method: 'GET' },
|
|
35
|
+
{
|
|
36
|
+
'response_function': (response) => {
|
|
37
|
+
fill_extensions(response)
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
onMounted(async () => {
|
|
43
|
+
await get_allowed_files()
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-container>
|
|
3
|
+
<h1 class="text-h2 py-2" align="center">
|
|
4
|
+
{{ tool_name }}
|
|
5
|
+
</h1>
|
|
6
|
+
<v-col>
|
|
7
|
+
<v-row class="justify-center">
|
|
8
|
+
<v-col v-for="(card, i) in cards_list" :key="i" cols="11" md="5">
|
|
9
|
+
<v-card class="card" hover elevation="5" :href="card.href" rounded target="_blank">
|
|
10
|
+
<v-card-title primary-title class="justify-center text-h6" align="center">
|
|
11
|
+
{{ card.title }}
|
|
12
|
+
</v-card-title>
|
|
13
|
+
<v-row class="justify-center pa-2">
|
|
14
|
+
<v-col cols="auto">
|
|
15
|
+
<v-icon :icon="card.icon" color="primary" size="70" class="justify-center" />
|
|
16
|
+
</v-col>
|
|
17
|
+
</v-row>
|
|
18
|
+
</v-card>
|
|
19
|
+
</v-col>
|
|
20
|
+
</v-row>
|
|
21
|
+
</v-col>
|
|
22
|
+
</v-container>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup>
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
tool_name: { type: String, required: true },
|
|
28
|
+
cards_list: { type: Object, required: true }
|
|
29
|
+
})
|
|
30
|
+
</script>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-container justify="space-around">
|
|
3
|
+
<v-row align-content="center" align="center">
|
|
4
|
+
<v-col v-if="!is_captcha_validated" cols="12" align-self="center" align="center">
|
|
5
|
+
<h4 class="pb-3">
|
|
6
|
+
Please complete the recaptcha to launch the app
|
|
7
|
+
</h4>
|
|
8
|
+
<vue-recaptcha ref="recaptcha" :sitekey="site_key" :loadRecaptchaScript="true"
|
|
9
|
+
@expired="is_captcha_validated = false" @verify="submit_recaptcha" align-self="center" />
|
|
10
|
+
</v-col>
|
|
11
|
+
<v-col v-if="!is_cloud_running && is_connexion_launched">
|
|
12
|
+
<Loading />
|
|
13
|
+
</v-col>
|
|
14
|
+
</v-row>
|
|
15
|
+
</v-container>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
import { VueRecaptcha } from "vue-recaptcha"
|
|
20
|
+
|
|
21
|
+
const websocket_store = use_websocket_store()
|
|
22
|
+
const cloud_store = use_cloud_store()
|
|
23
|
+
const { is_cloud_running, is_captcha_validated, is_connexion_launched } = storeToRefs(cloud_store)
|
|
24
|
+
|
|
25
|
+
const props = defineProps({
|
|
26
|
+
site_key: { type: String, required: true }
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const { site_key } = toRefs(props)
|
|
30
|
+
|
|
31
|
+
watch(is_captcha_validated, async (value) => {
|
|
32
|
+
if (value === true && process.client) {
|
|
33
|
+
await cloud_store.create_connexion()
|
|
34
|
+
await websocket_store.ws_connect()
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
onMounted(() => {
|
|
39
|
+
if (process.client) {
|
|
40
|
+
const config = useRuntimeConfig()
|
|
41
|
+
if (config.public.NODE_ENV !== 'production') {
|
|
42
|
+
cloud_store.$patch({ is_captcha_validated: true })
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
async function submit_recaptcha (token) {
|
|
48
|
+
try {
|
|
49
|
+
const response = await $fetch.raw(`/.netlify/functions/recaptcha?token=${token}`)
|
|
50
|
+
cloud_store.$patch({ is_captcha_validated: response.status == 200 })
|
|
51
|
+
recaptcha.reset()
|
|
52
|
+
} catch (error) {
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-row justify="center">
|
|
3
|
+
<v-col cols="12" class="ma-3">
|
|
4
|
+
<v-card class="card" loading elevation="5">
|
|
5
|
+
<v-card-title class="text-center">
|
|
6
|
+
Cloud instance is starting...
|
|
7
|
+
</v-card-title>
|
|
8
|
+
<v-card-subtitle class="text-center">
|
|
9
|
+
Why do you have to wait?
|
|
10
|
+
</v-card-subtitle>
|
|
11
|
+
<v-card-text class="text-center">
|
|
12
|
+
We start our server only on demand... and this takes a few minutes before
|
|
13
|
+
you can use our free app.
|
|
14
|
+
<br>
|
|
15
|
+
This is aligned with an energy sobriety strategy. So be patient
|
|
16
|
+
<v-icon color="primary" size="20">
|
|
17
|
+
mdi-emoticon-excited-outline
|
|
18
|
+
</v-icon>
|
|
19
|
+
<br>
|
|
20
|
+
</v-card-text>
|
|
21
|
+
</v-card>
|
|
22
|
+
</v-col>
|
|
23
|
+
</v-row>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-row v-if="allowed_objects.length" class="justify-left">
|
|
3
|
+
<v-col v-for="object in allowed_objects" :key="object" cols="2" md="2">
|
|
4
|
+
<v-card v-ripple class="card ma-2" hover elevation="5" rounded>
|
|
5
|
+
<v-img :src="geode_objects[object].image" cover @click="set_geode_object(object)" />
|
|
6
|
+
<v-tooltip activator="parent" location="bottom">
|
|
7
|
+
{{ geode_objects[object].tooltip }}
|
|
8
|
+
</v-tooltip>
|
|
9
|
+
</v-card>
|
|
10
|
+
</v-col>
|
|
11
|
+
</v-row>
|
|
12
|
+
<v-row v-else class="pa-5">
|
|
13
|
+
<v-card class="card" variant="tonal" elevation="5" rounded>
|
|
14
|
+
<v-card-text>
|
|
15
|
+
This file format isn't supported! Please check the <a href="https://docs.geode-solutions.com/formats/"
|
|
16
|
+
target="_blank">
|
|
17
|
+
supported file formats documentation</a> for more information
|
|
18
|
+
</v-card-text>
|
|
19
|
+
</v-card>
|
|
20
|
+
</v-row>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup>
|
|
24
|
+
import geode_objects from '@/assets/geode_objects'
|
|
25
|
+
|
|
26
|
+
const stepper_tree = inject('stepper_tree')
|
|
27
|
+
const { files, route_prefix } = stepper_tree
|
|
28
|
+
|
|
29
|
+
const props = defineProps({
|
|
30
|
+
variable_to_update: { type: String, required: true },
|
|
31
|
+
variable_to_increment: { type: String, required: true },
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
const { variable_to_update, variable_to_increment } = props
|
|
35
|
+
|
|
36
|
+
const allowed_objects = ref([])
|
|
37
|
+
|
|
38
|
+
async function get_allowed_objects () {
|
|
39
|
+
|
|
40
|
+
const params = new FormData()
|
|
41
|
+
params.append('filename', files[0].name)
|
|
42
|
+
|
|
43
|
+
await api_fetch(`${route_prefix}/allowed_objects`,
|
|
44
|
+
{ method: 'POST', body: params },
|
|
45
|
+
{
|
|
46
|
+
'response_function': (response) => { allowed_objects.value = response._data.allowed_objects }
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function set_geode_object (geode_object) {
|
|
51
|
+
stepper_tree[variable_to_update] = geode_object
|
|
52
|
+
stepper_tree[variable_to_increment]++
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
onMounted(() => {
|
|
56
|
+
get_allowed_objects()
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style scoped>
|
|
63
|
+
.card {
|
|
64
|
+
border-radius: 15px;
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-container>
|
|
3
|
+
This tool uses our Open-Source codes
|
|
4
|
+
<v-tooltip location="end">
|
|
5
|
+
<span v-for="package_version in packages_versions" :key="package_version.package">
|
|
6
|
+
{{ package_version.package }} v{{ package_version.version }}
|
|
7
|
+
<br>
|
|
8
|
+
</span>
|
|
9
|
+
<template #activator="{ props }">
|
|
10
|
+
<v-icon v-bind="props" color="primary" class="justify-right">
|
|
11
|
+
mdi-information-outline
|
|
12
|
+
</v-icon>
|
|
13
|
+
</template>
|
|
14
|
+
</v-tooltip>
|
|
15
|
+
</v-container>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
route_prefix: { type: String, required: true }
|
|
21
|
+
})
|
|
22
|
+
const { route_prefix } = props
|
|
23
|
+
|
|
24
|
+
const cloud_store = use_cloud_store()
|
|
25
|
+
const { is_cloud_running } = storeToRefs(cloud_store)
|
|
26
|
+
|
|
27
|
+
const packages_versions = ref([])
|
|
28
|
+
|
|
29
|
+
async function get_packages_versions () {
|
|
30
|
+
await api_fetch(`${route_prefix}/versions`, { method: 'GET' }, {
|
|
31
|
+
'response_function': (response) => {
|
|
32
|
+
packages_versions.value = response._data.versions
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
watch(is_cloud_running, (value) => {
|
|
38
|
+
if (value === true) {
|
|
39
|
+
get_packages_versions()
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
onMounted(() => {
|
|
44
|
+
if (is_cloud_running.value === true) {
|
|
45
|
+
get_packages_versions()
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
onActivated(() => {
|
|
50
|
+
if (is_cloud_running.value === true) {
|
|
51
|
+
get_packages_versions()
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
</script>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="position: relative;">
|
|
3
|
+
<view-toolbar />
|
|
4
|
+
<v-col v-element-size="resize" style="overflow: hidden; position: relative; z-index: 0; height: 100%; width: 100%"
|
|
5
|
+
ref="viewer" @click="get_x_y" @keydown.esc="app_store.toggle_picking_mode(false)">
|
|
6
|
+
</v-col>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
import vtkRemoteView from '@kitware/vtk.js/Rendering/Misc/RemoteView';
|
|
12
|
+
import { useElementSize } from '@vueuse/core'
|
|
13
|
+
|
|
14
|
+
const viewer_store = use_viewer_store()
|
|
15
|
+
const { picking_mode } = storeToRefs(viewer_store)
|
|
16
|
+
const websocket_store = use_websocket_store()
|
|
17
|
+
const { client, is_client_created } = storeToRefs(websocket_store)
|
|
18
|
+
|
|
19
|
+
function get_x_y(event) {
|
|
20
|
+
if (picking_mode.value === true) {
|
|
21
|
+
const { offsetX, offsetY } = event
|
|
22
|
+
viewer_store.set_picked_point(offsetX, offsetY)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
viewId: { type: String, default: '-1' }
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const viewer = ref(null)
|
|
31
|
+
const { width, height } = useElementSize(viewer)
|
|
32
|
+
|
|
33
|
+
function resize() {
|
|
34
|
+
view.getCanvasView().setSize(1, 1)
|
|
35
|
+
view.resize();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
watch(picking_mode, value => {
|
|
39
|
+
const cursor = value == true ? 'crosshair' : 'pointer'
|
|
40
|
+
view.getCanvasView().setCursor(cursor)
|
|
41
|
+
})
|
|
42
|
+
watch(width, value => {
|
|
43
|
+
resize()
|
|
44
|
+
})
|
|
45
|
+
watch(height, value => {
|
|
46
|
+
resize()
|
|
47
|
+
})
|
|
48
|
+
const { viewId } = toRefs(props)
|
|
49
|
+
const connected = ref(false)
|
|
50
|
+
|
|
51
|
+
const view = vtkRemoteView.newInstance({ rpcWheelEvent: 'viewport.mouse.zoom.wheel' })
|
|
52
|
+
// default of 0.5 causes 2x size labels on high-DPI screens. 1 good for demo, not for production.
|
|
53
|
+
if (location.hostname.split('.')[0] === 'localhost') {
|
|
54
|
+
view.setInteractiveRatio(1)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
watch(client, (new_client) => {
|
|
59
|
+
connect()
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
watch(viewId, (id) => {
|
|
63
|
+
if (connected.value) {
|
|
64
|
+
view.setViewId(id)
|
|
65
|
+
view.render()
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
onMounted(async () => {
|
|
70
|
+
if (process.client) {
|
|
71
|
+
window.addEventListener('resize', resize)
|
|
72
|
+
await nextTick()
|
|
73
|
+
view.setContainer(viewer.value.$el)
|
|
74
|
+
connect()
|
|
75
|
+
resize()
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
function connect() {
|
|
80
|
+
if (!is_client_created.value) { return }
|
|
81
|
+
console.log('connecting', client.value)
|
|
82
|
+
const session = client.value.getConnection().getSession()
|
|
83
|
+
view.setSession(session)
|
|
84
|
+
view.setViewId(viewId.value)
|
|
85
|
+
connected.value = true
|
|
86
|
+
view.render()
|
|
87
|
+
}
|
|
88
|
+
</script>
|