Skip to content

Commit 4d15be7

Browse files
committed
new version of opengeodeweb-font
1 parent 0102b6c commit 4d15be7

File tree

11 files changed

+3458
-815
lines changed

11 files changed

+3458
-815
lines changed

components/CrsSelector.json

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,9 @@
11
{
2-
"$id": "/workflows/crs_selection",
2+
"$id": "/tools/crs_selector/geographic_coordinate_systems",
33
"type": "object",
44
"properties": {
5-
"search": {
5+
"geode_object": {
66
"type": "string"
7-
},
8-
"data_table_loading": {
9-
"type": "boolean"
10-
},
11-
"crs_list": {
12-
"type": "array",
13-
"items": {
14-
"$id": "/workflows/crs",
15-
"type": "object",
16-
"properties": {
17-
"authority": {
18-
"type": "string"
19-
},
20-
"code": {
21-
"type": "string"
22-
},
23-
"name": {
24-
"type": "string"
25-
}
26-
},
27-
"required": ["authority", "code", "name"]
28-
}
29-
},
30-
"selected_crs": {
31-
"type": "array",
32-
"items": {
33-
"type": "string"
34-
}
357
}
36-
},
37-
"required": ["search", "data_table_loading", "crs_list", "selected_crs"]
38-
}
8+
}
9+
}

components/CrsSelector.vue

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import { useToggle } from "@vueuse/core"
2828
2929
const stepper_tree = inject("stepper_tree")
30-
const { geode_object, route_prefix } = stepper_tree
30+
const { geode_object } = stepper_tree
3131
3232
const props = defineProps({
3333
variable_to_update: { type: String, required: true },
@@ -69,18 +69,12 @@
6969
await api_fetch(
7070
{ schema, params },
7171
{
72-
request_error_function: () => {
73-
toggle_loading()
74-
},
7572
response_function: (response) => {
76-
toggle_loading()
7773
crs_list.value = response._data.crs_list
7874
},
79-
response_error_function: () => {
80-
toggle_loading()
81-
},
8275
},
8376
)
77+
toggle_loading()
8478
}
8579
8680
const headers = [

components/Header.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

components/Launcher.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

components/Launcher.vue

Lines changed: 19 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,33 @@
11
<template>
22
<v-container justify="space-around">
33
<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" />
4+
<v-col
5+
v-if="!is_captcha_validated"
6+
cols="12"
7+
align-self="center"
8+
align="center"
9+
>
10+
<h4 class="pb-3">Please complete the recaptcha to launch the app</h4>
11+
<Recaptcha />
1012
</v-col>
11-
<v-col v-if="!is_cloud_running && is_connexion_launched">
13+
<v-col
14+
v-else-if="!cloud_store.is_running && cloud_store.is_connexion_launched"
15+
>
1216
<Loading />
1317
</v-col>
1418
</v-row>
1519
</v-container>
1620
</template>
1721

1822
<script setup>
19-
import { VueRecaptcha } from "vue-recaptcha"
23+
const websocket_store = use_websocket_store()
24+
const cloud_store = use_cloud_store()
25+
const { is_captcha_validated } = storeToRefs(cloud_store)
2026
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 site_key = useRuntimeConfig().public.RECAPTCHA_SITE_KEY
26-
27-
watch(is_captcha_validated, async (value) => {
28-
if (value === true && process.client) {
29-
console.log('is_captcha_validated 2', is_captcha_validated.value)
30-
await cloud_store.create_connexion()
31-
console.log('is_captcha_validated 3', is_captcha_validated.value)
32-
await websocket_store.ws_connect()
33-
console.log('is_captcha_validated 4', is_captcha_validated.value)
34-
}
35-
})
36-
37-
onMounted(() => {
38-
if (process.client) {
39-
const config = useRuntimeConfig()
40-
if (config.public.NODE_ENV !== 'production') {
41-
cloud_store.$patch({ is_captcha_validated: true })
42-
console.log('is_captcha_validated', is_captcha_validated.value)
27+
watch(is_captcha_validated, async (value) => {
28+
if (value === true && process.client) {
29+
await cloud_store.create_connexion()
30+
await websocket_store.ws_connect()
4331
}
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-
console.error(error)
54-
}
55-
}
32+
})
5633
</script>

components/ObjectSelector.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
<v-card class="card" variant="tonal" elevation="5" rounded>
1818
<v-card-text>
1919
This file format isn't supported! Please check the
20-
<a href="https://docs.geode-solutions.com/formats/" target="_blank">
20+
<a
21+
href="https://docs.geode-solutions.com/guides/formats/"
22+
target="_blank"
23+
>
2124
supported file formats documentation</a
2225
>
2326
for more information

components/PackagesVersions.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
5151
onMounted(() => {
5252
console.log("mounted", is_running)
53-
if (is_running.value === true) {
53+
if (is_running.value) {
5454
console.log("mounted ??")
5555
get_packages_versions()
5656
}

components/Step.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
</v-row>
3939
<Transition name="slide-fade">
4040
<v-col v-if="step_index == current_step_index">
41-
{{ steps[step_index].component.component_options }}
4241
<component
4342
:is="steps[step_index].component.component_name"
4443
v-bind="steps[step_index].component.component_options"

composables/api_fetch.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export function api_fetch(
1313

1414
const ajv = new Ajv();
1515
console.log("schema", schema);
16+
17+
ajv.addKeyword("method")
1618
const valid = ajv.validate(schema, body);
1719
console.log("valid", schema.$id, valid);
1820
if (!valid) {
@@ -29,11 +31,16 @@ export function api_fetch(
2931
console.log(geode_store.base_url);
3032
console.log(schema.$id);
3133

32-
const request_options = {method: schema.method}
34+
const request_options = {method: schema["method"]}
3335
console.log("body", body)
3436
if (!_.isEmpty(body)){
3537
request_options.body=body
3638
}
39+
40+
if (schema.max_retry) {
41+
request_options.max_retry = schema.max_retry;
42+
}
43+
3744
console.log("request_options", request_options)
3845
console.log("schema.$id", schema.$id)
3946
return useFetch(schema.$id,{
@@ -45,7 +52,7 @@ export function api_fetch(
4552
// Log the error to a proper logging library
4653
errors_store.add_error({
4754
code: error.code,
48-
route: request_url,
55+
route: schema.$id,
4956
name: error.message,
5057
description: error.stack,
5158
});
@@ -68,7 +75,7 @@ export function api_fetch(
6875
geode_store.stop_request();
6976
errors_store.add_error({
7077
code: response.status,
71-
route: request_url,
78+
route: schema.$id,
7279
name: response._data.name,
7380
description: response._data.description,
7481
});

0 commit comments

Comments
 (0)