Skip to content
Snippets Groups Projects
Commit d775302a authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

add root html to structure db

parent 69b2455e
Branches
No related tags found
No related merge requests found
Pipeline #129922 waiting for manual action
......@@ -92,6 +92,7 @@ watchEffect(() => {
</script>
<template>
<div>
<v-dialog v-model="dialog" transition="dialog-bottom-transition" fullscreen :scrim="false">
<v-card flat :rounded="false">
<v-toolbar>
......@@ -173,5 +174,6 @@ watchEffect(() => {
</v-card-text>
</v-card>
</v-dialog>
</div>
</template>
\ No newline at end of file
......@@ -6,6 +6,7 @@ import { ServerDbTable } from "#components"
import { joinURL } from 'ufo'
import { useStructuresBasket } from "~/stores/structuresBasket"
import type { StructureItem } from "~/types/structure"
interface Item {
Foldseek_name: string
......@@ -22,7 +23,6 @@ const structureBasket = useStructuresBasket()
onMounted(async () => {
try {
const data = await client.index(toValue(dbName)).search("", {
facets: ["*"],
......@@ -35,9 +35,6 @@ onMounted(async () => {
throw createError("Unable to get structures")
}
})
......@@ -161,16 +158,18 @@ function pdbNameToCif(pdbPath: string) {
}
function buildStructureUrl(item) {
function buildStructureUrl(item: StructureItem) {
return [`/${item.system}/${pdbNameToCif(item.pdb)}`, `/${item.system}/${item.pdb}`]
}
function displayStructure(item) {
structureBasket.set(buildStructureUrl(item).map(url => {
return toValue(useRefinedUrl(url).refinedUrl)
function displayStructure(item: StructureItem) {
const structureUrls = buildStructureUrl(item)
structureBasket.set(structureUrls.map(url => {
const refinedUrl = useRefinedUrl(url).refinedUrl
return toValue(refinedUrl)
}))
structureTitle.value = `${item.subtype} - ${item.gene_name}`
structureTitle.value = `${item?.system} - ${item.subsystem}`
}
const { refinedUrl: downloadAllPdbUrl } = useRefinedUrl("/df-all-pdbs.tar.gz")
......@@ -283,7 +282,6 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz")
<template #toolbar-items>
<v-menu>
<template v-slot:activator="{ props }">
<!-- <v-tooltip activator="parent" location="top">Download all structures</v-tooltip> -->
<v-btn class="align-self-end" v-bind="props" icon="md:download">
</v-btn>
</template>
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment