From 5c1ae539e9b113b2774d5f8e4bf7aa3e5be4c530 Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Thu, 14 Dec 2023 17:16:31 +0100 Subject: [PATCH] Handle case when no pdb file --- components/content/MolstarPdbePlugin.vue | 2 +- components/content/StructureDb.vue | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/content/MolstarPdbePlugin.vue b/components/content/MolstarPdbePlugin.vue index c631022c..aee98a37 100644 --- a/components/content/MolstarPdbePlugin.vue +++ b/components/content/MolstarPdbePlugin.vue @@ -218,7 +218,7 @@ const moleculeFormat: Ref<string> = ref("pdb") <v-col> <PlotFigure v-if="sanitizedPaeData?.length > 0 && paeError === null" defer :options="plotPaeOptions"></PlotFigure> - <v-alert v-else type="warning">{{ paeError }}</v-alert> + <v-alert v-else type="warning" variant="tonal">{{ paeError }}</v-alert> <v-card flat color="transparent"> <v-card-title>Model Confidence</v-card-title> diff --git a/components/content/StructureDb.vue b/components/content/StructureDb.vue index 4ec3d385..065e36e6 100644 --- a/components/content/StructureDb.vue +++ b/components/content/StructureDb.vue @@ -67,8 +67,9 @@ function toSystemName(rawName: string) { <td :colspan="columns.length"> <v-card flat color="transparent"> <v-card-text> - <MolstarPdbePlugin :data-urls="[`/${toSystemName(item.system)}/${pdbNameToCif(item.pdb)}`]"> + <MolstarPdbePlugin v-if="item?.pdb && item.pdb !== 'na'" :data-urls="[`/${toSystemName(item.system)}/${pdbNameToCif(item.pdb)}`]"> </MolstarPdbePlugin> + <v-alert v-else variant="tonal" type="warning">No structure file</v-alert> </v-card-text> </v-card> </td> -- GitLab