Skip to content

Commit 024d2ee

Browse files
fix components
1 parent 3c4f908 commit 024d2ee

File tree

6 files changed

+84
-81
lines changed

6 files changed

+84
-81
lines changed

components/Carousel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
items: { type: Array, required: true },
2828
})
2929
30-
const { name } = toRefs(useDisplay())
30+
const { name } = useDisplay()
3131
const nb_items_to_display = ref(3)
3232
watch(
3333
name,

components/ExtensionSelector.vue

Lines changed: 54 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,64 @@
11
<template>
22
<FetchingData v-if="loading" />
3-
<v-row
4-
v-for="(
5-
output_extensions, output_geode_object
6-
) in geode_objects_and_output_extensions"
7-
:key="output_geode_object"
8-
class="justify-left"
9-
>
10-
<v-card class="card ma-2 pa-2" width="100%">
11-
<v-tooltip :text="`Export as a ${output_geode_object}`" location="bottom">
12-
<template v-slot:activator="{ props }">
13-
<v-card-title v-bind="props">
14-
{{ output_geode_object }}
15-
</v-card-title>
16-
</template>
17-
</v-tooltip>
18-
<v-card-text>
19-
<v-row>
20-
<v-col
21-
v-for="(extension, output_extension) in output_extensions"
22-
:key="output_extension"
23-
cols="auto"
24-
class="pa-0"
25-
>
26-
<v-tooltip
27-
:disabled="extension.is_saveable"
28-
text="Data not saveable with this file extension"
29-
location="bottom"
3+
<v-row v-else class="justify-left">
4+
<v-col
5+
v-for="(
6+
output_extensions, output_geode_object
7+
) in geode_objects_and_output_extensions"
8+
:key="output_geode_object"
9+
class="justify-left"
10+
>
11+
<v-card class="card ma-2 pa-2" width="100%">
12+
<v-tooltip
13+
:text="`Export as a ${output_geode_object}`"
14+
location="bottom"
15+
>
16+
<template v-slot:activator="{ props }">
17+
<v-card-title v-bind="props">
18+
{{ output_geode_object }}
19+
</v-card-title>
20+
</template>
21+
</v-tooltip>
22+
<v-card-text>
23+
<v-row>
24+
<v-col
25+
v-for="(extension, output_extension) in output_extensions"
26+
:key="output_extension"
27+
cols="auto"
28+
class="pa-0"
3029
>
31-
<template v-slot:activator="{ props }">
32-
<span v-bind="props">
33-
<v-card
34-
class="card ma-2"
35-
:color="extension.is_saveable ? 'primary' : 'grey'"
36-
hover
37-
@click="
38-
set_variables(output_geode_object, output_extension)
39-
"
40-
:disabled="!extension.is_saveable"
41-
>
42-
<v-card-title align="center">
43-
{{ output_extension }}
44-
</v-card-title>
45-
</v-card>
46-
</span>
47-
</template>
48-
</v-tooltip>
49-
</v-col>
50-
</v-row>
51-
</v-card-text>
52-
</v-card>
30+
<v-tooltip
31+
:disabled="extension.is_saveable"
32+
text="Data not saveable with this file extension"
33+
location="bottom"
34+
>
35+
<template v-slot:activator="{ props }">
36+
<span v-bind="props">
37+
<v-card
38+
class="card ma-2"
39+
:color="extension.is_saveable ? 'primary' : 'grey'"
40+
hover
41+
@click="
42+
set_variables(output_geode_object, output_extension)
43+
"
44+
:disabled="!extension.is_saveable"
45+
>
46+
<v-card-title align="center">
47+
{{ output_extension }}
48+
</v-card-title>
49+
</v-card>
50+
</span>
51+
</template>
52+
</v-tooltip>
53+
</v-col>
54+
</v-row>
55+
</v-card-text>
56+
</v-card>
57+
</v-col>
5358
</v-row>
5459
</template>
5560

5661
<script setup>
57-
import _ from "lodash"
5862
import schema from "@/assets/schemas/ExtensionSelector.json"
5963
6064
const emit = defineEmits([

components/FileUploader.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818
<v-row>
1919
<v-col cols="auto">
2020
<v-btn
21-
@click="upload_files()"
21+
@click="upload_files"
2222
color="primary"
2323
:disabled="!files.length && !files_uploaded"
2424
:loading="loading"
2525
class="pa-2"
26-
>
27-
Upload file(s)</v-btn
26+
>Upload file(s)</v-btn
2827
>
2928
</v-col>
3029
</v-row>

components/MissingFilesSelector.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<v-col cols="12">
2828
<FileUploader
2929
v-bind="{ multiple, accept, route }"
30-
@files_uploaded="files_uploaded"
30+
@files_uploaded="files_uploaded_event"
3131
/>
3232
</v-col>
3333
</v-row>
@@ -36,7 +36,7 @@
3636
v-if="!mandatory_files.length && additional_files.length"
3737
cols="auto"
3838
>
39-
<v-btn @click="skip_step()" color="warning"> Skip step </v-btn>
39+
<v-btn @click="emit('increment_step')" color="warning">Skip step</v-btn>
4040
</v-col>
4141
</v-row>
4242
</v-container>
@@ -67,7 +67,7 @@
6767
const additional_files = ref([])
6868
const toggle_loading = useToggle(loading)
6969
70-
function files_uploaded(value) {
70+
function files_uploaded_event(value) {
7171
emit("update_values", { additional_files: value })
7272
missing_files()
7373
}

components/ObjectSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<v-row v-else-if="Object.keys(allowed_objects).length" class="justify-left">
44
<v-col v-for="(value, key) in allowed_objects" :key="key" cols="2" md="2">
55
<v-tooltip
6-
:disabled="value.is_loadable"
76
:text="
87
value['is_loadable']
98
? geode_objects[key].tooltip
@@ -79,6 +78,7 @@
7978
reject()
8079
},
8180
response_function: (response) => {
81+
console.log(response)
8282
resolve(response._data.allowed_objects)
8383
},
8484
response_error_function: () => {

components/PackagesVersions.vue

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,33 +29,33 @@
2929
3030
const packages_versions = ref([])
3131
32-
function get_packages_versions() {
33-
api_fetch(
34-
{ schema },
35-
{
36-
response_function: (response) => {
37-
packages_versions.value = response._data.versions
32+
async function get_packages_versions() {
33+
const array_promise = []
34+
35+
const promise = new Promise((resolve, reject) => {
36+
api_fetch(
37+
{ schema },
38+
{
39+
request_error_function: () => {
40+
reject()
41+
},
42+
response_function: (response) => {
43+
packages_versions.value = response._data.versions
44+
resolve()
45+
},
46+
response_error_function: () => {
47+
reject()
48+
},
3849
},
39-
},
40-
)
50+
)
51+
})
52+
array_promise.push(promise)
53+
await Promise.all(array_promise)
4154
}
4255
43-
watch(is_running, (value) => {
44-
if (value === true) {
45-
get_packages_versions()
46-
}
47-
})
48-
49-
onMounted(() => {
50-
if (is_running.value) {
51-
get_packages_versions()
52-
}
56+
watch(is_running, () => {
57+
get_packages_versions()
5358
})
5459
55-
onActivated(() => {
56-
if (is_running.value === true) {
57-
get_packages_versions()
58-
}
59-
})
6060
await get_packages_versions()
6161
</script>

0 commit comments

Comments
 (0)