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

Improve ui

parent 09fca9ac
No related branches found
No related tags found
1 merge request!222Refseq no sys
Pipeline #122569 waiting for manual action
...@@ -13,6 +13,7 @@ export interface Props { ...@@ -13,6 +13,7 @@ export interface Props {
dataUrls?: string[] dataUrls?: string[]
dataUrl?: string dataUrl?: string
uniq?: boolean uniq?: boolean
format?: "pdb" | "cif"
} }
const { mobile } = useDisplay() const { mobile } = useDisplay()
...@@ -52,7 +53,8 @@ const refinedDataUrls = computed(() => { ...@@ -52,7 +53,8 @@ const refinedDataUrls = computed(() => {
// const selectedPdb = ref(refinedDataUrls.value?.length > 0 ? refinedDataUrls.value[0] : null) // const selectedPdb = ref(refinedDataUrls.value?.length > 0 ? refinedDataUrls.value[0] : null)
const props = withDefaults(defineProps<Props>(), { const props = withDefaults(defineProps<Props>(), {
height: 600, height: 600,
uniq: false uniq: false,
format: 'pdb'
}) })
const { width, height } = useDisplay() const { width, height } = useDisplay()
...@@ -158,10 +160,15 @@ const moleculeFormat: Ref<string> = ref("pdb") ...@@ -158,10 +160,15 @@ const moleculeFormat: Ref<string> = ref("pdb")
<template> <template>
<template v-if="uniq"> <template v-if="uniq">
<v-row> <v-row justify="space-between" dense no-gutters align="center">
<v-btn size="x-small" variant="text" icon="md:visibility" @click="setSelectedPdbToFirst()"></v-btn> <v-col>{{ $props.format }}</v-col>
<v-btn :disabled="!structureToDownload" size="x-small" variant="text" icon="md:download" class="ml-1" <v-col>
:href="structureToDownload"></v-btn> <v-btn size="x-small" variant="text" icon="md:visibility" @click="setSelectedPdbToFirst()"></v-btn>
</v-col>
<v-col>
<v-btn :disabled="!structureToDownload" size="x-small" variant="text" icon="md:download" class="ml-1"
:href="structureToDownload"></v-btn>
</v-col>
</v-row> </v-row>
</template> </template>
<v-row v-else> <v-row v-else>
......
...@@ -71,7 +71,7 @@ const computedAutocompleteMeiliFacetsProps = computed(() => { ...@@ -71,7 +71,7 @@ const computedAutocompleteMeiliFacetsProps = computed(() => {
const headers: Ref<Object[]> = ref([ const headers: Ref<Object[]> = ref([
{ title: 'Structure', key: 'structure', sortable: false, removable: false }, { title: 'Structure', key: 'structure', sortable: false, removable: false, fixed: true, minWidth: "130px" },
{ title: 'Foldseek', key: 'Foldseek_name', sortable: false }, { title: 'Foldseek', key: 'Foldseek_name', sortable: false },
{ title: "System", key: "System", removable: false }, { title: "System", key: "System", removable: false },
{ title: "Gene name", key: "gene_name", removable: false }, { title: "Gene name", key: "gene_name", removable: false },
...@@ -212,22 +212,16 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz") ...@@ -212,22 +212,16 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz")
<CollapsibleChips :items="namesToCollapsibleChips(item.system_genes, item.System_name_ok)"></CollapsibleChips> <CollapsibleChips :items="namesToCollapsibleChips(item.system_genes, item.System_name_ok)"></CollapsibleChips>
</template> </template>
<template #[`item.structure`]="{ item }"> <template #[`item.structure`]="{ item }">
<v-list> <v-row no-gutters align="center">
<v-list-item> <MolstarPdbePlugin v-if="item?.pdb && item.pdb !== 'na'"
<v-list-item-title>cif</v-list-item-title> :data-urls="[`/${item.System_name_ok}/${pdbNameToCif(item.pdb)}`]" uniq format="cif">
<MolstarPdbePlugin v-if="item?.pdb && item.pdb !== 'na'" </MolstarPdbePlugin>
:data-urls="[`/${item.System_name_ok}/${pdbNameToCif(item.pdb)}`]" uniq> </v-row>
</MolstarPdbePlugin> <v-row no-gutters align="center">
<MolstarPdbePlugin v-if="item?.pdb && item.pdb !== 'na'"
</v-list-item> :data-urls="[`/${item.System_name_ok}/${item.pdb}`]" uniq format="pdb">
<v-list-item> </MolstarPdbePlugin>
<v-list-item-title>pdb</v-list-item-title> </v-row>
<MolstarPdbePlugin v-if="item?.pdb && item.pdb !== 'na'"
:data-urls="[`/${item.System_name_ok}/${item.pdb}`]" uniq>
</MolstarPdbePlugin>
</v-list-item>
</v-list>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment