use correct fallback iamge

This commit is contained in:
Georges-Antoine Assi
2025-02-04 21:23:16 -05:00
parent 257762525a
commit 6f800d6704
2 changed files with 4 additions and 18 deletions

View File

@@ -1,11 +1,7 @@
<script setup lang="ts">
import type { Collection } from "@/stores/collections";
import storeGalleryView from "@/stores/galleryView";
import {
getCollectionCoverImage,
getFavoriteCoverImage,
getMissingCoverImage,
} from "@/utils/covers";
import { getCollectionCoverImage, getFavoriteCoverImage } from "@/utils/covers";
import { computed } from "vue";
// Props
@@ -34,9 +30,6 @@ const collectionCoverImage = computed(() =>
const favoriteCoverImage = computed(() =>
getFavoriteCoverImage(props.collection.name),
);
const missingCoverImage = computed(() =>
getMissingCoverImage(props.collection.name),
);
</script>
<template>
@@ -95,7 +88,7 @@ const missingCoverImage = computed(() =>
<template #error>
<v-img
:src="missingCoverImage"
:src="collectionCoverImage"
cover
:aspect-ratio="galleryViewStore.defaultAspectRatioCollection"
/>

View File

@@ -1,10 +1,6 @@
<script setup lang="ts">
import type { Collection } from "@/stores/collections";
import {
getCollectionCoverImage,
getFavoriteCoverImage,
getMissingCoverImage,
} from "@/utils/covers";
import { getCollectionCoverImage, getFavoriteCoverImage } from "@/utils/covers";
import { computed } from "vue";
const props = withDefaults(
@@ -20,9 +16,6 @@ const collectionCoverImage = computed(() =>
const favoriteCoverImage = computed(() =>
getFavoriteCoverImage(props.collection.name),
);
const missingCoverImage = computed(() =>
getMissingCoverImage(props.collection.name),
);
</script>
<template>
@@ -37,7 +30,7 @@ const missingCoverImage = computed(() =>
"
>
<template #error>
<v-img :src="missingCoverImage" />
<v-img :src="collectionCoverImage" />
</template>
</v-img>
</v-avatar>