From f523a0b3e3e037a56fdc2187a51fc5f883b5a6b3 Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Tue, 30 Jan 2024 15:24:48 +0100
Subject: [PATCH] refined urls

---
 components/content/StructureDb.vue | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/components/content/StructureDb.vue b/components/content/StructureDb.vue
index 390b52cf..54a8658d 100644
--- a/components/content/StructureDb.vue
+++ b/components/content/StructureDb.vue
@@ -18,7 +18,6 @@ const itemValue = ref("id");
 const dbName = ref("structure")
 
 onBeforeMount(async () => {
-    console.log("dans le mounted refseq")
     const { data } = await useAsyncMeiliSearch({
         index: toValue(dbName), query: "", params: {
             facets: ["*"],
@@ -143,6 +142,8 @@ function pdbNameToCif(pdbPath: string) {
     return `${cifPath}.cif`
 }
 
+const { refinedUrl: downloadAllPdbUrl } = useRefinedUrl("/df-all-pdb.tar.gz")
+
 </script>
 <template>
     <ServerDbTable title="Predicted Structures" :sortBy="sortBy" :data-table-server-props="dataTableServerProps"
@@ -210,9 +211,24 @@ function pdbNameToCif(pdbPath: string) {
             <CollapsibleChips :items="namesToCollapsibleChips(item.system_genes, item.System_name_ok)"></CollapsibleChips>
         </template>
         <template #[`item.structure`]="{ item }">
-            <MolstarPdbePlugin v-if="item?.pdb && item.pdb !== 'na'"
-                :data-urls="[`/${item.System_name_ok}/${pdbNameToCif(item.pdb)}`]" uniq>
-            </MolstarPdbePlugin>
+            <v-list>
+                <v-list-item>
+                    <v-list-item-title>cif</v-list-item-title>
+                    <MolstarPdbePlugin v-if="item?.pdb && item.pdb !== 'na'"
+                        :data-urls="[`/${item.System_name_ok}/${pdbNameToCif(item.pdb)}`]" uniq>
+                    </MolstarPdbePlugin>
+
+                </v-list-item>
+                <v-list-item>
+                    <v-list-item-title>pdb</v-list-item-title>
+                    <MolstarPdbePlugin v-if="item?.pdb && item.pdb !== 'na'"
+                        :data-urls="[`/${item.System_name_ok}/${item.pdb}`]" uniq>
+                    </MolstarPdbePlugin>
+                </v-list-item>
+            </v-list>
+
+
+
 
             <!-- <v-icon v-else color="warning" icon="md:dangerous"></v-icon> -->
 
@@ -228,7 +244,7 @@ function pdbNameToCif(pdbPath: string) {
                         all</v-btn>
                 </template>
                 <v-list>
-                    <v-list-item value="pdb" href="/df-all-pdb.tar.gz">
+                    <v-list-item value="pdb" :href="downloadAllPdbUrl">
                         <v-list-item-title>all pdbs</v-list-item-title>
                     </v-list-item>
                     <v-list-item value="pdb">
-- 
GitLab