|
1 | 1 | <template> |
2 | 2 | <FetchingData v-if="loading" /> |
3 | 3 | <v-row |
4 | | - v-for="item in geode_objects_and_output_extensions" |
5 | | - :key="item.geode_object" |
| 4 | + v-for="( |
| 5 | + output_extensions, geode_object |
| 6 | + ) in geode_objects_and_output_extensions" |
| 7 | + :key="geode_object" |
6 | 8 | class="justify-left" |
7 | 9 | > |
8 | 10 | <v-card class="card ma-2 pa-2" width="100%"> |
9 | | - <v-tooltip :text="`Export as a ${item.geode_object}`" location="bottom"> |
| 11 | + <v-tooltip :text="`Export as a ${geode_object}`" location="bottom"> |
10 | 12 | <template v-slot:activator="{ props }"> |
11 | 13 | <v-card-title v-bind="props"> |
12 | | - {{ item.geode_object }} |
| 14 | + {{ geode_object }} |
13 | 15 | </v-card-title> |
14 | 16 | </template> |
15 | 17 | </v-tooltip> |
16 | 18 | <v-card-text> |
17 | 19 | <v-row> |
18 | 20 | <v-col |
19 | | - v-for="output in item.outputs" |
20 | | - :key="output.extension" |
| 21 | + v-for="(extension, output_extension) in output_extensions" |
| 22 | + :key="output_extension" |
21 | 23 | cols="auto" |
22 | 24 | class="pa-0" |
23 | 25 | > |
24 | 26 | <v-tooltip |
25 | | - :disabled="output.is_saveable" |
| 27 | + :disabled="extension.is_saveable" |
26 | 28 | text="Data not saveable with this file extension" |
27 | 29 | location="bottom" |
28 | 30 | > |
29 | 31 | <template v-slot:activator="{ props }"> |
30 | 32 | <span v-bind="props"> |
31 | 33 | <v-card |
32 | 34 | class="card ma-2" |
33 | | - :color="output.is_saveable ? 'primary' : 'grey'" |
| 35 | + :color="extension.is_saveable ? 'primary' : 'grey'" |
34 | 36 | hover |
35 | | - @click="set_variables(item.geode_object, output.extension)" |
36 | | - :disabled="!output.is_saveable" |
| 37 | + @click="set_variables(geode_object, output_extension)" |
| 38 | + :disabled="!extension.is_saveable" |
37 | 39 | > |
38 | 40 | <v-card-title align="center"> |
39 | | - {{ output.extension }} |
| 41 | + {{ output_extension }} |
40 | 42 | </v-card-title> |
41 | 43 | </v-card> |
42 | 44 | </span> |
|
63 | 65 | filenames: { type: Array, required: true }, |
64 | 66 | }) |
65 | 67 | const { input_geode_object, filenames } = props |
66 | | -
|
67 | | - const geode_objects_and_output_extensions = ref([]) |
| 68 | + const geode_objects_and_output_extensions = ref({}) |
68 | 69 | const loading = ref(false) |
69 | 70 |
|
70 | 71 | const toggle_loading = useToggle(loading) |
|
0 commit comments