diff --git a/components/FoldseekDialog.vue b/components/FoldseekDialog.vue index a704ad656524a4e63a899a02e39c62584d18e255..bf5b6ad38abb4cf9c0da319522a9718459a33571 100644 --- a/components/FoldseekDialog.vue +++ b/components/FoldseekDialog.vue @@ -1,5 +1,6 @@ <script setup lang="ts"> + interface Props { foldseekPath: string title: string @@ -37,6 +38,10 @@ const computedHeight = computed(() => { return toValue(height) - toValue(yMargin) }) +const foldseekImgPath = ref<string>("/foldseek-avatar.webp") +const foldseekImgSrc = computed(() => { + return useRefinedUrl(foldseekImgPath).refinedUrl +}) function fullscreen() { iframe.value.requestFullscreen(); @@ -48,11 +53,8 @@ function fullscreen() { <template> <v-dialog v-model="dialog" fullscreen transition="dialog-bottom-transition"> <template v-slot:activator="{ props }"> - <v-avatar> - <v-img src="~/assets/foldseek.png" alt="Foldseek results" v-bind="props" class="cursor-pointer"></v-img> - <!-- <v-btn color="primary" dark v-bind="props"> - <v-img src="~/assets/foldseek.png" alt="Foldseek results"></v-img> - </v-btn> --> + <v-avatar size="small"> + <v-img :src="toValue(foldseekImgSrc)" alt="Foldseek results" v-bind="props" class="cursor-pointer"></v-img> </v-avatar> </template> <v-card variant="flat"> diff --git a/components/content/StructureDb.vue b/components/content/StructureDb.vue index 10fe44617a5a96f4e1d49b37ac24409999b873e7..8fd660b7d3aeef5bdbccc0a19e6d264d767c392b 100644 --- a/components/content/StructureDb.vue +++ b/components/content/StructureDb.vue @@ -247,7 +247,7 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz") </v-card-text> </template> <template #[`item.Foldseek_name`]="{ item }"> - <FoldseekDialog :foldseek-path="toFolseekUrl(item)"></FoldseekDialog> + <FoldseekDialog v-if="item?.pdb !== 'na'" :foldseek-path="toFolseekUrl(item)"></FoldseekDialog> </template> <template #[`item.proteins_in_the_prediction`]="{ item }"> diff --git a/nuxt.config.ts b/nuxt.config.ts index 49cae976187c2dba35cfbb9147b0c153b14bea93..f873275149760204789f70b3784cf87facdf8199 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -11,7 +11,8 @@ export default defineNuxtConfig({ 'nuxt-meilisearch', '@nuxtjs/plausible', '@nuxtjs/seo', - '@nuxt/eslint' + '@nuxt/eslint', + "@nuxt/image" ], app: { head: { @@ -101,7 +102,7 @@ export default defineNuxtConfig({ config: { stylistic: true // <--- } - } + }, -}) +}) \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c9f6ce400c12f380a78b779a5a5bdd2aba5a7f4c..1d52a6f62a7595a59103e8a4d90c1e1054a420de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17672,12 +17672,14 @@ } }, "node_modules/streamx": { - "version": "2.16.1", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.18.0.tgz", + "integrity": "sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==", "dev": true, - "license": "MIT", "dependencies": { - "fast-fifo": "^1.1.0", - "queue-tick": "^1.0.1" + "fast-fifo": "^1.3.2", + "queue-tick": "^1.0.1", + "text-decoder": "^1.1.0" }, "optionalDependencies": { "bare-events": "^2.2.0" @@ -18093,6 +18095,15 @@ "dev": true, "license": "MIT" }, + "node_modules/text-decoder": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.1.0.tgz", + "integrity": "sha512-TmLJNj6UgX8xcUZo4UDStGQtDiTzF7BzWlzn9g7UWrjkpHr5uJTK1ld16wZ3LXb2vb6jH8qU89dW5whuMdXYdw==", + "dev": true, + "dependencies": { + "b4a": "^1.6.4" + } + }, "node_modules/text-table": { "version": "0.2.0", "dev": true, diff --git a/public/foldseek-avatar.png b/public/foldseek-avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..25c2a672ed5724e0b59d349b163b1b6617eaacbc Binary files /dev/null and b/public/foldseek-avatar.png differ diff --git a/public/foldseek-avatar.webp b/public/foldseek-avatar.webp new file mode 100644 index 0000000000000000000000000000000000000000..9a7c65fcf4883f4f555a8a8482b5122184be993c Binary files /dev/null and b/public/foldseek-avatar.webp differ diff --git a/assets/foldseek.png b/public/foldseek.png similarity index 100% rename from assets/foldseek.png rename to public/foldseek.png